-- This file is autogenerated by the Rail schema generator, using -- the schema defined in db/migration/*.rb -- -- Do not edit this file. Instead, add a new migration using -- ./script/generate migration , and then run -- ./script/generate schema -- tables CREATE TABLE articles_tags ( [article_id] integer DEFAULT NULL, [tag_id] integer DEFAULT NULL ); CREATE TABLE blacklist_patterns ( [id] int NOT NULL IDENTITY(1, 1) PRIMARY KEY, [type] varchar(255) DEFAULT NULL, [pattern] varchar(255) DEFAULT NULL ); CREATE TABLE blogs ( [id] int NOT NULL IDENTITY(1, 1) PRIMARY KEY, [settings] text DEFAULT NULL, [base_url] varchar(255) DEFAULT NULL ); CREATE TABLE categories ( [id] int NOT NULL IDENTITY(1, 1) PRIMARY KEY, [name] varchar(255) DEFAULT NULL, [position] integer DEFAULT NULL, [permalink] varchar(255) DEFAULT NULL ); CREATE TABLE categorizations ( [id] int NOT NULL IDENTITY(1, 1) PRIMARY KEY, [article_id] integer DEFAULT NULL, [category_id] integer DEFAULT NULL, [is_primary] bit DEFAULT NULL ); CREATE TABLE contents ( [id] int NOT NULL IDENTITY(1, 1) PRIMARY KEY, [type] varchar(255) DEFAULT NULL, [title] varchar(255) DEFAULT NULL, [author] varchar(255) DEFAULT NULL, [body] text DEFAULT NULL, [extended] text DEFAULT NULL, [excerpt] text DEFAULT NULL, [keywords] varchar(255) DEFAULT NULL, [created_at] datetime DEFAULT NULL, [updated_at] datetime DEFAULT NULL, [user_id] integer DEFAULT NULL, [permalink] varchar(255) DEFAULT NULL, [guid] varchar(255) DEFAULT NULL, [text_filter_id] integer DEFAULT NULL, [whiteboard] text DEFAULT NULL, [name] varchar(255) DEFAULT NULL, [published] bit DEFAULT 0, [allow_pings] bit DEFAULT NULL, [allow_comments] bit DEFAULT NULL, [blog_id] integer NOT NULL, [published_at] datetime DEFAULT NULL, [state] text DEFAULT NULL ); CREATE TABLE feedback ( [id] int NOT NULL IDENTITY(1, 1) PRIMARY KEY, [type] varchar(255) DEFAULT NULL, [title] varchar(255) DEFAULT NULL, [author] varchar(255) DEFAULT NULL, [body] text DEFAULT NULL, [extended] text DEFAULT NULL, [excerpt] text DEFAULT NULL, [keywords] varchar(255) DEFAULT NULL, [created_at] datetime DEFAULT NULL, [updated_at] datetime DEFAULT NULL, [user_id] integer DEFAULT NULL, [permalink] varchar(255) DEFAULT NULL, [guid] varchar(255) DEFAULT NULL, [text_filter_id] integer DEFAULT NULL, [whiteboard] text DEFAULT NULL, [article_id] integer DEFAULT NULL, [email] varchar(255) DEFAULT NULL, [url] varchar(255) DEFAULT NULL, [ip] varchar(40) DEFAULT NULL, [blog_name] varchar(255) DEFAULT NULL, [name] varchar(255) DEFAULT NULL, [published] bit DEFAULT 0, [allow_pings] bit DEFAULT NULL, [allow_comments] bit DEFAULT NULL, [blog_id] integer NOT NULL, [published_at] datetime DEFAULT NULL, [state] text DEFAULT NULL, [status_confirmed] bit DEFAULT NULL ); CREATE TABLE notifications ( [id] int NOT NULL IDENTITY(1, 1) PRIMARY KEY, [content_id] integer DEFAULT NULL, [user_id] integer DEFAULT NULL, [created_at] datetime DEFAULT NULL, [updated_at] datetime DEFAULT NULL ); CREATE TABLE page_caches ( [id] int NOT NULL IDENTITY(1, 1) PRIMARY KEY, [name] varchar(255) DEFAULT NULL ); CREATE TABLE pings ( [id] int NOT NULL IDENTITY(1, 1) PRIMARY KEY, [article_id] integer DEFAULT NULL, [url] varchar(255) DEFAULT NULL, [created_at] datetime DEFAULT NULL ); CREATE TABLE redirects ( [id] int NOT NULL IDENTITY(1, 1) PRIMARY KEY, [from_path] varchar(255) DEFAULT NULL, [to_path] varchar(255) DEFAULT NULL ); CREATE TABLE resources ( [id] int NOT NULL IDENTITY(1, 1) PRIMARY KEY, [size] integer DEFAULT NULL, [filename] varchar(255) DEFAULT NULL, [mime] varchar(255) DEFAULT NULL, [created_at] datetime DEFAULT NULL, [updated_at] datetime DEFAULT NULL, [article_id] integer DEFAULT NULL, [itunes_metadata] bit DEFAULT NULL, [itunes_author] varchar(255) DEFAULT NULL, [itunes_subtitle] varchar(255) DEFAULT NULL, [itunes_duration] integer DEFAULT NULL, [itunes_summary] text DEFAULT NULL, [itunes_keywords] varchar(255) DEFAULT NULL, [itunes_category] varchar(255) DEFAULT NULL, [itunes_explicit] bit DEFAULT NULL ); CREATE TABLE sessions ( [id] int NOT NULL IDENTITY(1, 1) PRIMARY KEY, [sessid] varchar(255) DEFAULT NULL, [data] text DEFAULT NULL, [created_at] datetime DEFAULT NULL, [updated_at] datetime DEFAULT NULL ); CREATE TABLE sidebars ( [id] int NOT NULL IDENTITY(1, 1) PRIMARY KEY, [active_position] integer DEFAULT NULL, [config] text DEFAULT NULL, [staged_position] integer DEFAULT NULL, [type] varchar(255) DEFAULT NULL, [blog_id] integer DEFAULT NULL ); CREATE TABLE tags ( [id] int NOT NULL IDENTITY(1, 1) PRIMARY KEY, [name] varchar(255) DEFAULT NULL, [created_at] datetime DEFAULT NULL, [updated_at] datetime DEFAULT NULL, [display_name] varchar(255) DEFAULT NULL ); CREATE TABLE text_filters ( [id] int NOT NULL IDENTITY(1, 1) PRIMARY KEY, [name] varchar(255) DEFAULT NULL, [description] varchar(255) DEFAULT NULL, [markup] varchar(255) DEFAULT NULL, [filters] text DEFAULT NULL, [params] text DEFAULT NULL ); CREATE TABLE triggers ( [id] int NOT NULL IDENTITY(1, 1) PRIMARY KEY, [pending_item_id] integer DEFAULT NULL, [pending_item_type] varchar(255) DEFAULT NULL, [due_at] datetime DEFAULT NULL, [trigger_method] varchar(255) DEFAULT NULL ); CREATE TABLE users ( [id] int NOT NULL IDENTITY(1, 1) PRIMARY KEY, [login] varchar(255) DEFAULT NULL, [password] varchar(255) DEFAULT NULL, [email] text DEFAULT NULL, [name] text DEFAULT NULL, [notify_via_email] bit DEFAULT NULL, [notify_on_new_articles] bit DEFAULT NULL, [notify_on_comments] bit DEFAULT NULL, [notify_watch_my_articles] bit DEFAULT NULL, [notify_via_jabber] bit DEFAULT NULL, [jabber] varchar(255) DEFAULT NULL ); -- indexes CREATE INDEX [index_blacklist_patterns_on_pattern] ON blacklist_patterns ([pattern]); CREATE INDEX [index_categories_on_permalink] ON categories ([permalink]); CREATE INDEX [index_contents_on_blog_id] ON contents ([blog_id]); CREATE INDEX [index_contents_on_text_filter_id] ON contents ([text_filter_id]); CREATE INDEX [index_contents_on_published] ON contents ([published]); CREATE INDEX [index_feedback_on_text_filter_id] ON feedback ([text_filter_id]); CREATE INDEX [index_feedback_on_article_id] ON feedback ([article_id]); CREATE INDEX [index_page_caches_on_name] ON page_caches ([name]); CREATE INDEX [index_pings_on_article_id] ON pings ([article_id]); CREATE INDEX [index_sessions_on_sessid] ON sessions ([sessid]); -- data INSERT INTO text_filters ([name], [filters], [description], [params], [markup]) VALUES('none', '--- [] ', 'None', '--- {} ', 'none'); INSERT INTO text_filters ([name], [filters], [description], [params], [markup]) VALUES('markdown', '--- [] ', 'Markdown', '--- {} ', 'markdown'); INSERT INTO text_filters ([name], [filters], [description], [params], [markup]) VALUES('smartypants', '--- - :smartypants ', 'SmartyPants', '--- {} ', 'none'); INSERT INTO text_filters ([name], [filters], [description], [params], [markup]) VALUES('markdown smartypants', '--- - :smartypants ', 'Markdown with SmartyPants', '--- {} ', 'markdown'); INSERT INTO text_filters ([name], [filters], [description], [params], [markup]) VALUES('textile', '--- [] ', 'Textile', '--- {} ', 'textile'); INSERT INTO sidebars ([id], [active_position], [config], [staged_position], [type], [blog_id]) VALUES (1, 0, '--- !map:HashWithIndifferentAccess \nempty: false\ncount: true\n', 0, 'CategorySidebar', 1); INSERT INTO sidebars ([id], [active_position], [config], [staged_position], [type], [blog_id]) VALUES (2, 2, '--- !map:HashWithIndifferentAccess \nformat: rss20\ntrackbacks: false\ncomments: true\narticles: true\n', 2, 'XmlSidebar', 1); INSERT INTO sidebars ([id], [active_position], [config], [staged_position], [type], [blog_id]) VALUES (3, 1, '--- !map:HashWithIndifferentAccess \nbody: "\\n"\ntitle: Links\n', NULL, 'StaticSidebar', 1); -- schema version meta-info CREATE TABLE schema_info ( [version] integer DEFAULT NULL ); insert into schema_info (version) values (61);