salix/db/versions/.archive/10302-chocolateRoebelini/02-alterTableEntry.sql

3 lines
253 B
SQL

ALTER TABLE vn.entry ADD typeFk varchar(100) DEFAULT 'product' NULL COMMENT 'Tipo de entrada, por defecto PRODUCTO';
ALTER TABLE vn.entry ADD CONSTRAINT entry_FK_1 FOREIGN KEY (typeFk) REFERENCES vn.entryType(code) ON DELETE RESTRICT ON UPDATE CASCADE;