add new fields to logs and goals.
continuous-integration/drone/push Build is passing

This commit is contained in:
2021-01-17 19:01:13 +01:00
parent 3085b8c025
commit eeba5bc9c8
20 changed files with 342 additions and 67 deletions
@@ -0,0 +1,15 @@
-- +goose Up
-- +goose StatementBegin
ALTER TABLE goal
ADD COLUMN composition_mode TEXT NOT NULL DEFAULT 'item',
ADD COLUMN unweighted BOOL NOT NULL DEFAULT false,
ADD COLUMN item_id CHAR(16) DEFAULT NULL;
-- +goose StatementEnd
-- +goose Down
-- +goose StatementBegin
ALTER TABLE goal
DROP COLUMN composition_mode,
DROP COLUMN unweighted,
DROP COLUMN item_id;
-- +goose StatementEnd
@@ -0,0 +1,15 @@
-- +goose Up
-- +goose StatementBegin
ALTER TABLE log
ADD COLUMN item_amount INT NOT NULL DEFAULT 1,
ADD COLUMN secondary_item_id CHAR(16) DEFAULT NULL,
ADD COLUMN secondary_item_amount INT NOT NULL DEFAULT 0;
-- +goose StatementEnd
-- +goose Down
-- +goose StatementBegin
ALTER TABLE log
DROP COLUMN item_amount,
DROP COLUMN secondary_item_id,
DROP COLUMN secondary_item_amount;
-- +goose StatementEnd