Merge remote-tracking branch 'origin/feature/28' into feature/28
This commit is contained in:
commit
ad8563d668
10 changed files with 1904 additions and 907 deletions
|
|
@ -0,0 +1 @@
|
|||
alter table issues drop column current;
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
alter table issues add column current boolean default true;
|
||||
|
||||
8
resources/migrations/20180526162051-dwellings.down.sql
Normal file
8
resources/migrations/20180526162051-dwellings.down.sql
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
alter table electors
|
||||
add column address_id references addresses on delete no action;
|
||||
|
||||
update electors
|
||||
set address_id =
|
||||
(select address_id
|
||||
from dwellings
|
||||
where dwellings.id electors.dwelling_id);
|
||||
11
resources/migrations/20180526162051-dwellings.up.sql
Normal file
11
resources/migrations/20180526162051-dwellings.up.sql
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
CREATE TABLE dwellings
|
||||
(
|
||||
id INT NOT NULL PRIMARY KEY,
|
||||
address_id INT NOT NULL references addresses on delete no action,
|
||||
sub_address VARCHAR( 32)
|
||||
);
|
||||
|
||||
alter table electors
|
||||
add column dwelling_id int references dwellings on delete no action;
|
||||
|
||||
alter table electors drop column address_id;
|
||||
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue