sectionIds varchar(255) default '' not null,
scores varchar(255) default '' not null,
PRIMARY KEY (id)
-);
+) engine=myisam;
#
# Table structure for table 'image'
paid_manually integer not null default 0,
coupon_id integer null,
- coupon_code_discount_pc real not null default 0,
+ -- obsolete
+ coupon_code_discount_pc real null default 0,
delivery_in integer null,
+ product_cost_discount integer not null default 0,
+
+ coupon_cart_wide integer not null default 1,
+
+ coupon_description varchar(255) not null default '',
+
primary key (id),
index order_cchash(ccNumberHash),
index order_userId(userId, orderDate),
product_code varchar(80) not null default '',
+ tier_id integer null default null,
+
+ product_discount integer not null default 0,
+ product_discount_units integer not null default 0,
+
primary key (id),
index order_item_order(orderId, id)
-);
+) engine=InnoDB;
drop table if exists other_parents;
create table other_parents (
retailPrice integer not null,
unique tier_product(tier_id, product_id)
-);
+) engine=InnoDB;
create table bse_tags (
id integer not null auto_increment primary key,
expiry date not null,
- discount_percent real not null,
+ discount_percent real null,
campaign varchar(20) not null,
untiered integer not null default 0,
+ classid varchar(20) not null default 'bse_simple',
+
+ config blob not null,
+
unique codes(code)
) engine=InnoDB;
foreign key (tier_id) references bse_price_tiers(id)
on delete cascade on update restrict
) engine=InnoDB;
+
+alter table order_item add constraint tier_id
+ foreign key (tier_id) references bse_price_tiers(id)
+ on delete restrict on update restrict;
+