From 6385e010a2b054a765abee2c8a7368ed55728008 Mon Sep 17 00:00:00 2001 From: Fabrice Lecomte Date: Tue, 30 Jul 2019 09:53:33 +0200 Subject: [PATCH] refactoring #19: rename column workgroup to workgroup_id --- resources/sql/fixtures/03-workgroup.sql | 2 +- resources/sql/migrations/0000-init_schema.up.sql | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/resources/sql/fixtures/03-workgroup.sql b/resources/sql/fixtures/03-workgroup.sql index f1eeb3c..c0edb00 100644 --- a/resources/sql/fixtures/03-workgroup.sql +++ b/resources/sql/fixtures/03-workgroup.sql @@ -13,7 +13,7 @@ begin z.id from (select *, row_number() over () rn from citizen) z; - insert into citizen_in_workgroup (citizen_id, workgroup) + insert into citizen_in_workgroup (citizen_id, workgroup_id) select z.id, w.id diff --git a/resources/sql/migrations/0000-init_schema.up.sql b/resources/sql/migrations/0000-init_schema.up.sql index 0642b6f..ac4cde6 100644 --- a/resources/sql/migrations/0000-init_schema.up.sql +++ b/resources/sql/migrations/0000-init_schema.up.sql @@ -37,10 +37,10 @@ create table workgroup create table citizen_in_workgroup ( - citizen_id uuid not null references citizen (id), - workgroup uuid not null references workgroup (id), - created_at timestamptz default now() not null, - primary key (citizen_id, workgroup) + citizen_id uuid not null references citizen (id), + workgroup_id uuid not null references workgroup (id), + created_at timestamptz default now() not null, + primary key (citizen_id, workgroup_id) ); create table moderator