add more squil and rename Entry to CardEntry as its child components may be useful in other contexts.

This commit is contained in:
2022-04-04 18:50:33 +02:00
parent 87f77990e6
commit ad28d0f827
14 changed files with 98 additions and 31 deletions
+1 -1
View File
@@ -14,5 +14,5 @@ CREATE TABLE stat (
-- +goose Down
-- +goose StatementBegin
SELECT 'down SQL query';
DROP TABLE IF EXISTS stat;
-- +goose StatementEnd
@@ -1,7 +1,7 @@
-- +goose Up
-- +goose StatementBegin
CREATE TABLE IF NOT EXISTS 'project' (
`id` INT NOT NULL AUTO_INCREMENT,
CREATE TABLE project (
`id` INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
`scope_id` INT NOT NULL,
`author_id` CHAR(36) NOT NULL,
`name` VARCHAR(255) NOT NULL,
@@ -14,5 +14,5 @@ CREATE TABLE IF NOT EXISTS 'project' (
-- +goose Down
-- +goose StatementBegin
SELECT 'down SQL query';
DROP TABLE IF EXISTS project;
-- +goose StatementEnd
@@ -0,0 +1,16 @@
-- +goose Up
-- +goose StatementBegin
CREATE TABLE project_requirement (
`id` INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
`scope_id` INT NOT NULL,
`project_id` INT NOT NULL,
`name` VARCHAR(255) NOT NULL,
`status` INT NOT NULL,
`description` TEXT NOT NULL
)
-- +goose StatementEnd
-- +goose Down
-- +goose StatementBegin
DROP TABLE IF EXISTS project_requirement;
-- +goose StatementEnd
@@ -0,0 +1,19 @@
-- +goose Up
-- +goose StatementBegin
CREATE TABLE item (
`id` INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
`scope_id` INT NOT NULL,
`project_requirement_id` INT,
`name` VARCHAR(255) NOT NULL,
`description` TEXT NOT NULL,
`created_time` DATETIME NOT NULL,
`created_user_id` CHAR(36) NOT NULL,
`acquired_time` DATETIME,
`scheduled_date` DATE
)
-- +goose StatementEnd
-- +goose Down
-- +goose StatementBegin
DROP TABLE IF EXISTS item;
-- +goose StatementEnd
@@ -0,0 +1,17 @@
-- +goose Up
-- +goose StatementBegin
CREATE TABLE item_stat_progress (
`item_id` INT NOT NULL,
`stat_id` INT NOT NULL,
`acquired` INT NOT NULL,
`required` INT NOT NULL,
PRIMARY KEY (`item_id`, `stat_id`),
UNIQUE (`stat_id`, `item_id`)
)
-- +goose StatementEnd
-- +goose Down
-- +goose StatementBegin
DROP TABLE IF EXISTS item_stat_progress;
-- +goose StatementEnd
@@ -0,0 +1,15 @@
-- +goose Up
-- +goose StatementBegin
CREATE TABLE project_requirement_stat (
`project_requirement_id` INT NOT NULL,
`stat_id` INT NOT NULL,
`required` INT NOT NULL,
PRIMARY KEY (`project_requirement_id`, `stat_id`)
)
-- +goose StatementEnd
-- +goose Down
-- +goose StatementBegin
DROP TABLE IF EXISTS project_requirement_stat;
-- +goose StatementEnd