From a90d1cc1a41e405ea397b06a3bc1907291c98b65 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Sat, 14 Apr 2018 16:33:15 +0200 Subject: feat(migrations): Drop 'body' column from threads As a data model simplification, the text of a thread's top post should simply also go into the posts table. --- migrations/2018-04-14-140818_posts_only_in_posts/down.sql | 1 + migrations/2018-04-14-140818_posts_only_in_posts/up.sql | 6 ++++++ 2 files changed, 7 insertions(+) create mode 100644 migrations/2018-04-14-140818_posts_only_in_posts/down.sql create mode 100644 migrations/2018-04-14-140818_posts_only_in_posts/up.sql diff --git a/migrations/2018-04-14-140818_posts_only_in_posts/down.sql b/migrations/2018-04-14-140818_posts_only_in_posts/down.sql new file mode 100644 index 000000000000..bb6528f33d78 --- /dev/null +++ b/migrations/2018-04-14-140818_posts_only_in_posts/down.sql @@ -0,0 +1 @@ +ALTER TABLE threads ADD COLUMN body TEXT NOT NULL DEFAULT ''; diff --git a/migrations/2018-04-14-140818_posts_only_in_posts/up.sql b/migrations/2018-04-14-140818_posts_only_in_posts/up.sql new file mode 100644 index 000000000000..07ff9a1196f6 --- /dev/null +++ b/migrations/2018-04-14-140818_posts_only_in_posts/up.sql @@ -0,0 +1,6 @@ +-- Instead of storing the thread OP in the thread table, this will +-- make it a post as well. +-- At the time at which this migration was created no important data +-- existed in any converse instances, so data is not moved. + +ALTER TABLE threads DROP COLUMN body; -- cgit 1.4.1