aboutsummaryrefslogtreecommitdiff
path: root/priv
diff options
context:
space:
mode:
authorRoman Chvanikov <chvanikoff@pm.me>2019-10-30 18:34:14 +0300
committerRoman Chvanikov <chvanikoff@pm.me>2019-10-30 18:34:14 +0300
commit8bb6da7cd604359afb5eeabeeac0207edff07ce3 (patch)
treea1a3c4f9aa70771a7edeecc21c899b8188ab9ff5 /priv
parent435d220700c694f1312bf213d0591054a309489a (diff)
downloadpleroma-8bb6da7cd604359afb5eeabeeac0207edff07ce3.tar.gz
Remove following column from the migrations
Diffstat (limited to 'priv')
-rw-r--r--priv/repo/migrations/20191025143434_add_defaults_to_tables.exs3
-rw-r--r--priv/repo/migrations/20191026191910_set_not_null_for_users.exs2
2 files changed, 0 insertions, 5 deletions
diff --git a/priv/repo/migrations/20191025143434_add_defaults_to_tables.exs b/priv/repo/migrations/20191025143434_add_defaults_to_tables.exs
index d16ab19f9..a5bc82335 100644
--- a/priv/repo/migrations/20191025143434_add_defaults_to_tables.exs
+++ b/priv/repo/migrations/20191025143434_add_defaults_to_tables.exs
@@ -12,7 +12,6 @@ defmodule Pleroma.Repo.Migrations.AddDefaultsToTables do
ALTER COLUMN data SET DEFAULT '{}'::jsonb")
execute(~s(ALTER TABLE users
- ALTER COLUMN following SET DEFAULT ARRAY[]::character varying[],
ALTER COLUMN tags SET DEFAULT ARRAY[]::character varying[],
ALTER COLUMN notification_settings SET DEFAULT
'{"followers": true, "follows": true, "non_follows": true, "non_followers": true}'::jsonb))
@@ -46,7 +45,6 @@ defmodule Pleroma.Repo.Migrations.AddDefaultsToTables do
"UPDATE users SET pleroma_settings_store = '{}'::jsonb where pleroma_settings_store IS NULL"
)
- execute("UPDATE users SET following = ARRAY[]::character varying[] WHERE following IS NULL")
execute("UPDATE users SET tags = ARRAY[]::character varying[] WHERE tags IS NULL")
execute(~s(UPDATE users SET notification_settings =
'{"followers": true, "follows": true, "non_follows": true, "non_followers": true}'::jsonb
@@ -64,7 +62,6 @@ defmodule Pleroma.Repo.Migrations.AddDefaultsToTables do
ALTER COLUMN data DROP DEFAULT")
execute("ALTER TABLE users
- ALTER COLUMN following DROP DEFAULT,
ALTER COLUMN tags DROP DEFAULT,
ALTER COLUMN notification_settings SET DEFAULT '{}'::jsonb")
end
diff --git a/priv/repo/migrations/20191026191910_set_not_null_for_users.exs b/priv/repo/migrations/20191026191910_set_not_null_for_users.exs
index f145a89ab..9d8d0ccf8 100644
--- a/priv/repo/migrations/20191026191910_set_not_null_for_users.exs
+++ b/priv/repo/migrations/20191026191910_set_not_null_for_users.exs
@@ -8,7 +8,6 @@ defmodule Pleroma.Repo.Migrations.SetNotNullForUsers do
execute("UPDATE users SET follower_count = 0 WHERE follower_count IS NULL")
execute("ALTER TABLE users
- ALTER COLUMN following SET NOT NULL,
ALTER COLUMN local SET NOT NULL,
ALTER COLUMN source_data SET NOT NULL,
ALTER COLUMN note_count SET NOT NULL,
@@ -27,7 +26,6 @@ defmodule Pleroma.Repo.Migrations.SetNotNullForUsers do
def down do
execute("ALTER TABLE users
- ALTER COLUMN following DROP NOT NULL,
ALTER COLUMN local DROP NOT NULL,
ALTER COLUMN source_data DROP NOT NULL,
ALTER COLUMN note_count DROP NOT NULL,