-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathminiPlayer.sql
23 lines (21 loc) · 1.24 KB
/
miniPlayer.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
CREATE DATABASE IF NOT EXISTS `miniplayer` /*!40100 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci */;
USE `miniplayer`;
CREATE TABLE IF NOT EXISTS `user` (
`id` int(4) NOT NULL AUTO_INCREMENT,
`read_only` tinyint(1) NOT NULL DEFAULT '0',
`username` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
`hash_passwd` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `username` (`username`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE IF NOT EXISTS `user_data` (
`id` int(5) NOT NULL AUTO_INCREMENT,
`user_id` int(4) NOT NULL,
`song_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
`img_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
`lyric` text(65535) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
`favorited` tinyint(1) NOT NULL DEFAULT '0',
`song_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'UNKOWN',
`composer` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'UNKOWN',
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;