feat: refs #7758 Modify code lowerCamelCase and UNIQUE
gitea/salix/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Ivan Mas 2024-08-23 11:34:26 +02:00
parent 9806265030
commit 94461cff58
4 changed files with 17 additions and 15 deletions

View File

@ -3947,9 +3947,9 @@ VALUES
INSERT INTO vn.accountDetailType INSERT INTO vn.accountDetailType
(id, description, code) (id, description, code)
VALUES VALUES
(1, 'IBAN', 'IBAN'), (1, 'IBAN', 'iban'),
(2, 'SWIFT', 'SWIFT'), (2, 'SWIFT', 'swift'),
(3, 'Referencia Remesas', 'REM'), (3, 'Referencia Remesas', 'remRef'),
(4, 'Referencia Transferencias', 'TRAN'), (4, 'Referencia Transferencias', 'trnRef'),
(5, 'Referencia Nominas', 'NOM'), (5, 'Referencia Nominas', 'payRef'),
(6, 'ABA', 'ABA'); (6, 'ABA', 'aba');

View File

@ -1,2 +1,3 @@
ALTER TABLE vn.mandateType ALTER TABLE vn.mandateType
CHANGE name code VARCHAR(45) DEFAULT NULL; CHANGE name code VARCHAR(45) NOT NULL,
ADD UNIQUE (code);

View File

@ -1,2 +1,3 @@
ALTER TABLE vn.accountDetailType ALTER TABLE vn.accountDetailType
ADD COLUMN code VARCHAR(45) DEFAULT NULL; ADD COLUMN code VARCHAR(45) NOT NULL,
ADD UNIQUE (code);

View File

@ -1,9 +1,9 @@
UPDATE vn.accountDetailType UPDATE vn.accountDetailType
SET code = CASE id SET code = CASE description
WHEN 1 THEN 'IBAN' WHEN 'IBAN' THEN 'iban'
WHEN 2 THEN 'SWIFT' WHEN 'SWIFT' THEN 'swift'
WHEN 3 THEN 'REM' WHEN 'Referencia Remesas' THEN 'remRef'
WHEN 4 THEN 'TRAN' WHEN 'Referencia Transferencias' THEN 'trnRef'
WHEN 5 THEN 'NOM' WHEN 'Referencia Nominas' THEN 'payRef'
WHEN 6 THEN 'ABA' WHEN 'ABA' THEN 'aba'
END; END;