ALTER TABLE `users` ADD `user_role` INT(11) NOT NULL AFTER `premium_time`;

CREATE TABLE `user_roles` (
  `ID` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `admin` int(11) NOT NULL,
  `admin_settings` int(11) NOT NULL,
  `admin_members` int(11) NOT NULL,
  `admin_payment` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `user_roles`
--

INSERT INTO `user_roles` (`ID`, `name`, `admin`, `admin_settings`, `admin_members`, `admin_payment`) VALUES
(1, 'Admin', 1, 0, 0, 0),
(2, 'Member Manager', 0, 0, 1, 0),
(3, 'Admin Settings', 0, 1, 0, 0),
(4, 'Admin Payments', 0, 0, 0, 1);
ALTER TABLE `users` DROP `user_level`;
ALTER TABLE `users` ADD `premium_planid` INT(11) NOT NULL AFTER `user_role`;


UPDATE `users` SET `user_role` = 1 WHERE `username` = 'YOUR_ADMIN_USERNAME_HERE';