mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-10 19:51:00 +00:00
(fix)(launcher)Fix database initialization script of mysql and psotgresql.
This commit is contained in:
@@ -6,6 +6,7 @@ spring:
|
||||
password: ${S2_DB_PASSWORD:}
|
||||
sql:
|
||||
init:
|
||||
continue-on-error: true
|
||||
mode: always
|
||||
username: ${S2_DB_USER:root}
|
||||
password: ${S2_DB_PASSWORD:}
|
||||
|
||||
@@ -6,6 +6,7 @@ spring:
|
||||
password: ${S2_DB_PASSWORD:postgres}
|
||||
sql:
|
||||
init:
|
||||
continue-on-error: true
|
||||
mode: always
|
||||
username: ${S2_DB_USER:postgres}
|
||||
password: ${S2_DB_PASSWORD:postgres}
|
||||
|
||||
@@ -1,8 +1,3 @@
|
||||
-- clear data if already exists
|
||||
DELETE FROM s2_user;
|
||||
DELETE FROM s2_available_date_info;
|
||||
DELETE FROM s2_canvas;
|
||||
|
||||
-- sample user
|
||||
-- The default value for the password is 123456
|
||||
INSERT INTO s2_user (`name`, password, salt, display_name, email, is_admin) values ('admin','c3VwZXJzb25pY0BiaWNvbdktJJYWw6A3rEmBUPzbn/6DNeYnD+y3mAwDKEMS3KVT','jGl25bVBBBW96Qi9Te4V3w==','admin','admin@xx.com', 1);
|
||||
|
||||
@@ -1,8 +1,3 @@
|
||||
-- clear data if already exists
|
||||
DELETE FROM s2_user;
|
||||
DELETE FROM s2_available_date_info;
|
||||
DELETE FROM s2_canvas;
|
||||
|
||||
-- sample user
|
||||
-- The default value for the password is 123456
|
||||
insert into s2_user ("name", password, salt, display_name, email, is_admin) values ('admin','c3VwZXJzb25pY0BiaWNvbdktJJYWw6A3rEmBUPzbn/6DNeYnD+y3mAwDKEMS3KVT','jGl25bVBBBW96Qi9Te4V3w==','admin','admin@xx.com', 1);
|
||||
|
||||
@@ -41,6 +41,7 @@ CREATE TABLE IF NOT EXISTS `s2_available_date_info` (
|
||||
`updated_at` timestamp NULL,
|
||||
`updated_by` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`status` tinyint DEFAULT 0,
|
||||
UNIQUE(`item_id`, `type`),
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
@@ -382,6 +383,7 @@ CREATE TABLE IF NOT EXISTS s2_user
|
||||
salt varchar(256) DEFAULT NULL COMMENT 'md5密码盐',
|
||||
email varchar(100) null,
|
||||
is_admin tinyint null,
|
||||
UNIQUE (`name`),
|
||||
PRIMARY KEY (`id`)
|
||||
);
|
||||
|
||||
|
||||
@@ -37,7 +37,8 @@ CREATE TABLE IF NOT EXISTS s2_available_date_info (
|
||||
created_by varchar(100) NOT NULL,
|
||||
updated_at timestamp NULL,
|
||||
updated_by varchar(100) NOT NULL,
|
||||
status smallint DEFAULT 0
|
||||
status smallint DEFAULT 0,
|
||||
UNIQUE(item_id, type)
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS s2_chat (
|
||||
@@ -491,5 +492,6 @@ CREATE TABLE IF NOT EXISTS s2_user (
|
||||
password varchar(256) NULL,
|
||||
salt varchar(256) DEFAULT NULL,
|
||||
email varchar(100) NULL,
|
||||
is_admin smallint NULL
|
||||
is_admin smallint NULL,
|
||||
UNIQUE(name)
|
||||
);
|
||||
Reference in New Issue
Block a user