summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorniliara-edu <nil.jimeno@estudiant.fjaverianas.com>2025-01-26 12:25:13 +0100
committerniliara-edu <nil.jimeno@estudiant.fjaverianas.com>2025-01-26 12:25:13 +0100
commit5898e5ab4359945ef52dc7460bb2937a85603fc2 (patch)
tree0ef4c760bd6e30df2897e9cc725552ef54e51983 /scripts
parente3f0f700bf2de3b8e7d7c72893a4d6cb128f000d (diff)
authentication done
Diffstat (limited to 'scripts')
-rw-r--r--scripts/create_db.sql9
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/create_db.sql b/scripts/create_db.sql
index 405fa96..56423f5 100644
--- a/scripts/create_db.sql
+++ b/scripts/create_db.sql
@@ -34,9 +34,18 @@ CREATE TABLE song (
FOREIGN KEY (album_id) REFERENCES album(id)
);
+CREATE OR REPLACE TABLE user (
+ id int auto_increment,
+ name varchar(255) unique,
+ password varchar(510),
+ primary key(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;
+ALTER TABLE user CONVERT TO CHARACTER SET utf8;
GRANT ALL PRIVILEGES ON balalaika.* TO 'balalaika_user'@'%' WITH GRANT OPTION;
FLUSH PRIVILEGES;
+