/*!40101 SET NAMES utf8 */;
---
--- Table structure for table `acos`
---
-
-DROP TABLE IF EXISTS `acos`;
-CREATE TABLE `acos` (
- `id` int(10) unsigned NOT NULL auto_increment,
- `parent_id` int(10) default NULL,
- `model` varchar(255) default '',
- `foreign_key` int(10) unsigned default NULL,
- `alias` varchar(255) default '',
- `lft` int(10) default NULL,
- `rght` int(10) default NULL,
- PRIMARY KEY (`id`),
- KEY `alias` (`alias`),
- KEY `lft_rght` (`lft`,`rght`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
---
--- Dumping data for table `acos`
---
-
+TRUNCATE `acos`;
LOCK TABLES `acos` WRITE;
/*!40000 ALTER TABLE `acos` DISABLE KEYS */;
INSERT INTO `acos` VALUES
/*!40000 ALTER TABLE `acos` ENABLE KEYS */;
UNLOCK TABLES;
---
--- Table structure for table `aros_acos`
---
-
-DROP TABLE IF EXISTS `aros_acos`;
-CREATE TABLE `aros_acos` (
- `id` int(10) unsigned NOT NULL auto_increment,
- `aro_id` int(10) unsigned NOT NULL,
- `aco_id` int(10) unsigned NOT NULL,
- `_create` char(2) NOT NULL default '0',
- `_read` char(2) NOT NULL default '0',
- `_update` char(2) NOT NULL default '0',
- `_delete` char(2) NOT NULL default '0',
- PRIMARY KEY (`id`),
- KEY `aro_aco` (`aro_id`,`aco_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
---
--- Dumping data for table `aros_acos`
---
+TRUNCATE `aros_acos`;
LOCK TABLES `aros_acos` WRITE;
/*!40000 ALTER TABLE `aros_acos` DISABLE KEYS */;
INSERT INTO `aros_acos` VALUES
+++ /dev/null
-/*!40101 SET NAMES utf8 */;
-
-DROP TABLE IF EXISTS `character_pictures`;
-
-CREATE TABLE `character_pictures` (
- `id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
- `user_id` INTEGER UNSIGNED NOT NULL,
- `character_id` INTEGER UNSIGNED NOT NULL,
- `public_flag` ENUM('public','private') NOT NULL DEFAULT 'public',
- `created` DATETIME NULL,
- `modified` DATETIME NULL,
- PRIMARY KEY(`id`),
- INDEX `character_pictures_public`(`public_flag`, `character_id`),
- INDEX `character_pictures_character`(`character_id`),
- INDEX `character_pictures_user`(`user_id`),
- CONSTRAINT `fk_users-character_pictures`
- FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE,
- CONSTRAINT `fk_characters-character_pictures`
- FOREIGN KEY (`character_id`) REFERENCES `characters` (`id`) ON DELETE CASCADE
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+++ /dev/null
---
--- Table structure for table `site_configs`
---
-
-DROP TABLE IF EXISTS `site_configs`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `site_configs` (
- `id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
- `key_name` VARCHAR(32) NOT NULL,
- `value` TEXT NOT NULL,
- `modified` DATETIME NOT NULL,
- PRIMARY KEY(`id`),
- UNIQUE INDEX `site_settings_key`(`key_name`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
+++ /dev/null
-DROP TABLE IF EXISTS `attachments`;
-CREATE TABLE `attachments` (
- `id` int(10) unsigned NOT NULL auto_increment,
- `user_id` INTEGER UNSIGNED NOT NULL,
- `model` varchar(255) NOT NULL,
- `foreign_key` int(10) NOT NULL,
- `dirname` varchar(255) default NULL,
- `basename` varchar(255) NOT NULL,
- `checksum` varchar(255) NOT NULL,
- `size` INTEGER UNSIGNED NOT NULL DEFAULT '0',
- `alternative` varchar(50) default NULL,
- `group` varchar(255) default NULL,
- `created` datetime default NULL,
- `modified` datetime default NULL,
- PRIMARY KEY (`id`),
- INDEX `attachments_user_id`(`user_id`),
- INDEX `attachments_model`(`model`, `foreign_key`)
-) TYPE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET NAMES utf8 */;
---
--- Table structure for table `cake_sessions`
---
+INSERT INTO `users` VALUES (NULL,1,'Administrator','admin','94b42f9e11eb5528029fcff7625904d8df3424ce','','','','',NOW(),NOW());
-DROP TABLE IF EXISTS `cake_sessions`;
-CREATE TABLE `cake_sessions` (
- `id` varchar(255) NOT NULL default '',
- `data` text,
- `expires` int(11) default NULL,
- PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-
---
--- Table structure for table `groups`
---
-
-DROP TABLE IF EXISTS `groups`;
-CREATE TABLE `groups` (
- `id` int(10) unsigned NOT NULL auto_increment,
- `name` varchar(8) default NULL,
- `parent_id` int(10) unsigned default NULL,
- PRIMARY KEY (`id`),
- KEY `groups_parent_id` (`parent_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
---
--- Dumping data for table `groups`
---
-
-LOCK TABLES `groups` WRITE;
-/*!40000 ALTER TABLE `groups` DISABLE KEYS */;
-INSERT INTO `groups` VALUES
-(1,'admin',0),
-(2,'subadmin',0),
-(3,'watcher',0),
-(4,'member',0),
-(5,'pre',0),
-(6,'locked',0),
-(7,'deleted',0),
-(8,'banned',0);
-/*!40000 ALTER TABLE `groups` ENABLE KEYS */;
-UNLOCK TABLES;
-
---
--- Table structure for table `users`
---
-
-DROP TABLE IF EXISTS `users`;
-CREATE TABLE `users` (
- `id` int(10) unsigned NOT NULL auto_increment,
- `group_id` int(10) unsigned NOT NULL,
- `name` varchar(64) NOT NULL,
- `username` varchar(40) NOT NULL,
- `password` varchar(40) NOT NULL,
- `pcmail` blob NOT NULL,
- `mobile_mail` blob NOT NULL,
- `useragent` varchar(512) NOT NULL,
- `host` varchar(64) NOT NULL,
- `created` datetime NULL default NULL,
- `modified` datetime NULL default NULL,
- PRIMARY KEY (`id`),
- UNIQUE KEY `users_username` (`username`),
- KEY `users_login` (`username`,`password`),
- KEY `users_modified` (`modified`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-INSERT INTO `users` VALUES (1,1,'Administrator','admin','94b42f9e11eb5528029fcff7625904d8df3424ce','','','','',NOW(),NOW());
-
-
---
--- Table structure for table `aros`
---
-
-DROP TABLE IF EXISTS `aros`;
-CREATE TABLE `aros` (
- `id` int(10) unsigned NOT NULL auto_increment,
- `parent_id` int(10) default NULL,
- `model` varchar(255) default '',
- `foreign_key` int(10) unsigned default NULL,
- `alias` varchar(255) default '',
- `lft` int(10) default NULL,
- `rght` int(10) default NULL,
- PRIMARY KEY (`id`),
- KEY `model_foreign_key` (`model`,`foreign_key`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
---
--- Dumping data for table `aros`
---
-
-LOCK TABLES `aros` WRITE;
-/*!40000 ALTER TABLE `aros` DISABLE KEYS */;
-INSERT INTO `aros` VALUES
-(1,NULL,'Group',1,'Group::1',1,4),
-(2,NULL,'Group',2,'Group::2',5,6),
-(3,NULL,'Group',3,'Group::3',7,8),
-(4,NULL,'Group',4,'Group::4',9,10),
-(5,NULL,'Group',5,'Group::5',11,12),
-(6,NULL,'Group',6,'Group::6',13,14),
-(7,NULL,'Group',7,'Group::7',15,16),
-(8,NULL,'Group',8,'Group::8',17,18),
-(9,1,'User',1,'User::1',2,3);
-/*!40000 ALTER TABLE `aros` ENABLE KEYS */;
-UNLOCK TABLES;
/*!40101 SET NAMES utf8 */;
+DROP TABLE IF EXISTS `character_profile_archives`;
+DROP TABLE IF EXISTS `character_pictures`;
+
DROP TABLE IF EXISTS `characters`;
DROP TABLE IF EXISTS `characters_has_profiles`;
-
DROP TABLE IF EXISTS `profile_table_statics`;
DROP TABLE IF EXISTS `profile_selects`;
DROP TABLE IF EXISTS `systems`;
+DROP TABLE IF EXISTS `attachments`;
+
+DROP TABLE IF EXISTS `aros_acos`;
+DROP TABLE IF EXISTS `acos`;
+DROP TABLE IF EXISTS `aros`;
+
+DROP TABLE IF EXISTS `users`;
+DROP TABLE IF EXISTS `groups`;
+
+DROP TABLE IF EXISTS `site_configs`;
+DROP TABLE IF EXISTS `cake_sessions`;
+
+
+CREATE TABLE `cake_sessions` (
+ `id` varchar(255) NOT NULL default '',
+ `data` text,
+ `expires` int(11) default NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `site_configs` (
+ `id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
+ `key_name` VARCHAR(32) NOT NULL,
+ `value` TEXT NOT NULL,
+ `modified` DATETIME NOT NULL,
+ PRIMARY KEY(`id`),
+ UNIQUE INDEX `site_settings_key`(`key_name`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `groups` (
+ `id` int(10) unsigned NOT NULL auto_increment,
+ `name` varchar(8) default NULL,
+ `parent_id` int(10) unsigned default NULL,
+ PRIMARY KEY (`id`),
+ KEY `groups_parent_id` (`parent_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `users` (
+ `id` int(10) unsigned NOT NULL auto_increment,
+ `group_id` int(10) unsigned NOT NULL,
+ `name` varchar(64) NOT NULL,
+ `username` varchar(40) NOT NULL,
+ `password` varchar(40) NOT NULL,
+ `pcmail` blob NOT NULL,
+ `mobile_mail` blob NOT NULL,
+ `useragent` varchar(512) NOT NULL,
+ `host` varchar(64) NOT NULL,
+ `created` datetime NULL default NULL,
+ `modified` datetime NULL default NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `users_username` (`username`),
+ KEY `users_login` (`username`,`password`),
+ KEY `users_modified` (`modified`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `aros` (
+ `id` int(10) unsigned NOT NULL auto_increment,
+ `parent_id` int(10) default NULL,
+ `model` varchar(255) default '',
+ `foreign_key` int(10) unsigned default NULL,
+ `alias` varchar(255) default '',
+ `lft` int(10) default NULL,
+ `rght` int(10) default NULL,
+ PRIMARY KEY (`id`),
+ KEY `model_foreign_key` (`model`,`foreign_key`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `acos` (
+ `id` int(10) unsigned NOT NULL auto_increment,
+ `parent_id` int(10) default NULL,
+ `model` varchar(255) default '',
+ `foreign_key` int(10) unsigned default NULL,
+ `alias` varchar(255) default '',
+ `lft` int(10) default NULL,
+ `rght` int(10) default NULL,
+ PRIMARY KEY (`id`),
+ KEY `alias` (`alias`),
+ KEY `lft_rght` (`lft`,`rght`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `aros_acos` (
+ `id` int(10) unsigned NOT NULL auto_increment,
+ `aro_id` int(10) unsigned NOT NULL,
+ `aco_id` int(10) unsigned NOT NULL,
+ `_create` char(2) NOT NULL default '0',
+ `_read` char(2) NOT NULL default '0',
+ `_update` char(2) NOT NULL default '0',
+ `_delete` char(2) NOT NULL default '0',
+ PRIMARY KEY (`id`),
+ KEY `aro_aco` (`aro_id`,`aco_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `attachments` (
+ `id` int(10) unsigned NOT NULL auto_increment,
+ `user_id` INTEGER UNSIGNED NOT NULL,
+ `model` varchar(255) NOT NULL,
+ `foreign_key` int(10) NOT NULL,
+ `dirname` varchar(255) default NULL,
+ `basename` varchar(255) NOT NULL,
+ `checksum` varchar(255) NOT NULL,
+ `size` INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ `alternative` varchar(50) default NULL,
+ `group` varchar(255) default NULL,
+ `created` datetime default NULL,
+ `modified` datetime default NULL,
+ PRIMARY KEY (`id`),
+ INDEX `attachments_user_id`(`user_id`),
+ INDEX `attachments_model`(`model`, `foreign_key`)
+) TYPE=InnoDB DEFAULT CHARSET=utf8;
+
CREATE TABLE `systems` (
`id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
`name` VARCHAR(255) NOT NULL,
FOREIGN KEY (`system_id`) REFERENCES `systems` (`id`) ON DELETE CASCADE
) TYPE=InnoDB DEFAULT CHARSET=utf8;
-CREATE TABLE `characters` (
- `id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
- `system_id` INTEGER UNSIGNED,
- `user_id` INTEGER UNSIGNED NOT NULL,
- `name` TEXT NOT NULL,
- `main_picture` VARCHAR(255) NULL,
- `full_length` VARCHAR(255) NULL,
- `notes` TEXT NOT NULL,
- `public_flag` ENUM('public','private') NOT NULL DEFAULT 'public',
- `status` ENUM('active', 'npc', 'inactive') NOT NULL DEFAULT 'active',
- `sort_order` INTEGER UNSIGNED NOT NULL DEFAULT '0',
- `deleted` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0',
- `created` DATETIME NULL,
- `modified` DATETIME NULL,
- `deleted_date` DATETIME NULL,
- PRIMARY KEY(`id`),
- INDEX `characters_user`(`user_id`, `public_flag`),
- INDEX `characters_modified`(`modified`, `public_flag`),
- INDEX `characters_sort`(`sort_order`),
- INDEX `characters_system`(`system_id`),
- CONSTRAINT `fk_systems-characters`
- FOREIGN KEY (`system_id`) REFERENCES `systems` (`id`) ON DELETE SET NULL
-) TYPE=InnoDB DEFAULT CHARSET=utf8;
-
CREATE TABLE `profiles` (
`id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
`system_id` INTEGER UNSIGNED NOT NULL,
) TYPE=InnoDB DEFAULT CHARSET=utf8;
-DROP TABLE IF EXISTS `character_profile_archives`;
+CREATE TABLE `characters` (
+ `id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
+ `system_id` INTEGER UNSIGNED,
+ `user_id` INTEGER UNSIGNED NOT NULL,
+ `name` TEXT NOT NULL,
+ `main_picture` VARCHAR(255) NULL,
+ `full_length` VARCHAR(255) NULL,
+ `notes` TEXT NOT NULL,
+ `public_flag` ENUM('public','private') NOT NULL DEFAULT 'public',
+ `status` ENUM('active', 'npc', 'inactive') NOT NULL DEFAULT 'active',
+ `sort_order` INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ `deleted` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0',
+ `created` DATETIME NULL,
+ `modified` DATETIME NULL,
+ `deleted_date` DATETIME NULL,
+ PRIMARY KEY(`id`),
+ INDEX `characters_user`(`user_id`, `public_flag`),
+ INDEX `characters_modified`(`modified`, `public_flag`),
+ INDEX `characters_sort`(`sort_order`),
+ INDEX `characters_system`(`system_id`),
+ CONSTRAINT `fk_systems-characters`
+ FOREIGN KEY (`system_id`) REFERENCES `systems` (`id`) ON DELETE SET NULL
+) TYPE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `character_pictures` (
+ `id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
+ `user_id` INTEGER UNSIGNED NOT NULL,
+ `character_id` INTEGER UNSIGNED NOT NULL,
+ `public_flag` ENUM('public','private') NOT NULL DEFAULT 'public',
+ `created` DATETIME NULL,
+ `modified` DATETIME NULL,
+ PRIMARY KEY(`id`),
+ INDEX `character_pictures_public`(`public_flag`, `character_id`),
+ INDEX `character_pictures_character`(`character_id`),
+ INDEX `character_pictures_user`(`user_id`),
+ CONSTRAINT `fk_users-character_pictures`
+ FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE,
+ CONSTRAINT `fk_characters-character_pictures`
+ FOREIGN KEY (`character_id`) REFERENCES `characters` (`id`) ON DELETE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
CREATE TABLE `character_profile_archives` (
`id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
`character_id` INTEGER UNSIGNED NOT NULL,
--- /dev/null
+/*!40101 SET NAMES utf8 */;
+
+LOCK TABLES `groups` WRITE;
+/*!40000 ALTER TABLE `groups` DISABLE KEYS */;
+INSERT INTO `groups` VALUES
+(1,'admin',0),
+(2,'subadmin',0),
+(3,'watcher',0),
+(4,'member',0),
+(5,'pre',0),
+(6,'locked',0),
+(7,'deleted',0),
+(8,'banned',0);
+/*!40000 ALTER TABLE `groups` ENABLE KEYS */;
+UNLOCK TABLES;
+
+LOCK TABLES `aros` WRITE;
+/*!40000 ALTER TABLE `aros` DISABLE KEYS */;
+INSERT INTO `aros` VALUES
+(1,NULL,'Group',1,'Group::1',1,4),
+(2,NULL,'Group',2,'Group::2',5,6),
+(3,NULL,'Group',3,'Group::3',7,8),
+(4,NULL,'Group',4,'Group::4',9,10),
+(5,NULL,'Group',5,'Group::5',11,12),
+(6,NULL,'Group',6,'Group::6',13,14),
+(7,NULL,'Group',7,'Group::7',15,16),
+(8,NULL,'Group',8,'Group::8',17,18),
+(9,1,'User',1,'User::1',2,3);
+/*!40000 ALTER TABLE `aros` ENABLE KEYS */;
+UNLOCK TABLES;
+
+LOCK TABLES `acos` WRITE;
+/*!40000 ALTER TABLE `acos` DISABLE KEYS */;
+INSERT INTO `acos` VALUES
+(NULL,NULL,'',NULL,'controllers',1,26),
+(NULL,1,'',NULL,'Users',2,3),
+(NULL,1,'',NULL,'Groups',4,5),
+(NULL,NULL,'',NULL,'prefix',27,34),
+(NULL,4,'',NULL,'admin',28,29),
+(NULL,4,'',NULL,'pc',30,31),
+(NULL,4,'',NULL,'m',32,33),
+(NULL,1,'',NULL,'Systems',6,7),
+(NULL,1,'',NULL,'Characters',8,9),
+(NULL,1,'',NULL,'Profiles',10,11),
+(NULL,1,'',NULL,'ProfileSelects',12,13),
+(NULL,1,'',NULL,'ProfileTables',14,15),
+(NULL,1,'',NULL,'SiteConfigs',16,17),
+(NULL,1,'',NULL,'CharacterPictures',18,19),
+(NULL,1,'',NULL,'ProfileTableStatics',20,21),
+(NULL,1,'',NULL,'CharacterSheets',22,23),
+(NULL,1,'',NULL,'CharacterProfileArchives',24,25);
+/*!40000 ALTER TABLE `acos` ENABLE KEYS */;
+UNLOCK TABLES;
+
+LOCK TABLES `aros_acos` WRITE;
+/*!40000 ALTER TABLE `aros_acos` DISABLE KEYS */;
+INSERT INTO `aros_acos` VALUES
+(NULL,1,1,'1','1','1','1'),
+(NULL,2,1,'1','1','1','1'),
+(NULL,3,1,'-1','-1','-1','-1'),
+(NULL,4,1,'-1','-1','-1','-1'),
+(NULL,5,1,'-1','-1','-1','-1'),
+(NULL,6,1,'-1','-1','-1','-1'),
+(NULL,7,1,'-1','-1','-1','-1'),
+(NULL,8,1,'-1','-1','-1','-1'),
+(NULL,3,2,'1','1','1','1'),
+(NULL,4,2,'1','1','1','1'),
+(NULL,5,2,'-1','-1','1','-1'),
+(NULL,2,3,'-1','-1','-1','-1'),
+(NULL,1,4,'1','1','1','1'),
+(NULL,2,4,'1','1','1','1'),
+(NULL,3,4,'1','1','1','1'),
+(NULL,4,4,'1','1','1','1'),
+(NULL,5,4,'1','1','1','1'),
+(NULL,3,5,'-1','1','-1','1'),
+(NULL,4,5,'-1','-1','-1','-1'),
+(NULL,5,5,'-1','-1','-1','-1'),
+(NULL,3,8,'-1','1','-1','-1'),
+(NULL,4,8,'-1','1','-1','-1'),
+(NULL,3,9,'1','1','1','1'),
+(NULL,4,9,'1','1','1','1'),
+(NULL,3,10,'-1','1','-1','-1'),
+(NULL,4,10,'-1','1','-1','-1'),
+(NULL,3,11,'-1','1','-1','-1'),
+(NULL,4,11,'-1','1','-1','-1'),
+(NULL,3,12,'-1','1','-1','-1'),
+(NULL,4,12,'-1','1','-1','-1'),
+(NULL,3,13,'1','1','1','1'),
+(NULL,4,13,'1','1','1','1'),
+(NULL,3,13,'1','1','1','1'),
+(NULL,4,13,'1','1','1','1'),
+(NULL,3,14,'1','1','1','1'),
+(NULL,4,14,'1','1','1','1'),
+(NULL,3,17,'1','1','1','1'),
+(NULL,4,17,'1','1','1','1');
+/*!40000 ALTER TABLE `aros_acos` ENABLE KEYS */;
+UNLOCK TABLES;