Adds the tier list to the default migrations.

main
Mari 3 years ago
parent 89215ef8e9
commit 1d99caa4ea
  1. 16
      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;
Loading…
Cancel
Save