Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: Correct email_tokens_token_to_nullable migration #15277

Merged
merged 1 commit into from Dec 13, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion db/migrate/20211213060445_email_tokens_token_to_nullable.rb
Expand Up @@ -11,7 +11,9 @@ def up
Migration::SafeMigrate.disable!
if DB.query_single(<<~SQL).length > 0
SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS
WHERE table_name = 'email_tokens' AND column_name = 'token'
WHERE table_schema='public'
AND table_name = 'email_tokens'
AND column_name = 'token'
SQL
execute <<~SQL
ALTER TABLE email_tokens ALTER COLUMN token DROP NOT NULL
Expand Down