summaryrefslogtreecommitdiffstats
path: root/migrations
diff options
context:
space:
mode:
authorSanto Cariotti <santo@dcariotti.me>2022-10-03 18:24:38 +0000
committerSanto Cariotti <santo@dcariotti.me>2022-10-03 18:24:38 +0000
commitc1f61c458e0e97586796a3acdbd21aedf8b2e8ad (patch)
tree35d2aea0e2ce7eda52f5f519ae0dec6ab8b5c1b2 /migrations
parent1d559a116a51140a4f13450fbed896b1929de5c0 (diff)
Likes model and them to a model
Diffstat (limited to 'migrations')
-rw-r--r--migrations/20221003064044_add-likes.sql6
1 files changed, 6 insertions, 0 deletions
diff --git a/migrations/20221003064044_add-likes.sql b/migrations/20221003064044_add-likes.sql
new file mode 100644
index 0000000..c94d488
--- /dev/null
+++ b/migrations/20221003064044_add-likes.sql
@@ -0,0 +1,6 @@
+CREATE TABLE likes (
+ id SERIAL PRIMARY KEY,
+ user_id INTEGER REFERENCES users(id) ON DELETE SET NULL,
+ model_id INTEGER REFERENCES models(id) ON DELETE SET NULL,
+ created TIMESTAMP NOT NULL
+);