salix/db/versions/.archive/10682-crimsonEucalyptus/00-firstScript.sql

16 lines
598 B
SQL

CREATE TABLE bs.clientDiedPeriod (
id int(10) unsigned auto_increment NOT NULL,
countryFk mediumint(8) unsigned NOT NULL,
days int(11) NOT NULL,
CONSTRAINT clientDiedPeriod_PK PRIMARY KEY (id),
CONSTRAINT clientDiedPeriod_UN UNIQUE KEY (countryFk),
CONSTRAINT clientDiedPeriod_FK FOREIGN KEY (countryFk) REFERENCES vn.country(id) ON DELETE RESTRICT ON UPDATE CASCADE
)
ENGINE=InnoDB
DEFAULT CHARSET=utf8mb3
COLLATE=utf8mb3_unicode_ci
COMMENT='Define lo que es un periodo para los clientes de los diferentes países';
DELETE IGNORE FROM bs.nightTask
WHERE `procedure` = 'clientDied_recalc';