This commit is contained in:
2022-04-04 13:59:17 +02:00
parent 2296b49f63
commit 87f77990e6
8 changed files with 104 additions and 76 deletions
@@ -0,0 +1,18 @@
-- +goose Up
-- +goose StatementBegin
CREATE TABLE stat (
`id` INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
`scope_id` INT NOT NULL,
`name` VARCHAR(255) NOT NULL,
`description` TEXT NOT NULL,
`weight` FLOAT NOT NULL,
`allowed_amounts` JSON,
UNIQUE (`scope_id`, `name`)
);
-- +goose StatementEnd
-- +goose Down
-- +goose StatementBegin
SELECT 'down SQL query';
-- +goose StatementEnd
@@ -0,0 +1,18 @@
-- +goose Up
-- +goose StatementBegin
CREATE TABLE IF NOT EXISTS 'project' (
`id` INT NOT NULL AUTO_INCREMENT,
`scope_id` INT NOT NULL,
`author_id` CHAR(36) NOT NULL,
`name` VARCHAR(255) NOT NULL,
`status` INT NOT NULL,
`description` TEXT NOT NULL,
UNIQUE (`scope_id`, `name`)
)
-- +goose StatementEnd
-- +goose Down
-- +goose StatementBegin
SELECT 'down SQL query';
-- +goose StatementEnd