diff --git a/migrations/committed/000016-tierlist.sql b/migrations/committed/000016-tierlist.sql new file mode 100644 index 0000000..d0e6f18 --- /dev/null +++ b/migrations/committed/000016-tierlist.sql @@ -0,0 +1,16 @@ +--! Previous: sha1:1390238abcc8e013a87b670fbcb3ae127a51ece8 +--! Hash: sha1:c36f619890ff43d233e58abb4c5b9d5a4e556ca3 +--! Message: tierlist + +ALTER TABLE UnitTier + --- The order in which the tiers are sorted, from most power to least power. + ADD COLUMN IF NOT EXISTS sortOrder SMALLSERIAL NOT NULL; +CREATE UNIQUE INDEX IF NOT EXISTS UnitTier_SortOrder ON UnitTier (sortOrder ASC); + +INSERT INTO UnitTier (id, name, pullWeight, recallCost, sortOrder) +VALUES ('s', 'S-tier', 1, 100, 0), + ('a', 'A-tier', 5, 50, 1), + ('b', 'B-tier', 10, 30, 2), + ('c', 'C-tier', 20, 20, 3), + ('d', 'D-tier', 50, 12, 4) +ON CONFLICT (id) DO NOTHING;