From ded2f7b529e2f3e8d138a2516ae7d0637fba3850 Mon Sep 17 00:00:00 2001 From: Lars Noack Date: Fri, 2 Dec 2022 10:59:22 +0100 Subject: [PATCH] started new Databse Schematic --- src/music_kraken/static_files/new_db.sql | 37 +++++++++++++++--------- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/src/music_kraken/static_files/new_db.sql b/src/music_kraken/static_files/new_db.sql index 8fb79d8..c72bd82 100644 --- a/src/music_kraken/static_files/new_db.sql +++ b/src/music_kraken/static_files/new_db.sql @@ -12,20 +12,6 @@ CREATE TABLE Source FOREIGN KEY(song_id) REFERENCES Song(id) ); -CREATE TABLE Target -( - id BIGINT AUTO_INCREMENT PRIMARY KEY, - song_id BIGINT, - FOREIGN KEY(song_id) REFERENCES Song(id) -); - -CREATE TABLE Lyrics -( - id BIGINT AUTO_INCREMENT PRIMARY KEY, - song_id BIGINT, - FOREIGN KEY(song_id) REFERENCES Song(id) -); - CREATE TABLE Artist ( id INTEGER AUTO_INCREMENT PRIMARY KEY, @@ -40,6 +26,23 @@ CREATE TABLE Album FOREIGN KEY(song_id) REFERENCES Song(id) ); +CREATE TABLE Target +( + id BIGINT AUTO_INCREMENT PRIMARY KEY, + song_id BIGINT, + FOREIGN KEY(song_id) REFERENCES Song(id) +); + +CREATE TABLE Lyrics +( + id BIGINT AUTO_INCREMENT PRIMARY KEY, + song_id BIGINT, + FOREIGN KEY(song_id) REFERENCES Song(id) +); + +CREATE TABLE EasyId3 +( +); CREATE TABLE SongArtist ( @@ -56,3 +59,9 @@ CREATE TABLE AlbumArtist FOREIGN KEY(album_id) REFERENCES Album(id), FOREIGN KEY(artist_id) REFERENCES Artist(id) ); + + +SELECT + Song.id, + Song.name +FROM Song