docs/poweradmin-mysql-db-structure.sql
changeset 82 c255196bc447
child 84 c8ebeadd438e
equal deleted inserted replaced
81:c72d6d51f3d3 82:c255196bc447
       
     1 DROP TABLE IF EXISTS `users`;
       
     2 CREATE TABLE `users` (
       
     3   `id` int(11) NOT NULL auto_increment,
       
     4   `username` varchar(16) NOT NULL default '',
       
     5   `password` varchar(34) NOT NULL default '',
       
     6   `fullname` varchar(255) NOT NULL default '',
       
     7   `email` varchar(255) NOT NULL default '',
       
     8   `description` text NOT NULL,
       
     9   `perm_templ` tinyint(11) NOT NULL default '0',
       
    10   `active` tinyint(1) NOT NULL default '0',
       
    11   PRIMARY KEY  (`id`)
       
    12 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
       
    13 
       
    14 LOCK TABLES `users` WRITE;
       
    15 INSERT INTO `users` VALUES (1,'admin','21232f297a57a5a743894a0e4a801fc3','Administrator','admin@example.net','Administrator with full rights.',1,1);
       
    16 UNLOCK TABLES;
       
    17 
       
    18 DROP TABLE IF EXISTS `perm_items`;
       
    19 CREATE TABLE `perm_items` (
       
    20   `id` int(11) NOT NULL auto_increment,
       
    21   `name` varchar(64) NOT NULL,
       
    22   `descr` text NOT NULL,
       
    23   PRIMARY KEY  (`id`)
       
    24 ) ENGINE=MyISAM AUTO_INCREMENT=62 DEFAULT CHARSET=latin1;
       
    25 
       
    26 LOCK TABLES `perm_items` WRITE;
       
    27 INSERT INTO `perm_items` VALUES (41,'zone_master_add','User is allowed to add new master zones.'),(42,'zone_slave_add','User is allowed to add new slave zones.'),(43,'zone_content_view_own','User is allowed to see the content and meta data of zones he owns.'),(44,'zone_content_edit_own','User is allowed to edit the content of zones he owns.'),(45,'zone_meta_edit_own','User is allowed to edit the meta data of zones he owns.'),(46,'zone_content_view_others','User is allowed to see the content and meta data of zones he does not own.'),(47,'zone_content_edit_others','User is allowed to edit the content of zones he does not own.'),(48,'zone_meta_edit_others','User is allowed to edit the meta data of zones he does not own.'),(49,'search','User is allowed to perform searches.'),(50,'supermaster_view','User is allowed to add view supermasters.'),(51,'supermaster_add','User is allowed to add new supermasters.'),(52,'supermaster_edit','User is allowed to edit new supermasters.'),(53,'user_is_ueberuser','User has full access. God-like. Redeemer.'),(54,'user_view_others','User is allowed to see other users and their details.'),(55,'user_add_new','User is allowed to add new users.'),(56,'user_edit_own','User is allowed to edit their own details.'),(57,'user_edit_others','User is allowed to edit other users.'),(58,'user_passwd_edit_others','User is allowed to edit the password of other users.'),(59,'user_edit_templ_perm','User is allowed to change the permission template that is assigned to a user.'),(60,'templ_perm_add','User is allowed to add new permission templates.'),(61,'templ_perm_edit','User is allowed to edit existing permission templates.');
       
    28 UNLOCK TABLES;
       
    29 
       
    30 DROP TABLE IF EXISTS `perm_templ`;
       
    31 CREATE TABLE `perm_templ` (
       
    32   `id` int(11) NOT NULL auto_increment,
       
    33   `name` varchar(128) NOT NULL,
       
    34   `descr` text NOT NULL,
       
    35   PRIMARY KEY  (`id`)
       
    36 ) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;
       
    37 
       
    38 LOCK TABLES `perm_templ` WRITE;
       
    39 INSERT INTO `perm_templ` VALUES (1,'Administrator','Administrator template with full rights.');
       
    40 UNLOCK TABLES;
       
    41 
       
    42 DROP TABLE IF EXISTS `perm_templ_items`;
       
    43 CREATE TABLE `perm_templ_items` (
       
    44   `id` int(11) NOT NULL auto_increment,
       
    45   `templ_id` int(11) NOT NULL,
       
    46   `perm_id` int(11) NOT NULL,
       
    47   PRIMARY KEY  (`id`)
       
    48 ) ENGINE=MyISAM AUTO_INCREMENT=269 DEFAULT CHARSET=latin1;
       
    49 
       
    50 LOCK TABLES `perm_templ_items` WRITE;
       
    51 INSERT INTO `perm_templ_items` VALUES (58,2,43),(268,1,43),(267,1,46),(266,1,54),(265,1,56),(264,1,58),(263,1,45),(262,1,48),(261,1,44),(260,1,47),(259,1,57),(258,1,52),(257,1,61),(57,2,51),(56,2,42),(55,2,60),(54,2,41),(256,1,59),(255,1,50),(156,3,56),(155,3,58),(254,1,55),(253,1,51),(252,1,42),(251,1,60),(250,1,41),(249,1,53);
       
    52 UNLOCK TABLES;
       
    53 
       
    54 DROP TABLE IF EXISTS `zones`;
       
    55 CREATE TABLE `zones` (
       
    56   `id` int(11) NOT NULL auto_increment,
       
    57   `domain_id` int(11) NOT NULL default '0',
       
    58   `owner` int(11) NOT NULL default '0',
       
    59   `comment` text,
       
    60   PRIMARY KEY  (`id`),
       
    61   KEY `owner` (`owner`)
       
    62 ) ENGINE=MyISAM AUTO_INCREMENT=22001 DEFAULT CHARSET=latin1;