forked from cobwebch/externalimport_test
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathext_tables.sql
More file actions
executable file
·127 lines (113 loc) · 3.06 KB
/
Copy pathext_tables.sql
File metadata and controls
executable file
·127 lines (113 loc) · 3.06 KB
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
#
# Table structure for products
#
CREATE TABLE tx_externalimporttest_product (
sku varchar(255) DEFAULT '' NOT NULL,
name varchar(255) DEFAULT '' NOT NULL,
path_segment varchar(2048) DEFAULT '' NOT NULL,
tags varchar(255) DEFAULT '' NOT NULL,
attributes text,
stores int(11) DEFAULT '0' NOT NULL,
categories int(11) DEFAULT '0' NOT NULL,
pictures int(11) DEFAULT '0' NOT NULL,
designers int(11) DEFAULT '0' NOT NULL,
created int(11) DEFAULT '0' NOT NULL
);
#
# Table structure for tags
#
CREATE TABLE tx_externalimporttest_tag (
code varchar(20) DEFAULT '' NOT NULL,
name varchar(255) DEFAULT '' NOT NULL
);
#
# Table structure for designers
#
CREATE TABLE tx_externalimporttest_designer (
name varchar(255) DEFAULT '' NOT NULL,
code varchar(20) DEFAULT '' NOT NULL,
products int(11) DEFAULT '0' NOT NULL,
picture int(11) DEFAULT '0' NOT NULL
);
CREATE TABLE tx_externalimporttest_product_designer_mm (
uid_local int(11) DEFAULT '0' NOT NULL,
uid_foreign int(11) DEFAULT '0' NOT NULL,
sorting int(11) DEFAULT '0' NOT NULL,
sorting_foreign int(11) DEFAULT '0' NOT NULL
);
#
# Table structure for orders
#
CREATE TABLE tx_externalimporttest_order (
order_date int(11) DEFAULT '0' NOT NULL,
products int(11) DEFAULT '0' NOT NULL,
client_id varchar(255) DEFAULT '' NOT NULL,
order_id varchar(255) DEFAULT '' NOT NULL
);
#
# Table structure for order details
#
CREATE TABLE tx_externalimporttest_order_items (
uid_local int(11) DEFAULT '0' NOT NULL,
uid_foreign int(11) DEFAULT '0' NOT NULL,
sorting_foreign int(11) DEFAULT '0' NOT NULL,
quantity int(11) DEFAULT '0' NOT NULL,
KEY uid_local (uid_local),
KEY uid_foreign (uid_foreign)
);
#
# Table structure for bundles
#
CREATE TABLE tx_externalimporttest_bundle (
name varchar(255) DEFAULT '' NOT NULL,
products int(11) DEFAULT '0' NOT NULL,
bundle_code char(10) DEFAULT '' NOT NULL,
maker varchar(255) DEFAULT '' NOT NULL
);
#
# Table structure for order bundle items
#
CREATE TABLE tx_externalimporttest_bundle_product_mm (
uid_local int(11) DEFAULT '0' NOT NULL,
uid_foreign int(11) DEFAULT '0' NOT NULL,
sorting int(11) DEFAULT '0' NOT NULL,
KEY uid_local (uid_local),
KEY uid_foreign (uid_foreign)
);
#
# Table structure for stores
#
CREATE TABLE tx_externalimporttest_store (
name varchar(255) DEFAULT '' NOT NULL,
store_code char(10) DEFAULT '' NOT NULL,
products int(11) DEFAULT '0' NOT NULL
);
#
# Table structure for store stocks
#
CREATE TABLE tx_externalimporttest_store_product (
store int(11) DEFAULT '0' NOT NULL,
product int(11) DEFAULT '0' NOT NULL,
stock int(11) DEFAULT '0' NOT NULL
);
#
# Table structure for invoices
#
CREATE TABLE tx_externalimporttest_invoice (
invoice_id varchar(255) DEFAULT '' NOT NULL,
order_id int(11) DEFAULT '0' NOT NULL,
amount double(11,2) DEFAULT '0.0' NOT NULL,
currency char(3) DEFAULT 'USD' NOT NULL
);
#
# Extend pages table for product-to-pages import
#
CREATE TABLE pages (
product_sku varchar(255) DEFAULT '' NOT NULL
);
#
# Extend sys_category table for product categories import
#
CREATE TABLE sys_category (
external_key varchar(255) DEFAULT '' NOT NULL
);