From ab7fad6a62270d81f22c41ec2b912e6912aca7e7 Mon Sep 17 00:00:00 2001 From: mStar aka a person <12024604-mstarongitlab@users.noreply.gitlab.com> Date: Mon, 1 Jan 2024 13:38:13 +0000 Subject: [PATCH] Add first migrations --- .../postgres/2023-12-29-193430_create_people/down.sql | 1 + .../postgres/2023-12-29-193430_create_people/up.sql | 11 ++++++----- .../sqlite/2023-12-31-223546_create_people/down.sql | 1 + .../sqlite/2023-12-31-223546_create_people/up.sql | 8 ++++++++ 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/migrations/postgres/2023-12-29-193430_create_people/down.sql b/migrations/postgres/2023-12-29-193430_create_people/down.sql index d9a93fe..fa02ff1 100644 --- a/migrations/postgres/2023-12-29-193430_create_people/down.sql +++ b/migrations/postgres/2023-12-29-193430_create_people/down.sql @@ -1 +1,2 @@ -- This file should undo anything in `up.sql` +DROP TABLE people; \ No newline at end of file diff --git a/migrations/postgres/2023-12-29-193430_create_people/up.sql b/migrations/postgres/2023-12-29-193430_create_people/up.sql index e191ec7..4b82ad1 100644 --- a/migrations/postgres/2023-12-29-193430_create_people/up.sql +++ b/migrations/postgres/2023-12-29-193430_create_people/up.sql @@ -1,7 +1,8 @@ CREATE TABLE people ( - id STRING primary key, - name STRING not null, - instance STRING, - mail STRING, - pw_hash STRING + id TEXT primary key, + name TEXT not null, + instance TEXT, + mail TEXT, + pw_hash TEXT, + is_local BOOLEAN ) \ No newline at end of file diff --git a/migrations/sqlite/2023-12-31-223546_create_people/down.sql b/migrations/sqlite/2023-12-31-223546_create_people/down.sql index d9a93fe..fa02ff1 100644 --- a/migrations/sqlite/2023-12-31-223546_create_people/down.sql +++ b/migrations/sqlite/2023-12-31-223546_create_people/down.sql @@ -1 +1,2 @@ -- This file should undo anything in `up.sql` +DROP TABLE people; \ No newline at end of file diff --git a/migrations/sqlite/2023-12-31-223546_create_people/up.sql b/migrations/sqlite/2023-12-31-223546_create_people/up.sql index b37f10d..4c3ff7b 100644 --- a/migrations/sqlite/2023-12-31-223546_create_people/up.sql +++ b/migrations/sqlite/2023-12-31-223546_create_people/up.sql @@ -1 +1,9 @@ -- Your SQL goes here +CREATE TABLE people ( + id STRING primary key, + name STRING not null, + instance STRING, + mail STRING, + pw_hash STRING, + is_local BOOLEAN +) \ No newline at end of file