salix/db/versions/.archive/10610-goldenArborvitae/02-invoiceOutCompany.sql

9 lines
307 B
SQL

-- SET SESSION idle_transaction_timeout = 0;
ALTER TABLE vn.`invoiceOut`
MODIFY COLUMN companyFk INT UNSIGNED DEFAULT 442 NOT NULL;
ALTER TABLE vn.`invoiceOut`
ADD CONSTRAINT `invoiceOutCompany_Fk` FOREIGN KEY IF NOT EXISTS (companyFk)
REFERENCES vn.company (id) ON DELETE RESTRICT ON UPDATE CASCADE;