Bin will be removed on June 1, 2014 in favor of http://gist.github.com. Please save all your pastes before then. So long, and thanks for all the fish!×
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
DROP TABLE IF EXISTS `groups`;
CREATE TABLE `groups` (
  `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
  `name` VARCHAR(60) DEFAULT NULL,
  `parent_id` INT(11) NOT NULL,
  PRIMARY KEY  (`id`)
) AUTO_INCREMENT=8;
 
INSERT INTO `groups` (`id`, `name`, `parent_id`) VALUES
(1, 'Everybody', 0),
(2, 'Registered', 1),
(3, 'Manager', 2);
 
 
 
DROP TABLE IF EXISTS `users`;
CREATE TABLE `users` (
  `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
  `name` VARCHAR(60) NOT NULL,
  `username` VARCHAR(40) NOT NULL,
  `password` VARCHAR(40) NOT NULL,
  `email` VARCHAR(255) NOT NULL,
  `active` tinyint(1) NOT NULL DEFAULT '1',
  `group_id` INT(11) UNSIGNED NOT NULL DEFAULT '2',
  `modified` datetime NOT NULL,
  `created` datetime NOT NULL,
  PRIMARY KEY  (`id`),
  UNIQUE KEY `email` (`email`),
  UNIQUE KEY `username` (`username`)
) AUTO_INCREMENT=3;
 
INSERT INTO `users` (`id`, `name`, `username`, `password`, `email`, `active`, `group_id`, `modified`, `created`) VALUES
(1, 'Registered Name', 'registered', '0123456789', 'name01@somedomain.com', 1, 2, '0000-00-00 00:00:00', '0000-00-00 00:00:00'),
(2, 'Admin Name', 'admin', '0123456789', 'name01@somedomain.com', 1, 3, '0000-00-00 00:00:00', '0000-00-00 00:00:00');