Add backend
This commit is contained in:
@ -0,0 +1,2 @@
|
||||
DROP TABLE custom_list_entry;
|
||||
DROP TABLE custom_list;
|
||||
10
backend/migrations/2023-09-21-202738_add_custom_lists/up.sql
Normal file
10
backend/migrations/2023-09-21-202738_add_custom_lists/up.sql
Normal file
@ -0,0 +1,10 @@
|
||||
CREATE TABLE custom_list (
|
||||
id SERIAL PRIMARY KEY,
|
||||
name TEXT UNIQUE NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE custom_list_entry (
|
||||
list_id SERIAL REFERENCES custom_list(id),
|
||||
song_hash TEXT NOT NULL REFERENCES song(song_hash),
|
||||
PRIMARY KEY (list_id, song_hash)
|
||||
);
|
||||
Reference in New Issue
Block a user