Adjust migration and pull in main fix

This commit is contained in:
Andrew Shumway
2025-04-08 09:21:27 -06:00
parent 7bbb9c4552
commit ef6b741dcb
2 changed files with 49 additions and 248 deletions

View File

@@ -36,10 +36,19 @@ def upgrade():
"auth_type": AuthType.SMS,
}
conn = op.get_bind()
# delete the old user because
delete_sql = f"""
delete from users where email_address='{email_address}'
"""
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)
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)

288
poetry.lock generated

File diff suppressed because it is too large Load Diff