Fixed missing table existence checks

This commit is contained in:
Timo Smit 2019-01-02 10:15:24 +01:00
parent 98d4a30b21
commit b4b2b9d2b0
2 changed files with 4 additions and 4 deletions

View file

@ -8,7 +8,7 @@ CREATE TABLE IF NOT EXISTS `level` (
`name` TEXT NOT NULL
);
CREATE TABLE `level_permission` (
CREATE TABLE IF NOT EXISTS `level_permission` (
`level_id` INTEGER NOT NULL,
`permission` TEXT NOT NULL,
PRIMARY KEY (`level_id`, `permission`),
@ -25,7 +25,7 @@ CREATE TABLE IF NOT EXISTS `player` (
CONSTRAINT `player_level` FOREIGN KEY (`level_id`) REFERENCES `level` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
);
CREATE TABLE `player_permission` (
CREATE TABLE IF NOT EXISTS `player_permission` (
`player_id` INTEGER NOT NULL,
`permission` TEXT NOT NULL,
PRIMARY KEY (`player_id`, `permission`),

View file

@ -33,14 +33,14 @@ CREATE TABLE IF NOT EXISTS `level` (
`name` TEXT NOT NULL
);
CREATE TABLE `level_permission` (
CREATE TABLE IF NOT EXISTS `level_permission` (
`level_id` INTEGER NOT NULL,
`permission` TEXT NOT NULL,
PRIMARY KEY (`level_id`, `permission`),
CONSTRAINT `level_permission_level` FOREIGN KEY (`level_id`) REFERENCES `level` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
);
CREATE TABLE `player_permission` (
CREATE TABLE IF NOT EXISTS `player_permission` (
`player_id` INTEGER NOT NULL,
`permission` TEXT NOT NULL,
PRIMARY KEY (`player_id`, `permission`),