mirror of
https://github.com/Mezeporta/Erupe.git
synced 2026-03-22 15:43:49 +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
45 lines
1.5 KiB
PL/PgSQL
45 lines
1.5 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
|
|
(8,5,1,30,10,0,0,0,0,10,0,0),
|
|
(8,5,2,60,10,0,0,0,0,10,0,0),
|
|
(8,5,3,60,10,0,0,0,0,10,0,0),
|
|
(8,5,4,30,10,0,0,0,0,10,0,0),
|
|
(8,5,5,60,10,0,0,0,0,10,0,0),
|
|
(8,5,6,80,10,0,0,0,1,10,0,0),
|
|
(8,5,7,80,10,0,0,0,1,10,0,0),
|
|
(8,5,8,80,10,0,0,0,1,10,0,0),
|
|
(8,5,9,100,10,0,0,0,2,10,0,0),
|
|
(8,5,10,100,10,0,0,0,2,10,0,0),
|
|
(8,5,11,100,10,0,0,0,2,10,0,0),
|
|
(8,5,12,100,10,0,0,0,2,10,0,0),
|
|
(8,5,13,100,10,0,0,0,2,10,0,0),
|
|
(8,5,14,200,10,0,0,0,2,10,0,0),
|
|
(8,5,15,500,10,0,0,0,3,10,0,0),
|
|
(8,5,16,1000,10,0,0,0,3,10,0,0),
|
|
(8,5,20,30,10,0,0,0,0,10,0,0),
|
|
(8,5,21,30,10,0,0,0,0,10,0,0),
|
|
(8,5,22,60,10,0,0,0,0,10,0,0),
|
|
(8,5,23,60,10,0,0,0,0,10,0,0),
|
|
(8,5,24,60,10,0,0,0,0,10,0,0),
|
|
(8,5,25,80,10,0,0,0,1,10,0,0),
|
|
(8,5,26,80,10,0,0,0,1,10,0,0),
|
|
(8,5,27,500,10,0,0,1,3,10,0,0),
|
|
(8,5,28,60,10,0,0,0,0,10,0,0),
|
|
(8,5,29,60,10,299,0,0,0,10,0,0),
|
|
(8,5,30,100,10,0,0,1,3,10,0,0),
|
|
(8,5,31,80,10,299,0,0,1,10,0,0),
|
|
(8,5,32,80,10,299,0,0,1,10,0,0),
|
|
(8,5,33,80,10,299,0,0,1,10,0,0),
|
|
(8,7,2209,400,1,299,0,0,2,5,0,0),
|
|
(8,7,2208,400,1,299,0,0,2,5,0,0),
|
|
(8,7,5113,400,1,299,0,0,2,5,0,0),
|
|
(8,7,3571,400,1,299,0,0,2,5,0,0),
|
|
(8,7,3572,400,1,299,0,0,2,5,0,0),
|
|
(8,7,3738,400,1,299,0,0,2,5,0,0),
|
|
(8,7,3737,400,1,299,0,0,2,5,0,0),
|
|
(8,7,4399,400,1,299,0,0,2,5,0,0);
|
|
|
|
END; |