34968-vm/migrations/20251015_add_user_id_to_restaurants.sql
Flatlogic Bot 727b6fcf29 V10
2025-10-15 04:02:50 +00:00

2 lines
183 B
SQL

ALTER TABLE restaurants ADD COLUMN user_id INT NULL;
ALTER TABLE restaurants ADD CONSTRAINT fk_user_id FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE SET NULL ON UPDATE CASCADE;