📄 mysql_zencart_40.sql
字号:
KEY idx_opt_sort_order_zen (products_options_sort_order)
);
# --------------------------------------------------------
#
# Table structure for table 'products_attributes_download'
#
DROP TABLE IF EXISTS products_attributes_download;
CREATE TABLE products_attributes_download (
products_attributes_id int(11) NOT NULL default '0',
products_attributes_filename varchar(255) NOT NULL default '',
products_attributes_maxdays int(2) default '0',
products_attributes_maxcount int(2) default '0',
PRIMARY KEY (products_attributes_id)
);
# --------------------------------------------------------
#
# Table structure for table 'products_description'
#
DROP TABLE IF EXISTS products_description;
CREATE TABLE products_description (
products_id int(11) NOT NULL auto_increment,
language_id int(11) NOT NULL default '1',
products_name varchar(64) NOT NULL default '',
products_description text,
products_url varchar(255) default NULL,
products_viewed int(5) default '0',
PRIMARY KEY (products_id,language_id),
KEY idx_products_name_zen (products_name)
);
# --------------------------------------------------------
#
# Table structure for table 'products_discount_quantity'
#
DROP TABLE IF EXISTS products_discount_quantity;
CREATE TABLE products_discount_quantity (
discount_id int(4) NOT NULL default '0',
products_id int(11) NOT NULL default '0',
discount_qty float NOT NULL default '0',
discount_price decimal(15,4) NOT NULL default '0.0000',
KEY idx_id_qty_zen (products_id,discount_qty)
);
# --------------------------------------------------------
#
# Table structure for table 'products_notifications'
#
DROP TABLE IF EXISTS products_notifications;
CREATE TABLE products_notifications (
products_id int(11) NOT NULL default '0',
customers_id int(11) NOT NULL default '0',
date_added datetime NOT NULL default '0001-01-01 00:00:00',
PRIMARY KEY (products_id,customers_id)
);
# --------------------------------------------------------
#
# Table structure for table 'products_options'
#
DROP TABLE IF EXISTS products_options;
CREATE TABLE products_options (
products_options_id int(11) NOT NULL default '0',
language_id int(11) NOT NULL default '1',
products_options_name varchar(32) NOT NULL default '',
products_options_sort_order int(11) NOT NULL default '0',
products_options_type int(5) NOT NULL default '0',
products_options_length smallint(2) NOT NULL default '32',
products_options_comment varchar(64) default NULL,
products_options_size smallint(2) NOT NULL default '32',
products_options_images_per_row int(2) default '5',
products_options_images_style int(1) default '0',
products_options_rows smallint(2) NOT NULL default '1',
PRIMARY KEY (products_options_id,language_id),
KEY idx_lang_id_zen (language_id),
KEY idx_products_options_sort_order_zen (products_options_sort_order),
KEY idx_products_options_name_zen (products_options_name)
);
# --------------------------------------------------------
#
# Table structure for table 'products_options_types'
#
DROP TABLE IF EXISTS products_options_types;
CREATE TABLE products_options_types (
products_options_types_id int(11) NOT NULL default '0',
products_options_types_name varchar(32) default NULL,
PRIMARY KEY (products_options_types_id)
) COMMENT='Track products_options_types';
# --------------------------------------------------------
#
# Table structure for table 'products_options_values'
#
DROP TABLE IF EXISTS products_options_values;
CREATE TABLE products_options_values (
products_options_values_id int(11) NOT NULL default '0',
language_id int(11) NOT NULL default '1',
products_options_values_name varchar(64) NOT NULL default '',
products_options_values_sort_order int(11) NOT NULL default '0',
PRIMARY KEY (products_options_values_id,language_id),
KEY idx_products_options_values_name_zen (products_options_values_name),
KEY idx_products_options_values_sort_order_zen (products_options_values_sort_order)
);
# --------------------------------------------------------
#
# Table structure for table 'products_options_values_to_products_options'
#
DROP TABLE IF EXISTS products_options_values_to_products_options;
CREATE TABLE products_options_values_to_products_options (
products_options_values_to_products_options_id int(11) NOT NULL auto_increment,
products_options_id int(11) NOT NULL default '0',
products_options_values_id int(11) NOT NULL default '0',
PRIMARY KEY (products_options_values_to_products_options_id),
KEY idx_products_options_id_zen (products_options_id),
KEY idx_products_options_values_id_zen (products_options_values_id)
);
# --------------------------------------------------------
#
# Table structure for table 'products_to_categories'
#
DROP TABLE IF EXISTS products_to_categories;
CREATE TABLE products_to_categories (
products_id int(11) NOT NULL default '0',
categories_id int(11) NOT NULL default '0',
PRIMARY KEY (products_id,categories_id),
KEY idx_cat_prod_id_zen (categories_id,products_id)
);
# --------------------------------------------------------
#
# Table structure for table 'project_version'
#
DROP TABLE IF EXISTS project_version;
CREATE TABLE project_version (
project_version_id tinyint(3) NOT NULL auto_increment,
project_version_key varchar(40) NOT NULL default '',
project_version_major varchar(20) NOT NULL default '',
project_version_minor varchar(20) NOT NULL default '',
project_version_patch1 varchar(20) NOT NULL default '',
project_version_patch2 varchar(20) NOT NULL default '',
project_version_patch1_source varchar(20) NOT NULL default '',
project_version_patch2_source varchar(20) NOT NULL default '',
project_version_comment varchar(250) NOT NULL default '',
project_version_date_applied datetime NOT NULL default '0001-01-01 01:01:01',
PRIMARY KEY (project_version_id),
UNIQUE KEY idx_project_version_key_zen (project_version_key)
) COMMENT='Database Version Tracking';
# --------------------------------------------------------
#
# Table structure for table 'project_version_history'
#
DROP TABLE IF EXISTS project_version_history;
CREATE TABLE project_version_history (
project_version_id tinyint(3) NOT NULL auto_increment,
project_version_key varchar(40) NOT NULL default '',
project_version_major varchar(20) NOT NULL default '',
project_version_minor varchar(20) NOT NULL default '',
project_version_patch varchar(20) NOT NULL default '',
project_version_comment varchar(250) NOT NULL default '',
project_version_date_applied datetime NOT NULL default '0001-01-01 01:01:01',
PRIMARY KEY (project_version_id)
) COMMENT='Database Version Tracking History';
# --------------------------------------------------------
#
# Table structure for table 'query_builder'
# This table is used by audiences.php for building data-extraction queries
#
DROP TABLE IF EXISTS query_builder;
CREATE TABLE query_builder (
query_id int(11) NOT NULL auto_increment,
query_category varchar(40) NOT NULL default '',
query_name varchar(80) NOT NULL default '',
query_description TEXT NOT NULL,
query_string TEXT NOT NULL,
query_keys_list TEXT NOT NULL,
PRIMARY KEY (query_id),
UNIQUE KEY query_name (query_name)
) COMMENT='Stores queries for re-use in Admin email and report modules';
# --------------------------------------------------------
#
# Table structure for table 'record_artists'
#
DROP TABLE IF EXISTS record_artists;
CREATE TABLE record_artists (
artists_id int(11) NOT NULL auto_increment,
artists_name varchar(32) NOT NULL default '',
artists_image varchar(64) default NULL,
date_added datetime default NULL,
last_modified datetime default NULL,
PRIMARY KEY (artists_id),
KEY idx_rec_artists_name_zen (artists_name)
);
# --------------------------------------------------------
#
# Table structure for table 'record_artists_info'
#
DROP TABLE IF EXISTS record_artists_info;
CREATE TABLE record_artists_info (
artists_id int(11) NOT NULL default '0',
languages_id int(11) NOT NULL default '0',
artists_url varchar(255) NOT NULL default '',
url_clicked int(5) NOT NULL default '0',
date_last_click datetime default NULL,
PRIMARY KEY (artists_id,languages_id)
);
# --------------------------------------------------------
#
# Table structure for table 'record_company'
#
DROP TABLE IF EXISTS record_company;
CREATE TABLE record_company (
record_company_id int(11) NOT NULL auto_increment,
record_company_name varchar(32) NOT NULL default '',
record_company_image varchar(64) default NULL,
date_added datetime default NULL,
last_modified datetime default NULL,
PRIMARY KEY (record_company_id),
KEY idx_rec_company_name_zen (record_company_name)
);
# --------------------------------------------------------
#
# Table structure for table 'record_company_info'
#
DROP TABLE IF EXISTS record_company_info;
CREATE TABLE record_company_info (
record_company_id int(11) NOT NULL default '0',
languages_id int(11) NOT NULL default '0',
record_company_url varchar(255) NOT NULL default '',
url_clicked int(5) NOT NULL default '0',
date_last_click datetime default NULL,
PRIMARY KEY (record_company_id,languages_id)
);
# --------------------------------------------------------
#
# Table structure for table 'reviews'
#
DROP TABLE IF EXISTS reviews;
CREATE TABLE reviews (
reviews_id int(11) NOT NULL auto_increment,
products_id int(11) NOT NULL default '0',
customers_id int(11) default NULL,
customers_name varchar(64) NOT NULL default '',
reviews_rating int(1) default NULL,
date_added datetime default NULL,
last_modified datetime default NULL,
reviews_read int(5) NOT NULL default '0',
status int(1) NOT NULL default '1',
PRIMARY KEY (reviews_id),
KEY idx_products_id_zen (products_id),
KEY idx_customers_id_zen (customers_id),
KEY idx_status_zen (status),
KEY idx_date_added_zen (date_added)
);
# --------------------------------------------------------
#
# Table structure for table 'reviews_description'
#
DROP TABLE IF EXISTS reviews_description;
CREATE TABLE reviews_description (
reviews_id int(11) NOT NULL default '0',
languages_id int(11) NOT NULL default '0',
reviews_text text NOT NULL,
PRIMARY KEY (reviews_id,languages_id)
);
# --------------------------------------------------------
#
# Table structure for table 'salemaker_sales'
#
DROP TABLE IF EXISTS salemaker_sales;
CREATE TABLE salemaker_sales (
sale_id int(11) NOT NULL auto_increment,
sale_status tinyint(4) NOT NULL default '0',
sale_name varchar(30) NOT NULL default '',
sale_deduction_value decimal(15,4) NOT NULL default '0.0000',
sale_deduction_type tinyint(4) NOT NULL default '0',
sale_pricerange_from decimal(15,4) NOT NULL default '0.0000',
sale_pricerange_to decimal(15,4) NOT NULL default '0.0000',
sale_specials_condition tinyint(4) NOT NULL default '0',
sale_categories_selected text,
sale_categories_all text,
sale_date_start date NOT NULL default '0001-01-01',
sale_date_end date NOT NULL default '0001-01-01',
sale_date_added date NOT NULL default '0001-01-01',
sale_date_last_modified date NOT NULL default '0001-01-01',
sale_date_status_change date NOT NULL default '0001-01-01',
PRIMARY KEY (sale_id),
KEY idx_sale_status_zen (sale_status),
KEY idx_sale_date_start_zen (sale_date_start),
KEY idx_sale_date_end_zen (sale_date_end)
);
# --------------------------------------------------------
#
# Table structure for table 'sessions'
#
DROP TABLE IF EXISTS sessions;
CREATE TABLE sessions (
sesskey varchar(32) NOT NULL default '',
expiry int(11) unsigned NOT NULL default '0',
value mediumblob NOT NULL,
PRIMARY KEY (sesskey)
);
# --------------------------------------------------------
#
# Table structure for table 'specials'
#
DROP TABLE IF EXISTS specials;
CREATE TABLE specials (
specials_id int(11) NOT NULL auto_increment,
products_id int(11) NOT NULL default '0',
specials_new_products_price decimal(15,4) NOT NULL default '0.0000',
specials_date_added datetime default NULL,
specials_last_modified datetime default NULL,
expires_date date NOT NULL default '0001-01-01',
date_status_change datetime default NULL,
status int(1) NOT NULL default '1',
specials_date_available date NOT NULL default '0001-01-01',
PRIMARY KEY (specials_id),
KEY idx_status_zen (status),
KEY idx_products_id_zen (products_id),
KEY idx_date_avail_zen (specials_date_available),
KEY idx_expires_date_zen (expires_date)
);
# ---
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -