Created
July 16, 2011 21:12
-
-
Save Kronos11/1086798 to your computer and use it in GitHub Desktop.
test component structure
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- MySQL Administrator dump 1.4 | |
-- | |
-- ------------------------------------------------------ | |
-- Server version 5.5.14 | |
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; | |
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; | |
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; | |
/*!40101 SET NAMES utf8 */; | |
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; | |
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; | |
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; | |
-- | |
-- Create schema test | |
-- | |
CREATE DATABASE IF NOT EXISTS test; | |
USE test; | |
-- | |
-- Definition of table `assemblage_components` | |
-- | |
DROP TABLE IF EXISTS `assemblage_components`; | |
CREATE TABLE `assemblage_components` ( | |
`assemblage_id` int(11) NOT NULL, | |
`component_id` int(11) NOT NULL, | |
PRIMARY KEY (`assemblage_id`,`component_id`), | |
KEY `fk_assemblage_id` (`assemblage_id`), | |
KEY `fk_components_id` (`component_id`), | |
CONSTRAINT `fk_components_id` FOREIGN KEY (`component_id`) REFERENCES `components` (`component_id`) ON DELETE NO ACTION ON UPDATE NO ACTION, | |
CONSTRAINT `fk_assemblage_id` FOREIGN KEY (`assemblage_id`) REFERENCES `assemblages` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION | |
) ENGINE=InnoDB DEFAULT CHARSET=latin1; | |
-- | |
-- Dumping data for table `assemblage_components` | |
-- | |
/*!40000 ALTER TABLE `assemblage_components` DISABLE KEYS */; | |
/*!40000 ALTER TABLE `assemblage_components` ENABLE KEYS */; | |
-- | |
-- Definition of table `assemblages` | |
-- | |
DROP TABLE IF EXISTS `assemblages`; | |
CREATE TABLE `assemblages` ( | |
`id` int(11) NOT NULL AUTO_INCREMENT, | |
`label` varchar(45) DEFAULT NULL, | |
`official_name` varchar(45) DEFAULT NULL, | |
`description` tinytext, | |
PRIMARY KEY (`id`) | |
) ENGINE=InnoDB DEFAULT CHARSET=latin1; | |
-- | |
-- Dumping data for table `assemblages` | |
-- | |
/*!40000 ALTER TABLE `assemblages` DISABLE KEYS */; | |
/*!40000 ALTER TABLE `assemblages` ENABLE KEYS */; | |
-- | |
-- Definition of table `component_data_appearance` | |
-- | |
DROP TABLE IF EXISTS `component_data_appearance`; | |
CREATE TABLE `component_data_appearance` ( | |
`component_data_id` int(11) NOT NULL, | |
`race` varchar(45) DEFAULT NULL, | |
`gender` varchar(45) DEFAULT NULL, | |
`name_iff` varchar(45) DEFAULT NULL, | |
`customization_string` text, | |
PRIMARY KEY (`component_data_id`) | |
) ENGINE=InnoDB DEFAULT CHARSET=latin1; | |
-- | |
-- Dumping data for table `component_data_appearance` | |
-- | |
/*!40000 ALTER TABLE `component_data_appearance` DISABLE KEYS */; | |
/*!40000 ALTER TABLE `component_data_appearance` ENABLE KEYS */; | |
-- | |
-- Definition of table `component_data_combat` | |
-- | |
DROP TABLE IF EXISTS `component_data_combat`; | |
CREATE TABLE `component_data_combat` ( | |
`component_data_id` bigint(20) NOT NULL, | |
`base_damage` int(11) DEFAULT NULL, | |
`base_multiplier` float DEFAULT NULL, | |
`base_speed` float DEFAULT NULL, | |
PRIMARY KEY (`component_data_id`) | |
) ENGINE=InnoDB DEFAULT CHARSET=latin1; | |
-- | |
-- Dumping data for table `component_data_combat` | |
-- | |
/*!40000 ALTER TABLE `component_data_combat` DISABLE KEYS */; | |
/*!40000 ALTER TABLE `component_data_combat` ENABLE KEYS */; | |
-- | |
-- Definition of table `component_data_test_combat` | |
-- | |
DROP TABLE IF EXISTS `component_data_test_combat`; | |
CREATE TABLE `component_data_test_combat` ( | |
`component_data_id` bigint(20) NOT NULL, | |
`combat1` float DEFAULT NULL, | |
`combat2` int(11) DEFAULT NULL, | |
`combat3` float DEFAULT NULL, | |
PRIMARY KEY (`component_data_id`) | |
) ENGINE=InnoDB DEFAULT CHARSET=latin1; | |
-- | |
-- Dumping data for table `component_data_test_combat` | |
-- | |
/*!40000 ALTER TABLE `component_data_test_combat` DISABLE KEYS */; | |
/*!40000 ALTER TABLE `component_data_test_combat` ENABLE KEYS */; | |
-- | |
-- Definition of table `component_data_test_om` | |
-- | |
DROP TABLE IF EXISTS `component_data_test_om`; | |
CREATE TABLE `component_data_test_om` ( | |
`component_data_id` bigint(20) NOT NULL, | |
`t` float DEFAULT NULL, | |
`t2` int(11) DEFAULT NULL, | |
`t3` bigint(20) DEFAULT NULL, | |
PRIMARY KEY (`component_data_id`) | |
) ENGINE=InnoDB DEFAULT CHARSET=latin1; | |
-- | |
-- Dumping data for table `component_data_test_om` | |
-- | |
/*!40000 ALTER TABLE `component_data_test_om` DISABLE KEYS */; | |
/*!40000 ALTER TABLE `component_data_test_om` ENABLE KEYS */; | |
-- | |
-- Definition of table `component_data_transform` | |
-- | |
DROP TABLE IF EXISTS `component_data_transform`; | |
CREATE TABLE `component_data_transform` ( | |
`component_data_id` bigint(20) NOT NULL, | |
`x` float DEFAULT NULL, | |
`y` float DEFAULT NULL, | |
`z` float DEFAULT NULL, | |
`oX` float DEFAULT NULL, | |
`oY` float DEFAULT NULL, | |
`oZ` float DEFAULT NULL, | |
`oW` float DEFAULT NULL, | |
`speed` float DEFAULT NULL, | |
PRIMARY KEY (`component_data_id`) | |
) ENGINE=InnoDB DEFAULT CHARSET=latin1; | |
-- | |
-- Dumping data for table `component_data_transform` | |
-- | |
/*!40000 ALTER TABLE `component_data_transform` DISABLE KEYS */; | |
/*!40000 ALTER TABLE `component_data_transform` ENABLE KEYS */; | |
-- | |
-- Definition of table `components` | |
-- | |
DROP TABLE IF EXISTS `components`; | |
CREATE TABLE `components` ( | |
`component_id` int(11) NOT NULL AUTO_INCREMENT, | |
`name` varchar(45) DEFAULT NULL, | |
`description` tinytext, | |
`table_name` varchar(45) DEFAULT NULL, | |
PRIMARY KEY (`component_id`) | |
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1 COMMENT='this has a list of which components are available and where to find their data.'; | |
-- | |
-- Dumping data for table `components` | |
-- | |
/*!40000 ALTER TABLE `components` DISABLE KEYS */; | |
INSERT INTO `components` (`component_id`,`name`,`description`,`table_name`) VALUES | |
(1,'Appearance Component','Appearance manages how an entity appears','component_data_appearance'), | |
(2,'Transform Component','Manages how the entity moves','component_data_transform'); | |
/*!40000 ALTER TABLE `components` ENABLE KEYS */; | |
-- | |
-- Definition of table `entities` | |
-- | |
DROP TABLE IF EXISTS `entities`; | |
CREATE TABLE `entities` ( | |
`entity_id` bigint(20) NOT NULL AUTO_INCREMENT, | |
`label` varchar(45) DEFAULT NULL COMMENT 'for debugging only', | |
PRIMARY KEY (`entity_id`) | |
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='master list of entities'; | |
-- | |
-- Dumping data for table `entities` | |
-- | |
/*!40000 ALTER TABLE `entities` DISABLE KEYS */; | |
/*!40000 ALTER TABLE `entities` ENABLE KEYS */; | |
-- | |
-- Definition of table `entity_components` | |
-- | |
DROP TABLE IF EXISTS `entity_components`; | |
CREATE TABLE `entity_components` ( | |
`entity_id` bigint(20) NOT NULL, | |
`component_id` int(11) DEFAULT NULL, | |
`component_data_id` bigint(20) DEFAULT NULL, | |
PRIMARY KEY (`entity_id`) | |
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Tells which components are in which entity'; | |
-- | |
-- Dumping data for table `entity_components` | |
-- | |
/*!40000 ALTER TABLE `entity_components` DISABLE KEYS */; | |
/*!40000 ALTER TABLE `entity_components` ENABLE KEYS */; | |
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; | |
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; | |
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; | |
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; | |
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; | |
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; | |
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment