Advertisement
Braber01

Updated Create Table Cards

Oct 1st, 2012
371
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. create table CARDS(
  3. `id`INT NOT NULL AUTO_INCREMENT,
  4. `CardName` VARCHAR(50) NOT NULL,
  5. `CManaCost` INT NOT NULL,
  6. `Type` ENUM('Creature','Enchantment','Sorcery','Instant','Land') NOT NULL,
  7. `Rarity` ENUM('Mythic','Rare','Uncommon','Common','Land') NOT NULL,
  8. `Color` ENUM('None','White','Green','Black','Red','Blue') NOT NULL,
  9. `CORE_SETS` INT NULL,
  10. `DUEL_DECKS` INT NULL,
  11. `EXP_SETS` INT NULL,
  12. `PLANECHASE` INT NULL,
  13. `PREMIUM` INT NULL,
  14. `REPRINTS` INT NULL,
  15. PRIMARY KEY(`id`),
  16. CONSTRAINT CoreSetFK REFERENCES CORE_SETS(`id`)
  17.         ON DELETE CASCADE,
  18. CONSTRAINT DuelDecksFK REFERENCES DUEL_DECKS(`id`)
  19.         ON DELETE CASCADE,
  20. CONSTRAINT ExpSetsFK REFERENCES EXP_SETS(`id`)
  21.         ON DELETE CASCADE,
  22. CONSTRAINT VaultFK REFERENCES FROM_THE_VAULT(`id`)
  23.         ON DELETE CASCADE,
  24. CONSTRAINT PlaneChaseFK REFERENCES PLANECHASE(`id`)
  25.         ON DELETE CASCADE,
  26. CONSTRAINT PremiumFK REFERENCES PREMIUM(`id`)
  27.         ON DELETE CASCADE,
  28. CONSTRAINT ReprintFK REFERENCES REPRINTS(`id`)
  29.         ON DELETE CASCADE
  30. );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement