mirror of
https://github.com/GSA/notifications-api.git
synced 2026-09-08 08:28:24 -04:00
Adjust migration and pull in main fix
This commit is contained in:
@@ -36,10 +36,19 @@ def upgrade():
|
|||||||
"auth_type": AuthType.SMS,
|
"auth_type": AuthType.SMS,
|
||||||
}
|
}
|
||||||
conn = op.get_bind()
|
conn = op.get_bind()
|
||||||
|
|
||||||
|
# delete the old user because
|
||||||
|
delete_sql = f"""
|
||||||
|
delete from users where email_address='{email_address}'
|
||||||
|
"""
|
||||||
|
|
||||||
insert_sql = """
|
insert_sql = """
|
||||||
insert into users (id, name, email_address, _password, mobile_number, state, created_at, password_changed_at, failed_login_count, platform_admin, email_access_validated_at, auth_type)
|
insert into users (id, name, email_address, _password, mobile_number, state, created_at, password_changed_at, failed_login_count, platform_admin, email_access_validated_at, auth_type)
|
||||||
values (:id, :name, :email_address, :password, :mobile_number, :state, :created_at, :password_changed_at, :failed_login_count, :platform_admin, :email_access_validated_at, :auth_type)
|
values (:id, :name, :email_address, :password, :mobile_number, :state, :created_at, :password_changed_at, :failed_login_count, :platform_admin, :email_access_validated_at, :auth_type)
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
conn.execute(sa.text(delete_sql))
|
||||||
|
|
||||||
conn.execute(sa.text(insert_sql), data)
|
conn.execute(sa.text(insert_sql), data)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
288
poetry.lock
generated
288
poetry.lock
generated
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user