Skip to content

Commit

Permalink
Fixed missing table existence checks
Browse files Browse the repository at this point in the history
  • Loading branch information
timosmit committed Jan 2, 2019
1 parent 98d4a30 commit b4b2b9d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions database/new/sqlite.sql
Expand Up @@ -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`),
Expand All @@ -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`),
Expand Down
4 changes: 2 additions & 2 deletions database/upgrade/1.1.0/sqlite.sql
Expand Up @@ -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`),
Expand Down

0 comments on commit b4b2b9d

Please sign in to comment.