* started schema * db schemas beginning * first db schema gen * added sqlc generation with go generate and sqlite driver * i think these dependencies are needed * added IF NOT EXISTS to create and CRUD for each table * fixed missing columns * added missing field * fixed code generation with sqlc
10 lines
303 B
SQL
10 lines
303 B
SQL
CREATE TABLE IF NOT EXISTS audio_files (
|
|
id int PRIMARY KEY,
|
|
file_path text NOT NULL UNIQUE,
|
|
length_milliseconds int NOT NULL,
|
|
file_type_id int NOT NULL,
|
|
recording_id int NOT NULL,
|
|
FOREIGN KEY(file_type_id) REFERENCES file_types(id),
|
|
FOREIGN KEY(recording_id) REFERENCES recordings(id)
|
|
);
|