mirror of
https://github.com/Mezeporta/Erupe.git
synced 2026-03-21 23:22:34 +01:00
Replace 4 independent schema management code paths (Docker shell script, setup wizard pg_restore, test helpers, manual psql) with a single migration runner embedded in the server binary. The new server/migrations/ package uses Go embed to bundle all SQL schemas. On startup, Migrate() creates a schema_version tracking table, detects existing databases (auto-marks baseline as applied), and runs pending migrations in transactions. Key changes: - Consolidated init.sql + 9.2-update + 33 patches into 0001_init.sql - Setup wizard simplified to single "Apply schema" checkbox - Test helpers use migrations.Migrate() instead of pg_restore - Docker no longer needs schema volume mounts or init script - Seed data (shops, events, gacha) embedded and applied via API - Future migrations just add 0002_*.sql files — no manual steps
48 lines
1.6 KiB
PL/PgSQL
48 lines
1.6 KiB
PL/PgSQL
BEGIN;
|
|
|
|
INSERT INTO public.shop_items
|
|
(shop_type, shop_id, item_id, cost, quantity, min_hr, min_sr, min_gr, store_level, max_quantity, road_floors, road_fatalis)
|
|
VALUES
|
|
(5,5,16516,100,1,0,0,1,0,0,0,0),
|
|
(5,5,16517,100,1,0,0,1,0,0,0,0),
|
|
(6,5,9958,3,3,1,0,0,0,0,0,0),
|
|
(6,5,1897,3,1,1,0,0,0,0,0,0),
|
|
(6,5,8889,3,1,0,0,1,0,0,0,0),
|
|
(6,5,6176,3,6,1,0,0,0,0,0,0),
|
|
(6,5,1472,3,10,1,0,0,0,0,0,0),
|
|
(6,5,7280,3,3,0,0,1,0,0,0,0),
|
|
(6,5,8027,3,30,1,0,0,0,0,0,0),
|
|
(6,5,8028,3,30,1,0,0,0,0,0,0),
|
|
(6,5,8029,3,30,1,0,0,0,0,0,0),
|
|
(6,5,8026,3,30,1,0,0,0,0,0,0),
|
|
(6,5,8030,3,30,1,0,0,0,0,0,0),
|
|
(6,5,4353,3,30,1,0,0,0,0,0,0),
|
|
(6,5,4354,3,30,1,0,0,0,0,0,0),
|
|
(6,5,4355,3,30,1,0,0,0,0,0,0),
|
|
(6,5,4356,3,30,1,0,0,0,0,0,0),
|
|
(6,5,4357,3,30,1,0,0,0,0,0,0),
|
|
(6,5,4745,3,30,1,0,0,0,0,0,0),
|
|
(6,5,4746,3,30,1,0,0,0,0,0,0),
|
|
(6,5,4747,3,30,1,0,0,0,0,0,0),
|
|
(6,5,4748,3,30,1,0,0,0,0,0,0),
|
|
(6,5,4749,3,30,1,0,0,0,0,0,0),
|
|
(6,5,5122,3,30,1,0,0,0,0,0,0),
|
|
(6,5,5123,3,30,1,0,0,0,0,0,0),
|
|
(6,5,5124,3,30,1,0,0,0,0,0,0),
|
|
(6,5,5125,3,30,1,0,0,0,0,0,0),
|
|
(6,5,5126,3,30,1,0,0,0,0,0,0),
|
|
(6,5,5795,3,30,1,0,0,0,0,0,0),
|
|
(6,5,5796,3,30,1,0,0,0,0,0,0),
|
|
(6,5,5797,3,30,1,0,0,0,0,0,0),
|
|
(6,5,5798,3,30,1,0,0,0,0,0,0),
|
|
(6,5,5799,3,30,1,0,0,0,0,0,0),
|
|
(6,5,6168,3,30,1,0,0,0,0,0,0),
|
|
(6,5,6169,3,30,1,0,0,0,0,0,0),
|
|
(6,5,6170,3,30,1,0,0,0,0,0,0),
|
|
(6,5,6171,3,30,1,0,0,0,0,0,0),
|
|
(6,5,6172,3,30,1,0,0,0,0,0,0),
|
|
(7,0,13190,10,1,0,0,0,0,0,0,0),
|
|
(7,0,1662,10,1,0,0,0,0,0,0,0),
|
|
(7,0,10179,100,1,0,0,0,0,0,0,0);
|
|
|
|
END; |