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;