summaryrefslogtreecommitdiff
path: root/rust/scripts/populate/create_db.sql
diff options
context:
space:
mode:
authornil <nil@tfwhyno.gf>2024-10-02 17:48:56 +0200
committernil <nil@tfwhyno.gf>2024-10-02 17:48:56 +0200
commit0972fa6eab8c9111311f082ba8abfdc6b4a40945 (patch)
tree4eedbdc1a7cfdeee9d651c9871a9f26ab6da56d4 /rust/scripts/populate/create_db.sql
parent012c2c03b29a987ca4eead023ded22e01aa7477b (diff)
commit changes
Diffstat (limited to 'rust/scripts/populate/create_db.sql')
-rw-r--r--rust/scripts/populate/create_db.sql39
1 files changed, 0 insertions, 39 deletions
diff --git a/rust/scripts/populate/create_db.sql b/rust/scripts/populate/create_db.sql
deleted file mode 100644
index cfde7b0..0000000
--- a/rust/scripts/populate/create_db.sql
+++ /dev/null
@@ -1,39 +0,0 @@
-CREATE DATABASE IF NOT EXISTS balalaika;
-USE balalaika;
-
-DROP TABLE IF EXISTS song;
-DROP TABLE IF EXISTS album;
-DROP TABLE IF EXISTS artist;
-
-CREATE TABLE artist (
- id int NOT NULL AUTO_INCREMENT,
- name varchar(255),
-
- PRIMARY KEY (id)
-);
-
-CREATE TABLE album (
- id int NOT NULL AUTO_INCREMENT,
- name varchar(255),
- cover varchar(255),
- artist_id int,
- release DATE,
-
- PRIMARY KEY (id),
- FOREIGN KEY (artist_id) REFERENCES artist(id)
-);
-
-CREATE TABLE song (
- id int NOT NULL AUTO_INCREMENT,
- name varchar(255),
- lyrics TEXT,
-
- album_id int,
-
- PRIMARY KEY (id),
- FOREIGN KEY (album_id) REFERENCES album(id)
-);
-
-ALTER TABLE song CONVERT TO CHARACTER SET utf8;
-ALTER TABLE album CONVERT TO CHARACTER SET utf8;
-ALTER TABLE artist CONVERT TO CHARACTER SET utf8;