root/trunk/schemas/sqlite.dump

Revision 4196, 11.2 kB (checked in by takayama, 3 months ago)

* Set svn keywords

  • Property svn:keywords set to Author Date Id Revision
Line 
1create table mt_author (
2    author_id integer not null primary key,
3    author_name varchar(50) not null,
4    author_type smallint not null,
5    author_nickname varchar(50),
6    author_password varchar(60) not null,
7    author_email varchar(75) not null,
8    author_url varchar(255),
9    author_can_create_blog boolean,
10    author_can_view_log boolean,
11    author_hint varchar(75),
12    author_created_by integer,
13    author_public_key text,
14    author_preferred_language varchar(50),
15    author_remote_auth_username varchar(50),
16    author_remote_auth_token varchar(50),
17    unique (author_name, author_type)
18);
19create index mt_author_email on mt_author (author_email);
20
21create table mt_blog (
22    blog_id integer not null primary key,
23    blog_name varchar(255) not null,
24    blog_description text,
25    blog_site_path varchar(255),
26    blog_site_url varchar(255),
27    blog_archive_path varchar(255),
28    blog_archive_url varchar(255),
29    blog_archive_type varchar(255),
30    blog_archive_type_preferred varchar(25),
31    blog_days_on_index smallint,
32    blog_entries_on_index smallint,
33    blog_language varchar(5),
34    blog_file_extension varchar(10),
35    blog_email_new_comments boolean,
36    blog_email_new_pings boolean,
37    blog_allow_comment_html boolean,
38    blog_autolink_urls boolean,
39    blog_sort_order_posts varchar(8),
40    blog_sort_order_comments varchar(8),
41    blog_allow_comments_default boolean,
42    blog_allow_pings_default boolean,
43    blog_server_offset float,
44    blog_convert_paras varchar(30),
45    blog_convert_paras_comments varchar(30),
46    blog_status_default smallint,
47    blog_allow_anon_comments boolean,
48    blog_allow_unreg_comments smallint,
49    blog_allow_reg_comments smallint,
50    blog_allow_pings smallint,
51    blog_moderate_unreg_comments smallint,
52    blog_require_comment_emails smallint,
53    blog_manual_approve_commenters smallint,
54    blog_moderate_pings smallint,
55    blog_words_in_excerpt smallint,
56    blog_ping_weblogs boolean,
57    blog_ping_blogs boolean,
58    blog_ping_technorati boolean,
59    blog_ping_others text,
60    blog_mt_update_key varchar(30),
61    blog_autodiscover_links boolean,
62    blog_welcome_msg text,
63    blog_junk_score_threshold float,
64    blog_junk_folder_expiry integer,
65    blog_old_style_archive_links smallint,
66    blog_archive_tmpl_monthly varchar(255),
67    blog_archive_tmpl_weekly varchar(255),
68    blog_archive_tmpl_daily varchar(255),
69    blog_archive_tmpl_individual varchar(255),
70    blog_archive_tmpl_category varchar(255),
71    blog_google_api_key varchar(32),
72    blog_sanitize_spec varchar(255),
73    blog_cc_license varchar(255),
74    blog_is_dynamic boolean,
75    blog_remote_auth_token varchar(50),
76    blog_children_modified_on datetime,
77    blog_custom_dynamic_templates varchar(25)
78);
79create index mt_blog_name on mt_blog (blog_name);
80
81create table mt_category (
82    category_id integer not null primary key,
83    category_blog_id integer not null,
84    category_allow_pings boolean,
85    category_label varchar(100) not null,
86    category_description text,
87    category_author_id integer,
88    category_ping_urls text,
89    category_parent integer not null default 0,
90    unique (category_blog_id, category_label)
91);
92
93create table mt_comment (
94    comment_id integer not null primary key,
95    comment_blog_id integer not null,
96    comment_entry_id integer not null,
97    comment_ip varchar(16),
98    comment_author varchar(100),
99    comment_email varchar(75),
100    comment_url varchar(255),
101    comment_commenter_id integer,
102    comment_visible smallint,
103    comment_text text,
104    comment_junk_status smallint not null default 0,
105    comment_junk_log text,
106    comment_junk_score float,
107    comment_created_on timestamp not null,
108    comment_modified_on timestamp not null,
109    comment_last_moved_on timestamp not null,
110    comment_created_by integer,
111    comment_modified_by integer
112);
113create index mt_comment_created_on on mt_comment (comment_created_on);
114create index mt_comment_entry_id on mt_comment (comment_entry_id);
115create index mt_comment_blog_id on mt_comment (comment_blog_id);
116
117create table mt_entry (
118    entry_id integer not null primary key,
119    entry_blog_id integer not null,
120    entry_status smallint not null,
121    entry_author_id integer not null,
122    entry_allow_comments boolean,
123    entry_allow_pings boolean,
124    entry_convert_breaks varchar(30),
125    entry_category_id integer,
126    entry_title varchar(255),
127    entry_excerpt text,
128    entry_text text,
129    entry_text_more text,
130    entry_to_ping_urls text,
131    entry_pinged_urls text,
132    entry_keywords text,
133    entry_tangent_cache text,
134    entry_week_number smallint,
135    entry_created_on timestamp not null,
136    entry_modified_on timestamp not null,
137    entry_basename varchar(50),
138    entry_created_by integer,
139    entry_modified_by integer
140);
141create index mt_entry_blog_id on mt_entry (entry_blog_id);
142create index mt_entry_status on mt_entry (entry_status);
143create index mt_entry_author_id on mt_entry (entry_author_id);
144create index mt_entry_created_on on mt_entry (entry_created_on);
145create index mt_entry_basename on mt_entry (entry_basename);
146
147create table mt_ipbanlist (
148    ipbanlist_id integer not null primary key,
149    ipbanlist_blog_id integer not null,
150    ipbanlist_ip varchar(15) not null,
151    ipbanlist_created_on timestamp not null,
152    ipbanlist_modified_on timestamp not null,
153    ipbanlist_created_by integer,
154    ipbanlist_modified_by integer
155);
156create index mt_ipbanlist_blog_id on mt_ipbanlist (ipbanlist_blog_id);
157create index mt_ipbanlist_ip on mt_ipbanlist (ipbanlist_ip);
158
159create table mt_log (
160    log_id integer not null primary key,
161    log_message varchar(255),
162    log_ip varchar(16),
163    log_blog_id integer default 0,
164    log_created_on timestamp not null,
165    log_modified_on timestamp not null,
166    log_created_by integer,
167    log_modified_by integer
168);
169create index mt_log_created_on on mt_log (log_created_on);
170
171create table mt_notification (
172    notification_id integer not null primary key,
173    notification_blog_id integer not null,
174    notification_name varchar(50),
175    notification_email varchar(75),
176    notification_url varchar(255),
177    notification_created_on timestamp not null,
178    notification_modified_on timestamp not null,
179    notification_created_by integer,
180    notification_modified_by integer
181);
182create index mt_notification_blog_id on mt_notification (notification_blog_id);
183
184create table mt_permission (
185    permission_id integer not null primary key,
186    permission_author_id integer not null,
187    permission_blog_id integer not null,
188    permission_role_mask smallint,
189    permission_entry_prefs varchar(255),
190    unique (permission_blog_id, permission_author_id)
191);
192
193create table mt_placement (
194    placement_id integer not null primary key,
195    placement_entry_id integer not null,
196    placement_blog_id integer not null,
197    placement_category_id integer not null,
198    placement_is_primary boolean not null
199);
200create index mt_placement_entry_id on mt_placement (placement_entry_id);
201create index mt_placement_category_id on mt_placement (placement_category_id);
202create index mt_placement_is_primary on mt_placement (placement_is_primary);
203
204create table mt_plugindata (
205    plugindata_id integer not null primary key,
206    plugindata_plugin varchar(50) not null,
207    plugindata_key varchar(255) not null,
208    plugindata_data text
209);
210create index mt_plugindata_plugin on mt_plugindata (plugindata_plugin);
211create index mt_plugindata_key on mt_plugindata (plugindata_key);
212
213create table mt_template (
214    template_id integer not null primary key,
215    template_blog_id integer not null,
216    template_name varchar(50) not null,
217    template_type varchar(25) not null,
218    template_outfile varchar(255),
219    template_rebuild_me boolean,
220    template_text text,
221    template_linked_file varchar(255),
222    template_linked_file_mtime varchar(10),
223    template_linked_file_size integer,
224    template_created_on datetime not null,
225    template_modified_on timestamp not null,
226    template_created_by integer,
227    template_modified_by integer,
228    template_build_dynamic boolean not null default 0,
229    unique (template_blog_id, template_name)
230);
231create index mt_template_type on mt_template (template_type);
232
233create table mt_templatemap (
234    templatemap_id integer not null primary key,
235    templatemap_blog_id integer not null,
236    templatemap_template_id integer not null,
237    templatemap_archive_type varchar(25) not null,
238    templatemap_file_template varchar(255),
239    templatemap_is_preferred boolean not null
240);
241create index mt_templatemap_blog_id on mt_templatemap (templatemap_blog_id);
242create index mt_templatemap_template_id on mt_templatemap (templatemap_template_id);
243create index mt_templatemap_archive_type on mt_templatemap (templatemap_archive_type);
244create index mt_templatemap_is_preferred on mt_templatemap (templatemap_is_preferred);
245
246create table mt_trackback (
247    trackback_id integer not null primary key,
248    trackback_blog_id integer not null,
249    trackback_title varchar(255),
250    trackback_description text,
251    trackback_rss_file varchar(255),
252    trackback_url varchar(255),
253    trackback_entry_id integer not null,
254    trackback_category_id integer not null,
255    trackback_passphrase varchar(30),
256    trackback_is_disabled boolean,
257    trackback_created_on timestamp not null,
258    trackback_modified_on timestamp not null,
259    trackback_created_by integer,
260    trackback_modified_by integer
261);
262create index mt_trackback_blog_id on mt_trackback (trackback_blog_id);
263create index mt_trackback_entry_id on mt_trackback (trackback_entry_id);
264create index mt_trackback_category_id on mt_trackback (trackback_category_id);
265create index mt_trackback_created_on on mt_trackback (trackback_created_on);
266
267create table mt_tbping (
268    tbping_id integer not null primary key,
269    tbping_blog_id integer not null,
270    tbping_tb_id integer not null,
271    tbping_title varchar(255),
272    tbping_excerpt text,
273    tbping_source_url varchar(255),
274    tbping_ip varchar(15) not null,
275    tbping_blog_name varchar(255),
276    tbping_visible smallint,
277    tbping_junk_status tinyint not null default 0,
278    tbping_junk_log text,
279    tbping_junk_score float,
280    tbping_created_on timestamp not null,
281    tbping_modified_on timestamp not null,
282    tbping_last_moved_on timestamp not null,
283    tbping_created_by integer,
284    tbping_modified_by integer
285);
286create index mt_tbping_blog_id on mt_tbping (tbping_blog_id);
287create index mt_tbping_tb_id on mt_tbping (tbping_tb_id);
288create index mt_tbping_ip on mt_tbping (tbping_ip);
289create index mt_tbping_created_on on mt_tbping (tbping_created_on);
290
291create table mt_session (
292    session_id varchar(80) not null primary key,
293    session_data text,
294    session_email varchar(255),
295    session_name varchar(255),
296    session_start integer not null,
297    session_kind varchar(2)
298);
299create index mt_session_start on mt_session (session_start);
300
301create table mt_fileinfo (
302    fileinfo_id INTEGER PRIMARY KEY,
303    fileinfo_blog_id integer not null,
304    fileinfo_entry_id integer,
305    fileinfo_url varchar(255),
306    fileinfo_file_path text,
307    fileinfo_template_id integer,
308    fileinfo_templatemap_id integer,
309    fileinfo_archive_type varchar(255),
310    fileinfo_category_id integer,
311    fileinfo_startdate varchar(80),
312    fileinfo_virtual tinyint
313);
314create index mt_fileinfo_blog_id on mt_fileinfo (fileinfo_blog_id);
315create index mt_fileinfo_entry_id on mt_fileinfo (fileinfo_entry_id);
316create index mt_fileinfo_url on mt_fileinfo (fileinfo_url);
317
Note: See TracBrowser for help on using the browser.