yat-server/migrations/2021-10-07-114611_create_lists_tasks/up.sql

8 lines
276 B
MySQL
Raw Normal View History

-- Your SQL goes here
create table if not exists lists_tasks (
id integer primary key,
list_id integer,
task_id integer not null,
foreign key (list_id) references lists(id) on delete set null,
foreign key (task_id) references tasks(id) on delete cascade
);