Skip to content

Commit

Permalink
Add effective_on column to ra.municipality_changes
Browse files Browse the repository at this point in the history
  • Loading branch information
eronisko committed May 13, 2017
1 parent af4e9c2 commit ffdf23a
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class RaAddEffectiveOnToMunicipalityChanges < ActiveRecord::Migration[5.0]
def change
add_column 'ra.municipality_changes', 'effective_on', :date
end
end
19 changes: 17 additions & 2 deletions db/structure.sql
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,19 @@ CREATE TYPE municipality_status AS ENUM (
);


SET search_path = datahub, pg_catalog;

--
-- Name: pg_schema_size(text); Type: FUNCTION; Schema: datahub; Owner: -
--

CREATE FUNCTION pg_schema_size(text) RETURNS bigint

This comment has been minimized.

Copy link
@jsuchal

jsuchal May 14, 2017

Member

Toto je zkade?

This comment has been minimized.

Copy link
@eronisko

eronisko May 14, 2017

Author Contributor

To tam nemalo byt. Este vcera som to rebaseol: 9f62108

LANGUAGE sql
AS $_$
SELECT SUM(pg_total_relation_size(quote_ident(schemaname) || '.' || quote_ident(tablename)))::BIGINT FROM pg_tables WHERE schemaname = $1
$_$;


SET search_path = core, pg_catalog;

SET default_tablespace = '';
Expand Down Expand Up @@ -1641,7 +1654,8 @@ CREATE TABLE municipality_changes (
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
city_id integer,
change_id integer
change_id integer,
effective_on date
);


Expand Down Expand Up @@ -6836,6 +6850,7 @@ INSERT INTO "schema_migrations" (version) VALUES
('20170503112646'),
('20170503203539'),
('20170506104022'),
('20170506190014');
('20170506190014'),
('20170513200748');


0 comments on commit ffdf23a

Please sign in to comment.