2004-11-23 20:04:44 -05:00
|
|
|
CREATE TABLE 'accounts' (
|
|
|
|
'id' INTEGER PRIMARY KEY NOT NULL,
|
|
|
|
'firm_id' INTEGER DEFAULT NULL,
|
|
|
|
'credit_limit' INTEGER DEFAULT NULL
|
|
|
|
);
|
|
|
|
|
|
|
|
CREATE TABLE 'companies' (
|
|
|
|
'id' INTEGER PRIMARY KEY NOT NULL,
|
|
|
|
'type' VARCHAR(255) DEFAULT NULL,
|
|
|
|
'ruby_type' VARCHAR(255) DEFAULT NULL,
|
|
|
|
'firm_id' INTEGER DEFAULT NULL,
|
|
|
|
'name' TEXT DEFAULT NULL,
|
|
|
|
'client_of' INTEGER DEFAULT NULL,
|
|
|
|
'rating' INTEGER DEFAULT 1
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
CREATE TABLE 'topics' (
|
|
|
|
'id' INTEGER PRIMARY KEY NOT NULL,
|
|
|
|
'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' INTEGER DEFAULT 1,
|
|
|
|
'replies_count' INTEGER DEFAULT 0,
|
|
|
|
'parent_id' INTEGER DEFAULT NULL,
|
|
|
|
'type' VARCHAR(255) DEFAULT NULL
|
|
|
|
);
|
|
|
|
|
|
|
|
CREATE TABLE 'developers' (
|
|
|
|
'id' INTEGER PRIMARY KEY NOT NULL,
|
2004-12-19 06:41:34 -05:00
|
|
|
'name' TEXT DEFAULT NULL,
|
2004-12-19 11:21:55 -05:00
|
|
|
'salary' INTEGER DEFAULT 70000
|
2004-11-23 20:04:44 -05:00
|
|
|
);
|
|
|
|
|
|
|
|
CREATE TABLE 'projects' (
|
|
|
|
'id' INTEGER PRIMARY KEY NOT NULL,
|
|
|
|
'name' TEXT DEFAULT NULL
|
|
|
|
);
|
|
|
|
|
|
|
|
CREATE TABLE 'developers_projects' (
|
|
|
|
'developer_id' INTEGER NOT NULL,
|
|
|
|
'project_id' INTEGER NOT NULL,
|
|
|
|
'joined_on' DATE DEFAULT NULL
|
|
|
|
);
|
|
|
|
|
|
|
|
CREATE TABLE 'customers' (
|
|
|
|
'id' INTEGER PRIMARY KEY NOT NULL,
|
|
|
|
'name' VARCHAR(255) DEFAULT NULL,
|
|
|
|
'balance' INTEGER DEFAULT 0,
|
|
|
|
'address_street' TEXT DEFAULT NULL,
|
|
|
|
'address_city' TEXT DEFAULT NULL,
|
|
|
|
'address_country' TEXT DEFAULT NULL
|
|
|
|
);
|
|
|
|
|
|
|
|
CREATE TABLE 'movies' (
|
|
|
|
'movieid' INTEGER PRIMARY KEY NOT NULL,
|
|
|
|
'name' VARCHAR(255) DEFAULT NULL
|
|
|
|
);
|
|
|
|
|
|
|
|
CREATE TABLE subscribers (
|
|
|
|
'nick' VARCHAR(255) PRIMARY KEY NOT NULL,
|
|
|
|
'name' VARCHAR(255) DEFAULT NULL
|
|
|
|
);
|
|
|
|
|
|
|
|
CREATE TABLE 'booleantests' (
|
|
|
|
'id' INTEGER PRIMARY KEY NOT NULL,
|
|
|
|
'value' INTEGER DEFAULT NULL
|
|
|
|
);
|
|
|
|
|
|
|
|
CREATE TABLE 'auto_id_tests' (
|
|
|
|
'auto_id' INTEGER PRIMARY KEY NOT NULL,
|
|
|
|
'value' INTEGER DEFAULT NULL
|
|
|
|
);
|
|
|
|
|
|
|
|
CREATE TABLE 'entrants' (
|
|
|
|
'id' INTEGER NOT NULL PRIMARY KEY,
|
|
|
|
'name' VARCHAR(255) NOT NULL,
|
|
|
|
'course_id' INTEGER NOT NULL
|
|
|
|
);
|
|
|
|
|
|
|
|
CREATE TABLE 'colnametests' (
|
|
|
|
'id' INTEGER NOT NULL PRIMARY KEY,
|
|
|
|
'references' INTEGER NOT NULL
|
|
|
|
);
|
2004-12-14 19:46:26 -05:00
|
|
|
|
|
|
|
CREATE TABLE 'mixins' (
|
|
|
|
'id' INTEGER NOT NULL PRIMARY KEY,
|
|
|
|
'parent_id' INTEGER DEFAULT NULL,
|
2004-12-19 08:01:47 -05:00
|
|
|
'type' VARCHAR(40) DEFAULT NULL,
|
2004-12-14 19:46:26 -05:00
|
|
|
'pos' INTEGER DEFAULT NULL,
|
|
|
|
'lft' INTEGER DEFAULT NULL,
|
|
|
|
'rgt' INTEGER DEFAULT NULL,
|
|
|
|
'root_id' INTEGER DEFAULT NULL,
|
|
|
|
'created_at' DATETIME DEFAULT NULL,
|
|
|
|
'updated_at' DATETIME DEFAULT NULL
|
|
|
|
);
|
|
|
|
|
2004-12-31 14:38:04 -05:00
|
|
|
CREATE TABLE 'people' (
|
|
|
|
'id' INTEGER NOT NULL PRIMARY KEY,
|
|
|
|
'first_name' VARCHAR(40) DEFAULT NULL,
|
|
|
|
'lock_version' INTEGER NOT NULL DEFAULT 0
|
2005-01-01 13:34:39 -05:00
|
|
|
);
|
|
|
|
|
|
|
|
CREATE TABLE 'binaries' (
|
|
|
|
'id' INTEGER NOT NULL PRIMARY KEY,
|
|
|
|
'data' BLOB DEFAULT NULL
|
2004-12-31 14:38:04 -05:00
|
|
|
);
|