refactor: refs #7792 revert TwoFactorType
gitea/salix/pipeline/pr-dev This commit looks good
Details
gitea/salix/pipeline/pr-dev This commit looks good
Details
This commit is contained in:
parent
829ecba2ef
commit
c75cc87129
|
@ -1,27 +0,0 @@
|
||||||
CREATE OR REPLACE TABLE account.twoFactorType (
|
|
||||||
`code` varchar(20) NOT NULL,
|
|
||||||
`description` varchar(255) NOT NULL,
|
|
||||||
PRIMARY KEY (`code`)
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
|
|
||||||
|
|
||||||
ALTER TABLE account.user ADD twoFactor varchar(20) NULL;
|
|
||||||
ALTER TABLE account.user ADD CONSTRAINT user_twoFactor_fk FOREIGN KEY (twoFactor) REFERENCES account.twoFactorType(code) ON DELETE CASCADE ON UPDATE CASCADE;
|
|
||||||
|
|
||||||
ALTER TABLE vn.department ADD twoFactor varchar(20) NULL;
|
|
||||||
ALTER TABLE vn.department ADD CONSTRAINT department_twoFactor_fk FOREIGN KEY (twoFactor) REFERENCES account.twoFactorType(code) ON DELETE CASCADE ON UPDATE CASCADE;
|
|
||||||
|
|
||||||
INSERT INTO account.twoFactorType (code, description)
|
|
||||||
VALUES('email', 'Envia un código por email');
|
|
||||||
|
|
||||||
UPDATE account.`user` u
|
|
||||||
JOIN account.`user` u2 ON u.id = u2.id
|
|
||||||
SET u.twoFactor = u.twoFactor
|
|
||||||
WHERE u2.twoFactor IS NOT NULL;
|
|
||||||
|
|
||||||
UPDATE vn.`department` d
|
|
||||||
JOIN vn.`department` d2 ON d.id = d2.id
|
|
||||||
SET d.twoFactor = d.twoFactor
|
|
||||||
WHERE d2.twoFactor IS NOT NULL;
|
|
||||||
|
|
||||||
ALTER TABLE account.user CHANGE twoFactor twoFactor__ enum('email') CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL NULL COMMENT 'Deprecated 2024-09-09';
|
|
||||||
ALTER TABLE vn.department CHANGE twoFactor twoFactor__ enum('email') CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL NULL COMMENT 'Deprecated 2024-09-09';
|
|
Loading…
Reference in New Issue