Fix SetNotNullForUsers migration

This commit is contained in:
Egor Kislitsyn 2019-10-28 14:45:50 +07:00
parent 2480200759
commit 3c86a0ab24
No known key found for this signature in database
GPG key ID: 1B49CB15B71E7805

View file

@ -8,7 +8,6 @@ def up do
execute("UPDATE users SET follower_count = 0 WHERE follower_count IS NULL") execute("UPDATE users SET follower_count = 0 WHERE follower_count IS NULL")
execute("ALTER TABLE users execute("ALTER TABLE users
ALTER COLUMN following SET NOT NULL,
ALTER COLUMN local SET NOT NULL, ALTER COLUMN local SET NOT NULL,
ALTER COLUMN source_data SET NOT NULL, ALTER COLUMN source_data SET NOT NULL,
ALTER COLUMN note_count SET NOT NULL, ALTER COLUMN note_count SET NOT NULL,
@ -27,7 +26,6 @@ def up do
def down do def down do
execute("ALTER TABLE users execute("ALTER TABLE users
ALTER COLUMN following DROP NOT NULL,
ALTER COLUMN local DROP NOT NULL, ALTER COLUMN local DROP NOT NULL,
ALTER COLUMN source_data DROP NOT NULL, ALTER COLUMN source_data DROP NOT NULL,
ALTER COLUMN note_count DROP NOT NULL, ALTER COLUMN note_count DROP NOT NULL,