Sjoerdva97

Untitled

Jul 13th, 2018
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. CREATE TABLE `faction_ranks` (
  2. `id` int(11) NOT NULL,
  3. `faction_id` int(11) DEFAULT NULL,
  4. `name` text,
  5. `permissions` text NOT NULL,
  6. `isDefault` int(11) NOT NULL DEFAULT '0',
  7. `isLeader` int(11) NOT NULL DEFAULT '0',
  8. `wage` int(11) NOT NULL DEFAULT '0'
  9. ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  10.  
  11. INSERT INTO `faction_ranks` (`faction_id`, `name`, `wage`) SELECT `id`, `rank_20`, `wage_20` FROM `factions`;
  12. UPDATE `faction_ranks` SET `permissions` = '1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18', `isLeader` = '1'
  13.  
  14. ALTER TABLE `faction_ranks` CHANGE `isDefault` `isDefault` INT(11) NOT NULL DEFAULT '1';
  15. INSERT INTO `faction_ranks` (`faction_id`, `name`, `wage`) SELECT `id`, `rank_1`, `wage_1` FROM `factions`;
  16. ALTER TABLE `faction_ranks` CHANGE `isDefault` `isDefault` INT(11) NOT NULL DEFAULT '0';
Advertisement
Add Comment
Please, Sign In to add comment