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
(id, description, code)
VALUES
(1, 'IBAN', 'IBAN'),
(2, 'SWIFT', 'SWIFT'),
(3, 'Referencia Remesas', 'REM'),
(4, 'Referencia Transferencias', 'TRAN'),
(5, 'Referencia Nominas', 'NOM'),
(6, 'ABA', 'ABA');
(1, 'IBAN', 'iban'),
(2, 'SWIFT', 'swift'),
(3, 'Referencia Remesas', 'remRef'),
(4, 'Referencia Transferencias', 'trnRef'),
(5, 'Referencia Nominas', 'payRef'),
(6, 'ABA', 'aba');

View File

@ -1,2 +1,3 @@
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
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
SET code = CASE id
WHEN 1 THEN 'IBAN'
WHEN 2 THEN 'SWIFT'
WHEN 3 THEN 'REM'
WHEN 4 THEN 'TRAN'
WHEN 5 THEN 'NOM'
WHEN 6 THEN 'ABA'
SET code = CASE description
WHEN 'IBAN' THEN 'iban'
WHEN 'SWIFT' THEN 'swift'
WHEN 'Referencia Remesas' THEN 'remRef'
WHEN 'Referencia Transferencias' THEN 'trnRef'
WHEN 'Referencia Nominas' THEN 'payRef'
WHEN 'ABA' THEN 'aba'
END;