-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1319 from cityofaustin/add_ems_relation_to_persons
Add ems id to the person and primary persons table
- Loading branch information
Showing
12 changed files
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
atd-vzd/metadata/databases/default/tables/public_ems__incidents.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
table: | ||
name: ems__incidents | ||
schema: public |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
...fault/1700162755001_alter_table_public_atd_txdot_primaryperson_add_column_ems_id/down.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
ALTER TABLE public.atd_txdot_person | ||
DROP COLUMN IF EXISTS ems_id; |
4 changes: 4 additions & 0 deletions
4
...default/1700162755001_alter_table_public_atd_txdot_primaryperson_add_column_ems_id/up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
alter table "public"."atd_txdot_primaryperson" add column "ems_id" integer | ||
null; | ||
|
||
COMMENT ON COLUMN public.atd_txdot_primaryperson.ems_id IS 'This field holds the foreign key that references a single record in the ems__incidents table.'; |
2 changes: 2 additions & 0 deletions
2
...ions/default/1700162781208_alter_table_public_atd_txdot_person_add_column_ems_id/down.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
ALTER TABLE public.atd_txdot_primaryperson | ||
DROP COLUMN IF EXISTS ems_id; |
4 changes: 4 additions & 0 deletions
4
...ations/default/1700162781208_alter_table_public_atd_txdot_person_add_column_ems_id/up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
alter table "public"."atd_txdot_person" add column "ems_id" integer | ||
null; | ||
|
||
COMMENT ON COLUMN public.atd_txdot_person.ems_id IS 'This field holds the foreign key that references a single record in the ems__incidents table'; |
1 change: 1 addition & 0 deletions
1
...zd/migrations/default/1700863342765_set_fk_public_atd_txdot_primaryperson_ems_id/down.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
alter table "public"."atd_txdot_primaryperson" drop constraint "atd_txdot_primaryperson_ems_id_fkey"; |
5 changes: 5 additions & 0 deletions
5
atd-vzd/migrations/default/1700863342765_set_fk_public_atd_txdot_primaryperson_ems_id/up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
alter table "public"."atd_txdot_primaryperson" | ||
add constraint "atd_txdot_primaryperson_ems_id_fkey" | ||
foreign key ("ems_id") | ||
references "public"."ems__incidents" | ||
("id") on update restrict on delete set null; |
1 change: 1 addition & 0 deletions
1
atd-vzd/migrations/default/1700863516831_set_fk_public_atd_txdot_person_ems_id/down.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
alter table "public"."atd_txdot_person" drop constraint "atd_txdot_person_ems_id_fkey"; |
5 changes: 5 additions & 0 deletions
5
atd-vzd/migrations/default/1700863516831_set_fk_public_atd_txdot_person_ems_id/up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
alter table "public"."atd_txdot_person" | ||
add constraint "atd_txdot_person_ems_id_fkey" | ||
foreign key ("ems_id") | ||
references "public"."ems__incidents" | ||
("id") on update restrict on delete set null; |