From 72be8e693a4ca446cddd10474d1224c4d8e8558c Mon Sep 17 00:00:00 2001 From: Dietrich Date: Wed, 10 Feb 2021 09:12:42 +0100 Subject: [PATCH] migrations for user roles --- .../2021-02-10-072528_add_user_profiles/down.sql | 3 +++ .../2021-02-10-072528_add_user_profiles/up.sql | 12 ++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 migrations/2021-02-10-072528_add_user_profiles/down.sql create mode 100644 migrations/2021-02-10-072528_add_user_profiles/up.sql diff --git a/migrations/2021-02-10-072528_add_user_profiles/down.sql b/migrations/2021-02-10-072528_add_user_profiles/down.sql new file mode 100644 index 0000000..7875a4a --- /dev/null +++ b/migrations/2021-02-10-072528_add_user_profiles/down.sql @@ -0,0 +1,3 @@ +-- This file should undo anything in `up.sql` + +DROP TABLE user_roles; \ No newline at end of file diff --git a/migrations/2021-02-10-072528_add_user_profiles/up.sql b/migrations/2021-02-10-072528_add_user_profiles/up.sql new file mode 100644 index 0000000..c9ea528 --- /dev/null +++ b/migrations/2021-02-10-072528_add_user_profiles/up.sql @@ -0,0 +1,12 @@ +-- Your SQL goes here +CREATE TABLE user_roles +( + id INTEGER PRIMARY KEY NOT NULL, + name TEXT NOT NULL, + description TEXT NOT NULL, + + FOREIGN KEY + (link) + REFERENCES users + (id) +); \ No newline at end of file