mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-13 00:32:16 -05:00
Make sure email_access_validated_at is not null after being populated
This commit is contained in:
@@ -22,8 +22,6 @@ def upgrade():
|
|||||||
users
|
users
|
||||||
SET
|
SET
|
||||||
email_access_validated_at = created_at
|
email_access_validated_at = created_at
|
||||||
WHERE
|
|
||||||
auth_type = 'sms_auth'
|
|
||||||
""")
|
""")
|
||||||
op.execute("""
|
op.execute("""
|
||||||
UPDATE
|
UPDATE
|
||||||
@@ -32,6 +30,8 @@ def upgrade():
|
|||||||
email_access_validated_at = logged_in_at
|
email_access_validated_at = logged_in_at
|
||||||
WHERE
|
WHERE
|
||||||
auth_type = 'email_auth'
|
auth_type = 'email_auth'
|
||||||
|
AND
|
||||||
|
email_access_validated_at IS NOT NULL
|
||||||
""")
|
""")
|
||||||
op.alter_column('users', 'email_access_validated_at', nullable=False)
|
op.alter_column('users', 'email_access_validated_at', nullable=False)
|
||||||
# ### end Alembic commands ###
|
# ### end Alembic commands ###
|
||||||
|
|||||||
Reference in New Issue
Block a user