salix/db/versions/.archive/10506-aquaPaniculata/01-firstScript.sql

13 lines
534 B
MySQL
Raw Permalink Normal View History

ALTER TABLE vn.expense
ADD COLUMN IF NOT EXISTS code VARCHAR(25) DEFAULT NULL NULL,
ADD CONSTRAINT expense_UN UNIQUE KEY IF NOT EXISTS (code);
CREATE TABLE IF NOT EXISTS sage.`taxType` (
`id` int(11) NOT NULL,
`code` varchar(25) DEFAULT NULL,
`isIntracommunity` tinyint(1) NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
UNIQUE KEY `taxType_UN` (`code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci
COMMENT='Coincidencia del id con Sage.TiposIVA.CodigoIva(propia de Sage), en ningún caso vincular mediate FK';