mirror of
https://github.com/Mezeporta/Erupe.git
synced 2026-03-22 23:54:33 +01:00
The distribution table had a `data bytea NOT NULL` column that was never read by the Go code — item data is stored in distribution_items instead. The NOT NULL constraint forced dummy values in seed data and test inserts. Remove the column from the baseline schema, seed data, and tests, and add migration 0005 to drop it from existing databases.
11 lines
849 B
PL/PgSQL
11 lines
849 B
PL/PgSQL
BEGIN;
|
|
|
|
-- Adds a Distribution that can be accepted up to 20 times that gives one of Item Type 30 (Item Box extra page)
|
|
INSERT INTO distribution (type, event_name, description, times_acceptable) VALUES (1, 'Extra Item Storage', '~C05Adds one new page to your Item Box.', 20);
|
|
INSERT INTO distribution_items (distribution_id, item_type, quantity) VALUES ((SELECT id FROM distribution ORDER BY id DESC LIMIT 1), 30, 1);
|
|
|
|
-- Adds a Distribution that can be accepted up to 20 times that gives one of Item Type 31 (Equipment Box extra page)
|
|
INSERT INTO distribution (type, event_name, description, times_acceptable) VALUES (1, 'Extra Equipment Storage', '~C05Adds one new page to your Equipment Box.', 20);
|
|
INSERT INTO distribution_items (distribution_id, item_type, quantity) VALUES ((SELECT id FROM distribution ORDER BY id DESC LIMIT 1), 31, 1);
|
|
|
|
END; |