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