lifecycle: fix otp merge migration (#7315)
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
parent
134799c734
commit
940492a5e1
|
@ -2,6 +2,7 @@
|
||||||
from lifecycle.migrate import BaseMigration
|
from lifecycle.migrate import BaseMigration
|
||||||
|
|
||||||
SQL_STATEMENT = """
|
SQL_STATEMENT = """
|
||||||
|
BEGIN TRANSACTION;
|
||||||
DELETE FROM django_migrations WHERE app = 'otp_static';
|
DELETE FROM django_migrations WHERE app = 'otp_static';
|
||||||
DELETE FROM django_migrations WHERE app = 'otp_totp';
|
DELETE FROM django_migrations WHERE app = 'otp_totp';
|
||||||
-- Rename tables (static)
|
-- Rename tables (static)
|
||||||
|
@ -12,6 +13,7 @@ ALTER SEQUENCE otp_static_staticdevice_id_seq RENAME TO authentik_stages_authent
|
||||||
-- Rename tables (totp)
|
-- Rename tables (totp)
|
||||||
ALTER TABLE otp_totp_totpdevice RENAME TO authentik_stages_authenticator_totp_totpdevice;
|
ALTER TABLE otp_totp_totpdevice RENAME TO authentik_stages_authenticator_totp_totpdevice;
|
||||||
ALTER SEQUENCE otp_totp_totpdevice_id_seq RENAME TO authentik_stages_authenticator_totp_totpdevice_id_seq;
|
ALTER SEQUENCE otp_totp_totpdevice_id_seq RENAME TO authentik_stages_authenticator_totp_totpdevice_id_seq;
|
||||||
|
COMMIT;
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
|
Reference in New Issue