summaryrefslogtreecommitdiff
path: root/migrations/2018-05-04-010249_deletion_record/up.sql
diff options
context:
space:
mode:
Diffstat (limited to 'migrations/2018-05-04-010249_deletion_record/up.sql')
-rw-r--r--migrations/2018-05-04-010249_deletion_record/up.sql7
1 files changed, 7 insertions, 0 deletions
diff --git a/migrations/2018-05-04-010249_deletion_record/up.sql b/migrations/2018-05-04-010249_deletion_record/up.sql
new file mode 100644
index 0000000..64f6220
--- /dev/null
+++ b/migrations/2018-05-04-010249_deletion_record/up.sql
@@ -0,0 +1,7 @@
+CREATE TABLE tombstones (
+ id SERIAL PRIMARY KEY,
+ meme_id INTEGER NOT NULL,
+ deleted_by BIGINT NOT NULL,
+ deleted_at TIMESTAMP NOT NULL DEFAULT current_timestamp,
+ metadata_id INTEGER REFERENCES metadata
+);