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