Skip to content

Commit

Permalink
Remove UUID from destinations table since those just get lumped with …
Browse files Browse the repository at this point in the history
…distros in pacman
  • Loading branch information
ThorntonMatthew committed Jun 28, 2023
1 parent 505583e commit 4953e99
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 23 deletions.
6 changes: 0 additions & 6 deletions db/migrate/20230627203547_add_uuid_to_pacman_tables.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@ def up
:string,
comment: "UUID of the communication package in Package Manager (Pacman)"

add_column :vbms_distribution_destinations,
:uuid,
:string,
comment: "UUID of the distrubtion destination in Package Manager (Pacman)"

add_column :vbms_distributions,
:uuid,
:string,
Expand All @@ -18,7 +13,6 @@ def up

def down
remove_column :vbms_communication_packages, :uuid
remove_column :vbms_distribution_destinations, :uuid
remove_column :vbms_distributions, :uuid
end
end
1 change: 0 additions & 1 deletion db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1823,7 +1823,6 @@
t.boolean "treat_line_3_as_addressee", comment: "If true, treatLine2AsAddressee must also be true"
t.datetime "updated_at", null: false
t.bigint "updated_by_id"
t.string "uuid", comment: "UUID of the distrubtion destination in Package Manager (Pacman)"
t.bigint "vbms_distribution_id"
t.index ["created_by_id"], name: "index_vbms_distribution_destinations_on_created_by_id"
t.index ["updated_by_id"], name: "index_vbms_distribution_destinations_on_updated_by_id"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@
OLD.updated_at,
OLD.vbms_distribution_id,
OLD.created_by_id,
OLD.updated_by_id,
OLD.uuid;
OLD.updated_by_id;
elsif (TG_OP = 'UPDATE') then
insert into caseflow_audit.vbms_distribution_destinations_audit
select
Expand All @@ -58,8 +57,7 @@
NEW.updated_at,
NEW.vbms_distribution_id,
NEW.created_by_id,
NEW.updated_by_id,
NEW.uuid;
NEW.updated_by_id;
elsif (TG_OP = 'INSERT') then
insert into caseflow_audit.vbms_distribution_destinations_audit
select
Expand All @@ -84,8 +82,7 @@
NEW.updated_at,
NEW.vbms_distribution_id,
NEW.created_by_id,
NEW.updated_by_id,
NEW.uuid;
NEW.updated_by_id;
end if;
return null;
end;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ begin
OLD.updated_at,
OLD.vbms_distribution_id,
OLD.created_by_id,
OLD.updated_by_id,
OLD.uuid;
OLD.updated_by_id;
elsif (TG_OP = 'UPDATE') then
insert into caseflow_audit.vbms_distribution_destinations_audit
select
Expand All @@ -52,8 +51,7 @@ begin
NEW.updated_at,
NEW.vbms_distribution_id,
NEW.created_by_id,
NEW.updated_by_id,
NEW.uuid;
NEW.updated_by_id;
elsif (TG_OP = 'INSERT') then
insert into caseflow_audit.vbms_distribution_destinations_audit
select
Expand All @@ -78,8 +76,7 @@ begin
NEW.updated_at,
NEW.vbms_distribution_id,
NEW.created_by_id,
NEW.updated_by_id,
NEW.uuid;
NEW.updated_by_id;
end if;
return null;
end;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
updated_at timestamp NOT NULL,
vbms_distribution_id int8 NULL,
created_by_id int8 NULL,
updated_by_id int8 NULL,
uuid varchar NULL
updated_by_id int8 NULL
);")
conn.close
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,5 @@ create table caseflow_audit.vbms_distribution_destinations_audit (
updated_at timestamp NOT NULL,
vbms_distribution_id int8 NULL,
created_by_id int8 NULL,
updated_by_id int8 NULL,
uuid varchar NULL
updated_by_id int8 NULL
);

0 comments on commit 4953e99

Please sign in to comment.