-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #832 from PennyDreadfulMTG/dark-ages
Various improvements
- Loading branch information
Showing
152 changed files
with
4,083 additions
and
1,911 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,136 @@ | ||
-- Up until 2021 sets were sometimes added without codes. | ||
UPDATE cardsets SET code = 'ALA' WHERE name = 'Alara Reborn'; | ||
UPDATE cardsets SET code = 'ALL' WHERE name = 'Alliances'; | ||
UPDATE cardsets SET code = 'ATQ' WHERE name = 'Antiquities'; | ||
UPDATE cardsets SET code = 'APC' WHERE name = 'Apocalypse'; | ||
UPDATE cardsets SET code = 'ARN' WHERE name = 'Arabian Nights'; | ||
UPDATE cardsets SET code = 'AVR' WHERE name = 'Avacyn Restored'; | ||
UPDATE cardsets SET code = 'BOK' WHERE name = 'Betrayers of Kamigawa'; | ||
UPDATE cardsets SET code = 'BNG' WHERE name = 'Born of the Gods'; | ||
UPDATE cardsets SET code = 'CHK' WHERE name = 'Champions of Kamigawa'; | ||
UPDATE cardsets SET code = '6ED' WHERE name = 'Classic Sixth Edition'; | ||
UPDATE cardsets SET code = 'CSP' WHERE name = 'Coldsnap'; | ||
UPDATE cardsets SET code = 'CMD' WHERE name = 'Commander'; | ||
UPDATE cardsets SET code = 'C13' WHERE name = 'Commander 2013 Edition'; | ||
UPDATE cardsets SET code = 'C14' WHERE name = 'Commander 2014'; | ||
UPDATE cardsets SET code = 'C15' WHERE name = 'Commander 2015'; | ||
UPDATE cardsets SET code = 'C16' WHERE name = 'Commander 2016'; | ||
UPDATE cardsets SET code = 'CON' WHERE name = 'Conflux'; | ||
UPDATE cardsets SET code = 'CNS' WHERE name = 'Conspiracy'; | ||
UPDATE cardsets SET code = 'CN2' WHERE name = 'Conspiracy: Take the Crown'; | ||
UPDATE cardsets SET code = 'DKA' WHERE name = 'Dark Ascension'; | ||
UPDATE cardsets SET code = 'DST' WHERE name = 'Darksteel'; | ||
UPDATE cardsets SET code = 'DIS' WHERE name = 'Dissension'; | ||
UPDATE cardsets SET code = 'DGM' WHERE name = 'Dragon''s Maze'; | ||
UPDATE cardsets SET code = 'DTK' WHERE name = 'Dragons of Tarkir'; | ||
UPDATE cardsets SET code = 'DDH' WHERE name = 'Duel Decks: Ajani vs. Nicol Bolas'; | ||
UPDATE cardsets SET code = 'DDC' WHERE name = 'Duel Decks: Divine vs. Demonic'; | ||
UPDATE cardsets SET code = 'DDF' WHERE name = 'Duel Decks: Elspeth vs. Tezzeret'; | ||
UPDATE cardsets SET code = 'EVG' WHERE name = 'Duel Decks: Elves vs. Goblins'; | ||
UPDATE cardsets SET code = 'DDD' WHERE name = 'Duel Decks: Garruk vs. Liliana'; | ||
UPDATE cardsets SET code = 'DDJ' WHERE name = 'Duel Decks: Izzet vs. Golgari'; | ||
UPDATE cardsets SET code = 'DD2' WHERE name = 'Duel Decks: Jace vs. Chandra'; | ||
UPDATE cardsets SET code = 'DDG' WHERE name = 'Duel Decks: Knights vs. Dragons'; | ||
UPDATE cardsets SET code = 'DDE' WHERE name = 'Duel Decks: Phyrexia vs. the Coalition'; | ||
UPDATE cardsets SET code = 'DDK' WHERE name = 'Duel Decks: Sorin vs. Tibalt'; | ||
UPDATE cardsets SET code = 'DDI' WHERE name = 'Duel Decks: Venser vs. Koth'; | ||
UPDATE cardsets SET code = '8ED' WHERE name = 'Eighth Edition'; | ||
UPDATE cardsets SET code = 'EMA' WHERE name = 'Eternal Masters'; | ||
UPDATE cardsets SET code = 'EVE' WHERE name = 'Eventide'; | ||
UPDATE cardsets SET code = 'EXO' WHERE name = 'Exodus'; | ||
UPDATE cardsets SET code = 'FEM' WHERE name = 'Fallen Empires'; | ||
UPDATE cardsets SET code = 'FRF' WHERE name = 'Fate Reforged'; | ||
UPDATE cardsets SET code = '5DN' WHERE name = 'Fifth Dawn'; | ||
UPDATE cardsets SET code = '5ED' WHERE name = 'Fifth Edition'; | ||
UPDATE cardsets SET code = '4ED' WHERE name = 'Fourth Edition'; | ||
UPDATE cardsets SET code = 'V14' WHERE name = 'From the Vault: Annihilation'; | ||
UPDATE cardsets SET code = 'FUT' WHERE name = 'Future Sight'; | ||
UPDATE cardsets SET code = 'GTC' WHERE name = 'Gatecrash'; | ||
UPDATE cardsets SET code = 'GPT' WHERE name = 'Guildpact'; | ||
UPDATE cardsets SET code = 'HML' WHERE name = 'Homelands'; | ||
UPDATE cardsets SET code = 'ICE' WHERE name = 'Ice Age'; | ||
UPDATE cardsets SET code = 'IMA' WHERE name = 'Iconic Masters'; | ||
UPDATE cardsets SET code = 'ISD' WHERE name = 'Innistrad'; | ||
UPDATE cardsets SET code = 'INV' WHERE name = 'Invasion'; | ||
UPDATE cardsets SET code = 'JOU' WHERE name = 'Journey into Nyx'; | ||
UPDATE cardsets SET code = 'JUD' WHERE name = 'Judgment'; | ||
UPDATE cardsets SET code = 'KTK' WHERE name = 'Khans of Tarkir'; | ||
UPDATE cardsets SET code = 'LEG' WHERE name = 'Legends'; | ||
UPDATE cardsets SET code = 'LGN' WHERE name = 'Legions'; | ||
UPDATE cardsets SET code = 'LEA' WHERE name = 'Limited Edition Alpha'; | ||
UPDATE cardsets SET code = 'LEB' WHERE name = 'Limited Edition Beta'; | ||
UPDATE cardsets SET code = 'LRW' WHERE name = 'Lorwyn'; | ||
UPDATE cardsets SET code = 'M10' WHERE name = 'Magic 2010'; | ||
UPDATE cardsets SET code = 'M11' WHERE name = 'Magic 2011'; | ||
UPDATE cardsets SET code = 'M12' WHERE name = 'Magic 2012'; | ||
UPDATE cardsets SET code = 'M13' WHERE name = 'Magic 2013'; | ||
UPDATE cardsets SET code = 'M14' WHERE name = 'Magic 2014'; | ||
UPDATE cardsets SET code = 'M15' WHERE name = 'Magic 2015'; | ||
UPDATE cardsets SET code = 'MED' WHERE name = 'Masters Edition'; | ||
UPDATE cardsets SET code = 'ME2' WHERE name = 'Masters Edition II'; | ||
UPDATE cardsets SET code = 'ME3' WHERE name = 'Masters Edition III'; | ||
UPDATE cardsets SET code = 'ME4' WHERE name = 'Masters Edition IV'; | ||
UPDATE cardsets SET code = 'MMQ' WHERE name = 'Mercadian Masques'; | ||
UPDATE cardsets SET code = 'MIR' WHERE name = 'Mirage'; | ||
UPDATE cardsets SET code = 'MRD' WHERE name = 'Mirrodin'; | ||
UPDATE cardsets SET code = 'MBS' WHERE name = 'Mirrodin Besieged'; | ||
UPDATE cardsets SET code = 'MMA' WHERE name = 'Modern Masters'; | ||
UPDATE cardsets SET code = 'MM2' WHERE name = 'Modern Masters 2015'; | ||
UPDATE cardsets SET code = 'MM3' WHERE name = 'Modern Masters 2017 Edition'; | ||
UPDATE cardsets SET code = 'MOR' WHERE name = 'Morningtide'; | ||
UPDATE cardsets SET code = 'NEM' WHERE name = 'Nemesis'; | ||
UPDATE cardsets SET code = 'NPH' WHERE name = 'New Phyrexia'; | ||
UPDATE cardsets SET code = '9ED' WHERE name = 'Ninth Edition'; | ||
UPDATE cardsets SET code = 'ODY' WHERE name = 'Odyssey'; | ||
UPDATE cardsets SET code = 'ONS' WHERE name = 'Onslaught'; | ||
UPDATE cardsets SET code = 'PLC' WHERE name = 'Planar Chaos'; | ||
UPDATE cardsets SET code = 'HOP' WHERE name = 'Planechase'; | ||
UPDATE cardsets SET code = 'PC2' WHERE name = 'Planechase 2012 Edition'; | ||
UPDATE cardsets SET code = 'PLS' WHERE name = 'Planeshift'; | ||
UPDATE cardsets SET code = 'PCY' WHERE name = 'Prophecy'; | ||
UPDATE cardsets SET code = 'RAV' WHERE name = 'Ravnica: City of Guilds'; | ||
UPDATE cardsets SET code = 'RTR' WHERE name = 'Return to Ravnica'; | ||
UPDATE cardsets SET code = '3ED' WHERE name = 'Revised Edition'; | ||
UPDATE cardsets SET code = 'ROE' WHERE name = 'Rise of the Eldrazi'; | ||
UPDATE cardsets SET code = 'SOK' WHERE name = 'Saviors of Kamigawa'; | ||
UPDATE cardsets SET code = 'SOM' WHERE name = 'Scars of Mirrodin'; | ||
UPDATE cardsets SET code = 'SCG' WHERE name = 'Scourge'; | ||
UPDATE cardsets SET code = '7ED' WHERE name = 'Seventh Edition'; | ||
UPDATE cardsets SET code = 'SHM' WHERE name = 'Shadowmoor'; | ||
UPDATE cardsets SET code = 'ALA' WHERE name = 'Shards of Alara'; | ||
UPDATE cardsets SET code = 'STH' WHERE name = 'Stronghold'; | ||
UPDATE cardsets SET code = 'TMP' WHERE name = 'Tempest'; | ||
UPDATE cardsets SET code = 'TPR' WHERE name = 'Tempest Remastered'; | ||
UPDATE cardsets SET code = '10E' WHERE name = 'Tenth Edition'; | ||
UPDATE cardsets SET code = 'DRK' WHERE name = 'The Dark'; | ||
UPDATE cardsets SET code = 'THS' WHERE name = 'Theros'; | ||
UPDATE cardsets SET code = 'TSP' WHERE name = 'Time Spiral'; | ||
UPDATE cardsets SET code = 'TSB' WHERE name = 'Time Spiral Timeshifted Special'; | ||
UPDATE cardsets SET code = 'TOR' WHERE name = 'Torment'; | ||
UPDATE cardsets SET code = '2ED' WHERE name = 'Unlimited Edition'; | ||
UPDATE cardsets SET code = 'UDS' WHERE name = 'Urzas Destiny'; | ||
UPDATE cardsets SET code = 'ULG' WHERE name = 'Urzas Legacy'; | ||
UPDATE cardsets SET code = 'USG' WHERE name = 'Urzas Saga'; | ||
UPDATE cardsets SET code = 'PVAN' WHERE name = 'Vanguard'; | ||
UPDATE cardsets SET code = 'VMA' WHERE name = 'Vintage Masters'; | ||
UPDATE cardsets SET code = 'VIS' WHERE name = 'Visions'; | ||
UPDATE cardsets SET code = 'WTH' WHERE name = 'Weatherlight'; | ||
UPDATE cardsets SET code = 'WWK' WHERE name = 'Worldwake'; | ||
UPDATE cardsets SET code = 'ZEN' WHERE name = 'Zendikar'; | ||
-- And now we can make that column not null. | ||
ALTER TABLE cardsets ALTER COLUMN code SET NOT NULL; | ||
-- Some sets are missing their release date. | ||
UPDATE cardsets SET released = '2015-11-13' WHERE name = 'Commander 2015'; | ||
UPDATE cardsets SET released = '2016-11-11' WHERE name = 'Commander 2016'; | ||
UPDATE cardsets SET released = '2014-06-06' WHERE name = 'Conspiracy'; | ||
UPDATE cardsets SET released = '2016-08-26' WHERE name = 'Conspiracy: Take the Crown'; | ||
UPDATE cardsets SET released = '2016-06-10' WHERE name = 'Eternal Masters'; | ||
UPDATE cardsets SET released = '2014-08-22' WHERE name = 'From the Vault: Annihilation'; | ||
UPDATE cardsets SET released = '2017-11-17' WHERE name = 'Iconic Masters'; | ||
UPDATE cardsets SET released = '2015-05-22' WHERE name = 'Modern Masters 2015'; | ||
UPDATE cardsets SET released = '2017-03-17' WHERE name = 'Modern Masters 2017 Edition'; | ||
UPDATE cardsets SET released = '2015-05-06' WHERE name = 'Tempest Remastered'; | ||
-- And now we can make that column not null. | ||
ALTER TABLE cardsets ALTER COLUMN released SET NOT NULL; | ||
-- Get rid of the last updated column, we don't set it or update it anywhere. | ||
ALTER TABLE cardsets DROP COLUMN last_updated; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
-- Update the 76 events where private is not set … | ||
UPDATE events SET private = 0 WHERE private IS NULL; | ||
-- … and now make it not null. | ||
ALTER TABLE events ALTER COLUMN private SET NOT NULL; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ALTER TABLE formats DROP COLUMN is_meta_format; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.