Skip to content

Commit

Permalink
Add tutorial_maps table
Browse files Browse the repository at this point in the history
Fixes #148
  • Loading branch information
1-alex98 authored and micheljung committed May 4, 2018
1 parent 4e4d8c2 commit 91595aa
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions migrations/V49__tutorial-maps.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
CREATE TABLE tutorial_category (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
`category_key` VARCHAR(255) NOT NULL
);

CREATE TABLE tutorial (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
`map_version_id` MEDIUMINT(8) UNSIGNED,
CONSTRAINT tutorial_map_version FOREIGN KEY (`map_version_id`) REFERENCES map_version (id),
`title_key` VARCHAR(255) NOT NULL
COMMENT 'The key for the title of the tutorial shown in client',
`description_key` VARCHAR(255)
COMMENT 'The key for the description of the tutorial, the text in the messages table must be in HTML',
`category` INT UNSIGNED NOT NULL,
CONSTRAINT tutorial_category FOREIGN KEY (`category`) REFERENCES tutorial_category (id),
`image` VARCHAR(255)
COMMENT 'The ''image''-path for to a preview image of the tutorial, relative to the base url defined in the api',
`ordinal` INT NOT NULL
COMMENT 'The ''ordinal'' which defines in which order the tutorials are shown in the client (within their category)',
`launchable` TINYINT(1) NOT NULL
COMMENT 'Boolean that defines whether or not the tutorial can be launched',
`technical_name` VARCHAR(255) NOT NULL
COMMENT 'The ''technical_name'' of the tutorial given to the tutorial mod to decide what tutorial to start, when implemented',
`create_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
`update_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
);

0 comments on commit 91595aa

Please sign in to comment.