12 lines
178 B
MySQL
12 lines
178 B
MySQL
|
BEGIN;
|
||
|
|
||
|
ALTER TABLE logs
|
||
|
ADD COLUMN receipt_id INT;
|
||
|
|
||
|
ALTER TABLE logs
|
||
|
ADD CONSTRAINT receipts_fk
|
||
|
FOREIGN KEY (receipt_id)
|
||
|
REFERENCES receipts (id)
|
||
|
ON DELETE CASCADE;
|
||
|
|
||
|
COMMIT;
|