From 914c626bfbf5e24040191e08f4516cf1b76e543b Mon Sep 17 00:00:00 2001 From: Pierre Hubert Date: Sat, 26 Aug 2023 16:08:57 +0200 Subject: [PATCH] Add migration --- .../migrations/2023-08-26-140604_disable_couple_photos/down.sql | 2 ++ .../migrations/2023-08-26-140604_disable_couple_photos/up.sql | 2 ++ geneit_backend/src/schema.rs | 1 + 3 files changed, 5 insertions(+) create mode 100644 geneit_backend/migrations/2023-08-26-140604_disable_couple_photos/down.sql create mode 100644 geneit_backend/migrations/2023-08-26-140604_disable_couple_photos/up.sql diff --git a/geneit_backend/migrations/2023-08-26-140604_disable_couple_photos/down.sql b/geneit_backend/migrations/2023-08-26-140604_disable_couple_photos/down.sql new file mode 100644 index 0000000..99d0527 --- /dev/null +++ b/geneit_backend/migrations/2023-08-26-140604_disable_couple_photos/down.sql @@ -0,0 +1,2 @@ +-- This file should undo anything in `up.sql` +alter table families drop column disable_couple_photos; \ No newline at end of file diff --git a/geneit_backend/migrations/2023-08-26-140604_disable_couple_photos/up.sql b/geneit_backend/migrations/2023-08-26-140604_disable_couple_photos/up.sql new file mode 100644 index 0000000..e2080fb --- /dev/null +++ b/geneit_backend/migrations/2023-08-26-140604_disable_couple_photos/up.sql @@ -0,0 +1,2 @@ +-- Your SQL goes here +ALTER TABLE families add column disable_couple_photos boolean not null default false; \ No newline at end of file diff --git a/geneit_backend/src/schema.rs b/geneit_backend/src/schema.rs index bda2564..265bbfd 100644 --- a/geneit_backend/src/schema.rs +++ b/geneit_backend/src/schema.rs @@ -25,6 +25,7 @@ diesel::table! { time_create -> Int8, name -> Varchar, invitation_code -> Varchar, + disable_couple_photos -> Bool, } }