Added 0.3 migration scripts #428
This commit is contained in:
parent
aec7dac4c7
commit
d93c3ad6c7
4
bot/src/bot_data/scripts/0.3/Api_down.sql
Normal file
4
bot/src/bot_data/scripts/0.3/Api_down.sql
Normal file
@ -0,0 +1,4 @@
|
||||
DROP TABLE `AuthUsers`;
|
||||
|
||||
DROP TABLE `AuthUserUsersRelations`;
|
||||
|
31
bot/src/bot_data/scripts/0.3/Api_up.sql
Normal file
31
bot/src/bot_data/scripts/0.3/Api_up.sql
Normal file
@ -0,0 +1,31 @@
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `AuthUsers` (
|
||||
`Id` BIGINT NOT NULL AUTO_INCREMENT,
|
||||
`FirstName` VARCHAR(255),
|
||||
`LastName` VARCHAR(255),
|
||||
`EMail` VARCHAR(255),
|
||||
`Password` VARCHAR(255),
|
||||
`PasswordSalt` VARCHAR(255),
|
||||
`RefreshToken` VARCHAR(255),
|
||||
`ConfirmationId` VARCHAR(255) DEFAULT NULL,
|
||||
`ForgotPasswordId` VARCHAR(255) DEFAULT NULL,
|
||||
`OAuthId` VARCHAR(255) DEFAULT NULL,
|
||||
`RefreshTokenExpiryTime` DATETIME(6) NOT NULL,
|
||||
`AuthRole` INT NOT NULL DEFAULT 0,
|
||||
`CreatedAt` DATETIME(6) NOT NULL,
|
||||
`LastModifiedAt` DATETIME(6) NOT NULL,
|
||||
PRIMARY KEY(`Id`)
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `AuthUserUsersRelations`(
|
||||
`Id` BIGINT NOT NULL AUTO_INCREMENT,
|
||||
`AuthUserId` BIGINT DEFAULT NULL,
|
||||
`UserId` BIGINT DEFAULT NULL,
|
||||
`CreatedAt` DATETIME(6) NOT NULL,
|
||||
`LastModifiedAt` DATETIME(6) NOT NULL,
|
||||
PRIMARY KEY(`Id`),
|
||||
FOREIGN KEY (`AuthUserId`) REFERENCES `AuthUsers`(`Id`),
|
||||
FOREIGN KEY (`UserId`) REFERENCES `Users`(`UserId`)
|
||||
);
|
||||
|
||||
|
2
bot/src/bot_data/scripts/0.3/Level_down.sql
Normal file
2
bot/src/bot_data/scripts/0.3/Level_down.sql
Normal file
@ -0,0 +1,2 @@
|
||||
DROP TABLE `Levels`;
|
||||
|
14
bot/src/bot_data/scripts/0.3/Level_up.sql
Normal file
14
bot/src/bot_data/scripts/0.3/Level_up.sql
Normal file
@ -0,0 +1,14 @@
|
||||
CREATE TABLE IF NOT EXISTS `Levels` (
|
||||
`Id` BIGINT NOT NULL AUTO_INCREMENT,
|
||||
`Name` VARCHAR(255) NOT NULL,
|
||||
`Color` VARCHAR(8) NOT NULL,
|
||||
`MinXp` BIGINT NOT NULL,
|
||||
`PermissionInt` BIGINT NOT NULL,
|
||||
`ServerId` BIGINT,
|
||||
`CreatedAt` DATETIME(6),
|
||||
`LastModifiedAt` DATETIME(6),
|
||||
PRIMARY KEY(`Id`),
|
||||
FOREIGN KEY (`ServerId`) REFERENCES `Servers`(`ServerId`)
|
||||
);
|
||||
|
||||
|
2
bot/src/bot_data/scripts/0.3/Stats_down.sql
Normal file
2
bot/src/bot_data/scripts/0.3/Stats_down.sql
Normal file
@ -0,0 +1,2 @@
|
||||
DROP TABLE `Statistics`;
|
||||
|
13
bot/src/bot_data/scripts/0.3/Stats_up.sql
Normal file
13
bot/src/bot_data/scripts/0.3/Stats_up.sql
Normal file
@ -0,0 +1,13 @@
|
||||
CREATE TABLE IF NOT EXISTS `Statistics` (
|
||||
`Id` BIGINT NOT NULL AUTO_INCREMENT,
|
||||
`Name` VARCHAR(255) NOT NULL,
|
||||
`Description` VARCHAR(255) NOT NULL,
|
||||
`Code` LONGTEXT NOT NULL,
|
||||
`ServerId` BIGINT,
|
||||
`CreatedAt` DATETIME(6),
|
||||
`LastModifiedAt` DATETIME(6),
|
||||
PRIMARY KEY(`Id`),
|
||||
FOREIGN KEY (`ServerId`) REFERENCES `Servers`(`ServerId`)
|
||||
);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user