2004-11-23 20:04:44 -05:00
|
|
|
CREATE TABLE `accounts` (
|
|
|
|
`id` int(11) NOT NULL auto_increment,
|
|
|
|
`firm_id` int(11) default NULL,
|
|
|
|
`credit_limit` int(5) default NULL,
|
|
|
|
PRIMARY KEY (`id`)
|
|
|
|
) TYPE=InnoDB;
|
|
|
|
|
|
|
|
CREATE TABLE `companies` (
|
|
|
|
`id` int(11) NOT NULL auto_increment,
|
|
|
|
`type` varchar(50) default NULL,
|
|
|
|
`ruby_type` varchar(50) default NULL,
|
|
|
|
`firm_id` int(11) default NULL,
|
|
|
|
`name` varchar(50) default NULL,
|
|
|
|
`client_of` int(11) default NULL,
|
|
|
|
`rating` int(11) default NULL default 1,
|
|
|
|
PRIMARY KEY (`id`)
|
|
|
|
) TYPE=InnoDB;
|
|
|
|
|
|
|
|
|
|
|
|
CREATE TABLE `topics` (
|
|
|
|
`id` int(11) NOT NULL auto_increment,
|
|
|
|
`title` varchar(255) default NULL,
|
|
|
|
`author_name` varchar(255) default NULL,
|
|
|
|
`author_email_address` varchar(255) default NULL,
|
|
|
|
`written_on` datetime default NULL,
|
2004-12-01 08:18:51 -05:00
|
|
|
`bonus_time` time default NULL,
|
2004-11-23 20:04:44 -05:00
|
|
|
`last_read` date default NULL,
|
|
|
|
`content` text,
|
|
|
|
`approved` tinyint(1) default 1,
|
|
|
|
`replies_count` int(11) default 0,
|
|
|
|
`parent_id` int(11) default NULL,
|
|
|
|
`type` varchar(50) default NULL,
|
|
|
|
PRIMARY KEY (`id`)
|
|
|
|
) TYPE=InnoDB;
|
|
|
|
|
|
|
|
CREATE TABLE `developers` (
|
|
|
|
`id` int(11) NOT NULL auto_increment,
|
|
|
|
`name` varchar(100) default NULL,
|
2004-12-19 06:44:59 -05:00
|
|
|
`salary` int(11) default 70000,
|
2004-11-23 20:04:44 -05:00
|
|
|
PRIMARY KEY (`id`)
|
2005-04-02 02:46:41 -05:00
|
|
|
) TYPE=InnoDB;
|
2004-11-23 20:04:44 -05:00
|
|
|
|
|
|
|
CREATE TABLE `projects` (
|
|
|
|
`id` int(11) NOT NULL auto_increment,
|
|
|
|
`name` varchar(100) default NULL,
|
|
|
|
PRIMARY KEY (`id`)
|
2005-04-02 02:46:41 -05:00
|
|
|
) TYPE=InnoDB;
|
2004-11-23 20:04:44 -05:00
|
|
|
|
|
|
|
CREATE TABLE `developers_projects` (
|
|
|
|
`developer_id` int(11) NOT NULL,
|
|
|
|
`project_id` int(11) NOT NULL,
|
|
|
|
`joined_on` date default NULL
|
2005-04-02 02:46:41 -05:00
|
|
|
) TYPE=InnoDB;
|
2004-11-23 20:04:44 -05:00
|
|
|
|
|
|
|
CREATE TABLE `customers` (
|
|
|
|
`id` int(11) NOT NULL auto_increment,
|
|
|
|
`name` varchar(100) default NULL,
|
|
|
|
`balance` int(6) default 0,
|
|
|
|
`address_street` varchar(100) default NULL,
|
|
|
|
`address_city` varchar(100) default NULL,
|
|
|
|
`address_country` varchar(100) default NULL,
|
2005-03-01 18:52:36 -05:00
|
|
|
`gps_location` varchar(100) default NULL,
|
2004-11-23 20:04:44 -05:00
|
|
|
PRIMARY KEY (`id`)
|
2005-04-02 02:46:41 -05:00
|
|
|
) TYPE=InnoDB;
|
2004-11-23 20:04:44 -05:00
|
|
|
|
|
|
|
CREATE TABLE `movies` (
|
|
|
|
`movieid` int(11) NOT NULL auto_increment,
|
|
|
|
`name` varchar(100) default NULL,
|
|
|
|
PRIMARY KEY (`movieid`)
|
2005-04-02 02:46:41 -05:00
|
|
|
) TYPE=InnoDB;
|
2004-11-23 20:04:44 -05:00
|
|
|
|
|
|
|
CREATE TABLE `subscribers` (
|
|
|
|
`nick` varchar(100) NOT NULL,
|
|
|
|
`name` varchar(100) default NULL,
|
|
|
|
PRIMARY KEY (`nick`)
|
2005-04-02 02:46:41 -05:00
|
|
|
) TYPE=InnoDB;
|
2004-11-23 20:04:44 -05:00
|
|
|
|
|
|
|
CREATE TABLE `booleantests` (
|
|
|
|
`id` int(11) NOT NULL auto_increment,
|
|
|
|
`value` integer default NULL,
|
|
|
|
PRIMARY KEY (`id`)
|
2005-04-02 02:46:41 -05:00
|
|
|
) TYPE=InnoDB;
|
2004-11-23 20:04:44 -05:00
|
|
|
|
|
|
|
CREATE TABLE `auto_id_tests` (
|
|
|
|
`auto_id` int(11) NOT NULL auto_increment,
|
|
|
|
`value` integer default NULL,
|
|
|
|
PRIMARY KEY (`auto_id`)
|
2005-04-02 02:46:41 -05:00
|
|
|
) TYPE=InnoDB;
|
2004-11-23 20:04:44 -05:00
|
|
|
|
|
|
|
CREATE TABLE `entrants` (
|
|
|
|
`id` INTEGER NOT NULL PRIMARY KEY,
|
|
|
|
`name` VARCHAR(255) NOT NULL,
|
|
|
|
`course_id` INTEGER NOT NULL
|
|
|
|
);
|
|
|
|
|
|
|
|
CREATE TABLE `colnametests` (
|
|
|
|
`id` int(11) NOT NULL auto_increment,
|
|
|
|
`references` int(11) NOT NULL,
|
|
|
|
PRIMARY KEY (`id`)
|
2005-04-02 02:46:41 -05:00
|
|
|
) TYPE=InnoDB;
|
2004-12-14 19:46:26 -05:00
|
|
|
|
|
|
|
CREATE TABLE `mixins` (
|
|
|
|
`id` int(11) NOT NULL auto_increment,
|
|
|
|
`parent_id` int(11) default NULL,
|
|
|
|
`pos` int(11) default NULL,
|
|
|
|
`created_at` datetime default NULL,
|
|
|
|
`updated_at` datetime default NULL,
|
2004-12-19 08:01:47 -05:00
|
|
|
`lft` int(11) default NULL,
|
|
|
|
`rgt` int(11) default NULL,
|
|
|
|
`root_id` int(11) default NULL,
|
|
|
|
`type` varchar(40) default NULL,
|
2004-12-14 19:46:26 -05:00
|
|
|
PRIMARY KEY (`id`)
|
2005-04-02 02:46:41 -05:00
|
|
|
) TYPE=InnoDB;
|
2004-12-31 14:38:04 -05:00
|
|
|
|
|
|
|
CREATE TABLE `people` (
|
|
|
|
`id` INTEGER NOT NULL PRIMARY KEY,
|
|
|
|
`first_name` VARCHAR(40) NOT NULL,
|
|
|
|
`lock_version` INTEGER NOT NULL DEFAULT 0
|
2005-04-02 02:46:41 -05:00
|
|
|
) TYPE=InnoDB;
|
2005-01-01 13:34:39 -05:00
|
|
|
|
|
|
|
CREATE TABLE `binaries` (
|
|
|
|
`id` int(11) NOT NULL auto_increment,
|
|
|
|
`data` mediumblob,
|
|
|
|
PRIMARY KEY (`id`)
|
2005-04-02 02:46:41 -05:00
|
|
|
) TYPE=InnoDB;
|
2005-01-10 19:24:19 -05:00
|
|
|
|
|
|
|
CREATE TABLE `computers` (
|
|
|
|
`id` INTEGER NOT NULL PRIMARY KEY,
|
|
|
|
`developer` INTEGER NOT NULL
|
2005-04-02 02:46:41 -05:00
|
|
|
) TYPE=InnoDB;
|
2005-02-20 16:21:41 -05:00
|
|
|
|
2005-04-07 02:20:54 -04:00
|
|
|
CREATE TABLE `posts` (
|
|
|
|
`id` INTEGER NOT NULL PRIMARY KEY,
|
|
|
|
`author_id` INTEGER NOT NULL,
|
|
|
|
`title` VARCHAR(255) NOT NULL,
|
2005-04-10 11:49:49 -04:00
|
|
|
`body` TEXT NOT NULL,
|
|
|
|
`type` VARCHAR(255) NOT NULL
|
2005-04-07 02:20:54 -04:00
|
|
|
) TYPE=InnoDB;
|
|
|
|
|
|
|
|
CREATE TABLE `comments` (
|
|
|
|
`id` INTEGER NOT NULL PRIMARY KEY,
|
|
|
|
`post_id` INTEGER NOT NULL,
|
2005-04-10 11:49:49 -04:00
|
|
|
`body` TEXT NOT NULL,
|
|
|
|
`type` VARCHAR(255) NOT NULL
|
2005-04-07 02:20:54 -04:00
|
|
|
) TYPE=InnoDB;
|
|
|
|
|
|
|
|
CREATE TABLE `authors` (
|
|
|
|
`id` INTEGER NOT NULL PRIMARY KEY,
|
|
|
|
`name` VARCHAR(255) NOT NULL
|
|
|
|
) TYPE=InnoDB;
|
|
|
|
|
2005-04-07 02:54:25 -04:00
|
|
|
CREATE TABLE `tasks` (
|
|
|
|
`id` int(11) NOT NULL auto_increment,
|
|
|
|
`starting` datetime NOT NULL default '0000-00-00 00:00:00',
|
|
|
|
`ending` datetime NOT NULL default '0000-00-00 00:00:00',
|
|
|
|
PRIMARY KEY (`id`)
|
|
|
|
);
|