From 1d99caa4ea1c925d02266c02a83888c8a47e09b4 Mon Sep 17 00:00:00 2001 From: Mari Date: Thu, 30 Dec 2021 13:50:36 -0500 Subject: [PATCH] Adds the tier list to the default migrations. --- migrations/committed/000016-tierlist.sql | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 migrations/committed/000016-tierlist.sql 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;