This repository has been archived by the owner on May 27, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 30
/
data.sql
353 lines (325 loc) · 11.8 KB
/
data.sql
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
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
CREATE TABLE sessions (
session_id char(128) UNIQUE NOT NULL,
atime integer NOT NULL default current_timestamp,
data text,
PRIMARY KEY (session_id)
);
CREATE TABLE ms_bank (
id integer primary key autoincrement,
name varchar(64) default NULL,
account varchar(64) default NULL,
currency_id integer default NULL,
holder varchar(64) default NULL,
branch varchar(64) default NULL,
address varchar(255) default NULL,
country varchar(64) default NULL,
swift varchar(64) default NULL,
active integer default 1,
note text,
log_id integer default NULL,
extra text
);
CREATE TABLE ms_blog_category (
id integer primary key autoincrement,
log_id integer default NULL,
category text,
active integer default 1,
extra text
);
CREATE TABLE ms_category (
id integer primary key autoincrement,
name text,
priority integer default NULL,
active integer default 1,
log_id integer default NULL,
extra text
);
CREATE TABLE ms_config (
param varchar(64) NOT NULL default '',
value text,
log_id integer default NULL,
PRIMARY KEY (param)
);
INSERT INTO ms_config (param, value, log_id) VALUES ('allow_user','',NULL);
INSERT INTO ms_config (param, value, log_id) VALUES ('another_email','',NULL);
INSERT INTO ms_config (param, value, log_id) VALUES ('blog_show_style','date',NULL);
INSERT INTO ms_config (param, value, log_id) VALUES ('cart_check_stock','',NULL);
INSERT INTO ms_config (param, value, log_id) VALUES ('currency','',NULL);
INSERT INTO ms_config (param, value, log_id) VALUES ('expose_error','1',NULL);
INSERT INTO ms_config (param, value, log_id) VALUES ('extra_info','',NULL);
INSERT INTO ms_config (param, value, log_id) VALUES ('general_error_message','',NULL);
INSERT INTO ms_config (param, value, log_id) VALUES ('homepage','',NULL);
INSERT INTO ms_config (param, value, log_id) VALUES ('invoice_extra_info','',NULL);
INSERT INTO ms_config (param, value, log_id) VALUES ('invoice_show_bank','1',NULL);
INSERT INTO ms_config (param, value, log_id) VALUES ('invoice_show_paypal','1',NULL);
INSERT INTO ms_config (param, value, log_id) VALUES ('lang','',NULL);
INSERT INTO ms_config (param, value, log_id) VALUES ('logo_file','',NULL);
INSERT INTO ms_config (param, value, log_id) VALUES ('news_max','5',NULL);
INSERT INTO ms_config (param, value, log_id) VALUES ('offline','1',NULL);
INSERT INTO ms_config (param, value, log_id) VALUES ('payment_month','12',NULL);
INSERT INTO ms_config (param, value, log_id) VALUES ('promo_host','',NULL);
INSERT INTO ms_config (param, value, log_id) VALUES ('secure','',NULL);
INSERT INTO ms_config (param, value, log_id) VALUES ('site_description','',NULL);
INSERT INTO ms_config (param, value, log_id) VALUES ('site_keywords','',NULL);
INSERT INTO ms_config (param, value, log_id) VALUES ('sticky_info','',NULL);
INSERT INTO ms_config (param, value, log_id) VALUES ('template','default',NULL);
INSERT INTO ms_config (param, value, log_id) VALUES ('template_param','',NULL);
INSERT INTO ms_config (param, value, log_id) VALUES ('use_cart','1',NULL);
INSERT INTO ms_config (param, value, log_id) VALUES ('expose_time','1',NULL);
INSERT INTO ms_config (param, value, log_id) VALUES ('promote','1',NULL);
INSERT INTO ms_config (param, value, log_id) VALUES ('payments','1,2,3,',NULL);
INSERT INTO ms_config (param, value, log_id) VALUES ('max_product_category','100',NULL);
INSERT INTO ms_config (param, value, log_id) VALUES ('max_product','500',NULL);
INSERT INTO ms_config (param, value, log_id) VALUES ('max_file_size','512000',NULL);
INSERT INTO ms_config (param, value, log_id) VALUES ('max_files','500',NULL);
INSERT INTO ms_config (param, value, log_id) VALUES ('mail_smtp','',NULL);
INSERT INTO ms_config (param, value, log_id) VALUES ('mail_user','',NULL);
INSERT INTO ms_config (param, value, log_id) VALUES ('mail_pass','',NULL);
INSERT INTO ms_config (param, value, log_id) VALUES ('mail_default','',NULL);
INSERT INTO ms_config (param, value, log_id) VALUES ('url_base','/',NULL);
INSERT INTO ms_config (param, value, log_id) VALUES ('font_dir','/usr/share/fonts/truetype/freefont/',NULL);
CREATE TABLE ms_currency (
id integer primary key autoincrement,
name varchar(8) default NULL,
csymbol varchar(8) default NULL,
log_id integer default NULL,
extra text
);
INSERT INTO ms_currency (id, name, csymbol, log_id, extra) VALUES (1,'IDR','Rp',NULL,NULL);
INSERT INTO ms_currency (id, name, csymbol, log_id, extra) VALUES (2,'USD','$',NULL,NULL);
INSERT INTO ms_currency (id, name, csymbol, log_id, extra) VALUES (3,'SGD','$',NULL,NULL);
INSERT INTO ms_currency (id, name, csymbol, log_id, extra) VALUES (4,'MYR','RM',NULL,NULL);
INSERT INTO ms_currency (id, name, csymbol, log_id, extra) VALUES (5,'HKD','$',NULL,NULL);
INSERT INTO ms_currency (id, name, csymbol, log_id, extra) VALUES (6,'JPY','¥',NULL,NULL);
INSERT INTO ms_currency (id, name, csymbol, log_id, extra) VALUES (7,'CNY','¥',NULL,NULL);
INSERT INTO ms_currency (id, name, csymbol, log_id, extra) VALUES (8,'GBP','£',NULL,NULL);
INSERT INTO ms_currency (id, name, csymbol, log_id, extra) VALUES (9,'AUD','$',NULL,NULL);
INSERT INTO ms_currency (id, name, csymbol, log_id, extra) VALUES (10,'NZD','$',NULL,NULL);
CREATE TABLE ms_file (
id integer primary key autoincrement,
log_id integer default NULL,
name varchar(255) default NULL,
name_add varchar(8) default NULL,
size integer default NULL,
description varchar(255) default NULL,
type varchar(255) default NULL,
type_options text,
disposition varchar(255) default NULL,
disposition_options text,
content blob,
date_file integer default NULL,
headers text,
purpose varchar(64) default NULL,
extra text
);
CREATE TABLE ms_group (
id integer primary key autoincrement,
name varchar(64) default NULL,
extra text,
log_id integer default NULL
);
INSERT INTO ms_group (id, name, extra, log_id) VALUES (1,'ADMIN',NULL,NULL);
INSERT INTO ms_group (id, name, extra, log_id) VALUES (2,'USER',NULL,NULL);
CREATE TABLE ms_link (
id integer primary key autoincrement,
code text,
purpose varchar(64) default NULL,
log_id integer default NULL,
extra text
);
CREATE TABLE ms_payment_type (
id integer primary key autoincrement,
name varchar(64) default NULL,
log_id integer default NULL,
extra text
);
INSERT INTO ms_payment_type (id, name, log_id, extra) VALUES (1,'Cash',NULL,NULL);
INSERT INTO ms_payment_type (id, name, log_id, extra) VALUES (2,'Cash On Delivery',NULL,NULL);
INSERT INTO ms_payment_type (id, name, log_id, extra) VALUES (3,'Bank/Wire Transfer',NULL,NULL);
INSERT INTO ms_payment_type (id, name, log_id, extra) VALUES (4,'Credit',NULL,NULL);
INSERT INTO ms_payment_type (id, name, log_id, extra) VALUES (5,'Debit Card',NULL,NULL);
INSERT INTO ms_payment_type (id, name, log_id, extra) VALUES (6,'Credit Card',NULL,NULL);
INSERT INTO ms_payment_type (id, name, log_id, extra) VALUES (7,'Voucher',NULL,NULL);
INSERT INTO ms_payment_type (id, name, log_id, extra) VALUES (8,'Gift Card',NULL,NULL);
INSERT INTO ms_payment_type (id, name, log_id, extra) VALUES (9,'PayPal',NULL,NULL);
INSERT INTO ms_payment_type (id, name, log_id, extra) VALUES (10,'Other',NULL,NULL);
CREATE TABLE ms_paypal (
id integer primary key autoincrement,
account varchar(255) default NULL,
active integer default 1,
log_id integer default NULL,
extra text
);
CREATE TABLE ms_product (
id integer primary key autoincrement,
name text,
category_id integer default NULL,
description text,
full_info text,
file_id integer default NULL,
related text,
active integer default 1,
priority integer default NULL,
allow_comment integer default 0,
log_id integer default NULL,
extra text
);
CREATE TABLE ms_product_variant (
id integer primary key autoincrement,
product_id integer default NULL,
name text,
stock integer default NULL,
price real default NULL,
currency_id integer default NULL,
taxratio real default NULL,
variant_file_id integer default NULL,
active integer default 1,
log_id integer default NULL,
extra text
);
CREATE TABLE ms_redirect (
id integer primary key autoincrement,
url varchar(255) default NULL,
target varchar(255) default NULL,
type varchar(64) default NULL,
log_id integer default NULL,
extra text
);
CREATE TABLE ms_user (
id integer primary key autoincrement,
name varchar(64) default NULL,
group_id integer default NULL,
password varchar(64) default NULL,
first_name varchar(64) default NULL,
last_name varchar(64) default NULL,
email text,
phone text,
fax text,
web text,
icontact text,
acontact text,
govid text,
address text,
active integer default 1,
payment text,
photo blob,
log_id integer default NULL,
extra text
);
INSERT INTO ms_user
(id, name, group_id, password, first_name, last_name,
email, phone, fax, web, icontact, acontact, govid,
address, active, payment, photo, log_id, extra)
VALUES (1,'admin',1,'21232f297a57a5a743894a0e4a801fc3',
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,NULL,NULL,NULL);
CREATE TABLE ms_user_content (
id integer primary key autoincrement,
page text,
content text,
active integer default 1,
show_in_menu integer default NULL,
priority integer default NULL,
log_id integer default NULL,
extra text
);
CREATE TABLE ms_yahoo (
id integer primary key autoincrement,
account varchar(255) default NULL,
type varchar(8) default NULL,
log_id integer default NULL,
extra text
);
CREATE TABLE tr_blog (
id integer primary key autoincrement,
log_id integer default NULL,
category_id integer default NULL,
date_news integer default NULL,
title text,
description text,
blog text,
allow_comment integer default 0,
active integer default 1,
extra text
);
CREATE TABLE tr_comment (
id integer primary key autoincrement,
log_id integer default NULL,
date_comment integer default NULL,
product_id integer default NULL,
blog_id integer default NULL,
nested_comment_id integer default NULL,
url varchar(255) default NULL,
author varchar(64) default NULL,
email varchar(255) default NULL,
web varchar(255) default NULL,
comment text,
published integer default NULL,
extra text
);
CREATE TABLE tr_faq (
id integer primary key autoincrement,
log_id integer default NULL,
category text,
question text,
answer text,
file_id integer default NULL,
extra text
);
CREATE TABLE tr_invoice_detail (
id integer primary key autoincrement,
header_id integer default NULL,
product_variant integer default NULL,
saved_price real default NULL,
saved_tax real default NULL,
amount integer default NULL,
log_id integer default NULL
);
CREATE TABLE tr_invoice_header (
id integer primary key autoincrement,
cart_id varchar(64) default NULL,
log_id integer default NULL,
total real default NULL,
date_purchase integer default NULL,
date_due integer default NULL,
date_paid integer default NULL,
payment_type integer default NULL,
used_currency integer default NULL,
cust_name varchar(64) default NULL,
cust_email varchar(255) default NULL,
ship_addr text,
note text,
payment_info text,
confirm_info text,
invoice_text text,
invoice_lang varchar(8) default NULL,
done integer default 0,
extra text
);
CREATE TABLE tr_log (
id integer primary key autoincrement,
date_log integer default NULL,
date_log_last integer default NULL,
activity integer default NULL,
ip varchar(64) default NULL,
country varchar(64) default NULL,
referer varchar(255) default NULL,
url varchar(255) default NULL,
url_last varchar(255) default NULL,
method varchar(8) default NULL,
user_agent varchar(255) default NULL,
user_id integer default NULL,
user_id_last integer default NULL,
login_activity text,
audit text,
extra text
);
CREATE TABLE tr_news (
id integer primary key autoincrement,
log_id integer default NULL,
date_news integer default NULL,
title text,
description text,
news text,
file_id integer default NULL,
extra text
);