From c1a686cf28e8b9cfb6acf9daf15450e187563340 Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Fri, 16 Apr 2021 18:21:29 +0200 Subject: [PATCH] forgot to commit migrations --- migrations/2021-04-16-130927_language-tags/down.sql | 6 ++++++ migrations/2021-04-16-130927_language-tags/up.sql | 6 ++++++ 2 files changed, 12 insertions(+) create mode 100644 migrations/2021-04-16-130927_language-tags/down.sql create mode 100644 migrations/2021-04-16-130927_language-tags/up.sql diff --git a/migrations/2021-04-16-130927_language-tags/down.sql b/migrations/2021-04-16-130927_language-tags/down.sql new file mode 100644 index 000000000..a5f9ba2cf --- /dev/null +++ b/migrations/2021-04-16-130927_language-tags/down.sql @@ -0,0 +1,6 @@ +ALTER TABLE comment DROP COLUMN language; +ALTER TABLE post DROP COLUMN language; +ALTER TABLE private_message DROP COLUMN language; + +ALTER TABLE local_user DROP COLUMN discussion_languages; +ALTER TABLE local_user RENAME COLUMN interface_language TO lang; diff --git a/migrations/2021-04-16-130927_language-tags/up.sql b/migrations/2021-04-16-130927_language-tags/up.sql new file mode 100644 index 000000000..312b9e203 --- /dev/null +++ b/migrations/2021-04-16-130927_language-tags/up.sql @@ -0,0 +1,6 @@ +ALTER TABLE comment ADD COLUMN language TEXT NOT NULL; +ALTER TABLE post ADD COLUMN language TEXT NOT NULL; +ALTER TABLE private_message ADD COLUMN language TEXT NOT NULL; + +ALTER TABLE local_user ADD COLUMN discussion_languages TEXT[] NOT NULL; +ALTER TABLE local_user RENAME COLUMN lang TO interface_language;