Basic API works.

This commit is contained in:
2020-05-08 15:54:40 +02:00
parent 6837e7b4c8
commit 564ac0d24a
36 changed files with 1450 additions and 80 deletions
@@ -4,6 +4,7 @@ CREATE TABLE item (
item_id CHAR(32) NOT NULL PRIMARY KEY,
name VARCHAR(255) NOT NULL,
description TEXT NOT NULL,
quantity_unit VARCHAR(255),
image_url VARCHAR(255),
FULLTEXT(name, description)
@@ -0,0 +1,17 @@
-- +goose Up
-- +goose StatementBegin
CREATE TABLE project_status (
project_id CHAR(16) NOT NULL,
name VARCHAR(255) NOT NULL,
stage INT NOT NULL,
description VARCHAR(255) NOT NULL,
PRIMARY KEY (project_id, name),
INDEX (project_id, stage, name) # for sorting
);
-- +goose StatementEnd
-- +goose Down
-- +goose StatementBegin
DROP TABLE project_status;
-- +goose StatementEnd