UX Improvements for Home page and Accessibility Statement page
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -28,6 +28,8 @@ DROP TABLE IF EXISTS tmp_Shop_Supplier;
|
||||
DROP TABLE IF EXISTS tmp_Shop_Manufacturing_Purchase_Order_Product_Link;
|
||||
DROP TABLE IF EXISTS tmp_Shop_Manufacturing_Purchase_Order;
|
||||
DROP TABLE IF EXISTS tmp_Shop_Customer;
|
||||
DROP TABLE IF EXISTS tmp_Shop_Customer_Sale_Order_Product_Link;
|
||||
DROP TABLE IF EXISTS tmp_Shop_Customer_Sale_Order;
|
||||
|
||||
|
||||
|
||||
@@ -39,6 +41,7 @@ DROP TABLE IF EXISTS Shop_Customer_Sales_Order_Product_Link;
|
||||
DROP TABLE IF EXISTS Shop_Customer_Sales_Order_Audit;
|
||||
DROP TABLE IF EXISTS Shop_Customer_Sales_Order;
|
||||
|
||||
DROP TABLE IF EXISTS Shop_Customer_Temp;
|
||||
DROP TABLE IF EXISTS Shop_Customer_Audit;
|
||||
DROP TABLE IF EXISTS Shop_Customer;
|
||||
|
||||
@@ -56,15 +59,11 @@ DROP TABLE IF EXISTS Shop_Supplier_Purchase_Order_Product_Link;
|
||||
DROP TABLE IF EXISTS Shop_Supplier_Purchase_Order_Audit;
|
||||
DROP TABLE IF EXISTS Shop_Supplier_Purchase_Order;
|
||||
|
||||
DROP TABLE IF EXISTS Shop_Unit_Measurement_Conversion_Audit;
|
||||
DROP TABLE IF EXISTS Shop_Unit_Measurement_Conversion;
|
||||
|
||||
DROP TABLE IF EXISTS Shop_Unit_Measurement_Audit;
|
||||
DROP TABLE IF EXISTS Shop_Unit_Measurement;
|
||||
|
||||
DROP TABLE IF EXISTS Shop_Supplier_Temp;
|
||||
DROP TABLE IF EXISTS Shop_Supplier_Audit;
|
||||
DROP TABLE IF EXISTS Shop_Supplier;
|
||||
|
||||
|
||||
DROP TABLE IF EXISTS Shop_User_Order_Product_Link_Audit;
|
||||
DROP TABLE IF EXISTS Shop_User_Order_Product_Link;
|
||||
|
||||
@@ -111,11 +110,16 @@ DROP TABLE IF EXISTS Shop_Product_Delivery_Option_Link;
|
||||
DROP TABLE IF EXISTS Shop_Delivery_Option_Audit;
|
||||
DROP TABLE IF EXISTS Shop_Delivery_Option;
|
||||
|
||||
DROP TABLE IF EXISTS Shop_Image_Audit;
|
||||
DROP TABLE IF EXISTS Shop_Image;
|
||||
DROP TABLE IF EXISTS Shop_Product_Image_Audit;
|
||||
DROP TABLE IF EXISTS Shop_Product_Image;
|
||||
|
||||
DROP TABLE IF EXISTS Shop_Image_Type_Audit;
|
||||
DROP TABLE IF EXISTS Shop_Image_Type;
|
||||
DROP TABLE IF EXISTS Shop_Product_Price_Temp;
|
||||
DROP TABLE IF EXISTS Shop_Product_Price_Audit;
|
||||
DROP TABLE IF EXISTS Shop_Product_Price;
|
||||
|
||||
DROP TABLE IF EXISTS Shop_Stock_Item_Temp;
|
||||
DROP TABLE IF EXISTS Shop_Stock_Item_Audit;
|
||||
DROP TABLE IF EXISTS Shop_Stock_Item;
|
||||
|
||||
DROP TABLE IF EXISTS Shop_Product_Currency_Region_Link_Audit;
|
||||
DROP TABLE IF EXISTS Shop_Product_Currency_Region_Link;
|
||||
@@ -127,9 +131,6 @@ DROP TABLE IF EXISTS Shop_Product_Variation_Link;
|
||||
DROP TABLE IF EXISTS Shop_Product_Permutation_Variation_Link_Audit;
|
||||
DROP TABLE IF EXISTS Shop_Product_Permutation_Variation_Link;
|
||||
|
||||
DROP TABLE IF EXISTS Shop_Product_Permutation_Audit;
|
||||
DROP TABLE IF EXISTS Shop_Product_Permutation;
|
||||
|
||||
DROP TABLE IF EXISTS Shop_Variation_Audit;
|
||||
DROP TABLE IF EXISTS Shop_Variation;
|
||||
DROP TABLE IF EXISTS Shop_Product_Variation_Type_Link_Audit;
|
||||
@@ -138,30 +139,60 @@ DROP TABLE IF EXISTS Shop_Product_Variation_Type_Link;
|
||||
DROP TABLE IF EXISTS Shop_Variation_Type_Audit;
|
||||
DROP TABLE IF EXISTS Shop_Variation_Type;
|
||||
|
||||
DROP TABLE IF EXISTS Shop_Recurrence_Interval_Audit;
|
||||
DROP TABLE IF EXISTS Shop_Recurrence_Interval;
|
||||
|
||||
DROP TABLE IF EXISTS Shop_Product_Permutation_Temp;
|
||||
DROP TABLE IF EXISTS Shop_Product_Permutation_Audit;
|
||||
DROP TABLE IF EXISTS Shop_Product_Permutation;
|
||||
|
||||
DROP TABLE IF EXISTS Shop_Product_Audit;
|
||||
DROP TABLE IF EXISTS Shop_Product;
|
||||
|
||||
DROP TABLE IF EXISTS Shop_Category_Audit;
|
||||
DROP TABLE IF EXISTS Shop_Category;
|
||||
|
||||
DROP TABLE IF EXISTS Shop_Tax_Or_Surcharge_Temp;
|
||||
DROP TABLE IF EXISTS Shop_Tax_Or_Surcharge_Audit;
|
||||
DROP TABLE IF EXISTS Shop_Tax_Or_Surcharge;
|
||||
|
||||
DROP TABLE IF EXISTS Shop_Currency_Temp;
|
||||
DROP TABLE IF EXISTS Shop_Currency_Audit;
|
||||
DROP TABLE IF EXISTS Shop_Currency;
|
||||
|
||||
DROP TABLE IF EXISTS Shop_Storage_Location_Branch_Temp;
|
||||
DROP TABLE IF EXISTS Shop_Storage_Location_Branch_Audit;
|
||||
DROP TABLE IF EXISTS Shop_Storage_Location_Branch;
|
||||
|
||||
DROP TABLE IF EXISTS Shop_Storage_Location_Temp;
|
||||
DROP TABLE IF EXISTS Shop_Storage_Location_Audit;
|
||||
DROP TABLE IF EXISTS Shop_Storage_Location;
|
||||
|
||||
DROP TABLE IF EXISTS Shop_Plant_Temp;
|
||||
DROP TABLE IF EXISTS Shop_Plant_Audit;
|
||||
DROP TABLE IF EXISTS Shop_Plant;
|
||||
|
||||
DROP TABLE IF EXISTS Shop_Delivery_Region_Branch_Audit;
|
||||
DROP TABLE IF EXISTS Shop_Delivery_Region_Branch;
|
||||
DROP TABLE IF EXISTS Shop_Region_Branch_Temp;
|
||||
DROP TABLE IF EXISTS Shop_Region_Branch_Audit;
|
||||
DROP TABLE IF EXISTS Shop_Region_Branch;
|
||||
|
||||
DROP TABLE IF EXISTS Shop_Delivery_Region_Audit;
|
||||
DROP TABLE IF EXISTS Shop_Delivery_Region;
|
||||
DROP TABLE IF EXISTS Shop_Region_Temp;
|
||||
DROP TABLE IF EXISTS Shop_Region_Audit;
|
||||
DROP TABLE IF EXISTS Shop_Region;
|
||||
|
||||
DROP TABLE IF EXISTS Shop_Recurrence_Interval_Audit;
|
||||
DROP TABLE IF EXISTS Shop_Recurrence_Interval;
|
||||
|
||||
DROP TABLE IF EXISTS Shop_Category_Audit;
|
||||
DROP TABLE IF EXISTS Shop_Category;
|
||||
DROP TABLE IF EXISTS Shop_Unit_Measurement_Conversion_Audit;
|
||||
DROP TABLE IF EXISTS Shop_Unit_Measurement_Conversion;
|
||||
|
||||
DROP TABLE IF EXISTS Shop_Unit_Measurement_Audit;
|
||||
DROP TABLE IF EXISTS Shop_Unit_Measurement;
|
||||
|
||||
DROP TABLE IF EXISTS Shop_Image_Type_Audit;
|
||||
DROP TABLE IF EXISTS Shop_Image_Type;
|
||||
|
||||
DROP TABLE IF EXISTS Shop_General_Audit;
|
||||
DROP TABLE IF EXISTS Shop_General;
|
||||
@@ -170,13 +201,11 @@ DROP TABLE IF EXISTS File_Type_Audit;
|
||||
DROP TABLE IF EXISTS File_Type;
|
||||
|
||||
DROP TABLE IF EXISTS Msg_Error_Type;
|
||||
DROP TABLE IF EXISTS Shop_Msg_Error_Type;
|
||||
|
||||
DROP TABLE IF EXISTS Shop_Access_Level_Audit;
|
||||
DROP TABLE IF EXISTS Shop_Access_Level;
|
||||
|
||||
DROP TABLE IF EXISTS Shop_Sales_And_Purchasing_Change_Set;
|
||||
DROP TABLE IF EXISTS Shop_User_Change_Set;
|
||||
|
||||
DROP TABLE IF EXISTS Shop_Msg_Error_Type;
|
||||
|
||||
DROP TABLE IF EXISTS Shop_Product_Change_Set;
|
||||
@@ -7,6 +7,12 @@ SELECT CONCAT('WARNING: Table ', TABLE_NAME, ' already exists.') AS msg_warning
|
||||
|
||||
CREATE TABLE IF NOT EXISTS Shop_Image_Type (
|
||||
id_type INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||
/*
|
||||
id_type_file INT NOT NULL,
|
||||
CONSTRAINT FK_Shop_Image_Type_id_type_file
|
||||
FOREIGN KEY (id_type_file)
|
||||
REFERENCES File_Type(id_type),
|
||||
*/
|
||||
code VARCHAR(50),
|
||||
name VARCHAR(255),
|
||||
name_plural VARCHAR(256),
|
||||
20
static/MySQL/1102_tbl_Shop_Region_Temp.sql
Normal file
20
static/MySQL/1102_tbl_Shop_Region_Temp.sql
Normal file
@@ -0,0 +1,20 @@
|
||||
|
||||
# Region Temp
|
||||
|
||||
USE PARTSLTD_PROD;
|
||||
|
||||
SELECT CONCAT('WARNING: Table ', TABLE_NAME, ' already exists.') AS msg_warning FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'Shop_Region_Temp';
|
||||
|
||||
CREATE TABLE IF NOT EXISTS Shop_Region_Temp (
|
||||
id_region INT NOT NULL PRIMARY KEY,
|
||||
code VARCHAR(50) NOT NULL,
|
||||
name VARCHAR(200) NOT NULL,
|
||||
active BIT NOT NULL DEFAULT 1,
|
||||
display_order INT NOT NULL,
|
||||
created_on DATETIME,
|
||||
created_by VARCHAR(100),
|
||||
id_change_set INT,
|
||||
CONSTRAINT FK_Shop_Region_Temp_id_change_set
|
||||
FOREIGN KEY (id_change_set)
|
||||
REFERENCES Shop_Product_Change_Set(id_change_set)
|
||||
);
|
||||
15
static/MySQL/1105_tbl_Shop_Region_Branch_Temp.sql
Normal file
15
static/MySQL/1105_tbl_Shop_Region_Branch_Temp.sql
Normal file
@@ -0,0 +1,15 @@
|
||||
|
||||
# Region Branch Temp
|
||||
|
||||
USE PARTSLTD_PROD;
|
||||
|
||||
SELECT CONCAT('WARNING: Table ', TABLE_NAME, ' already exists.') AS msg_warning FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'Shop_Region_Branch_Temp';
|
||||
|
||||
CREATE TABLE IF NOT EXISTS Shop_Region_Branch_Temp (
|
||||
id_branch INT NOT NULL PRIMARY KEY,
|
||||
id_region_parent INT NOT NULL,
|
||||
id_region_child INT NOT NULL,
|
||||
-- depth INT NOT NULL,
|
||||
active BIT NOT NULL DEFAULT 1,
|
||||
display_order INT NOT NULL
|
||||
);
|
||||
21
static/MySQL/1106_tbl_Shop_Plant.sql
Normal file
21
static/MySQL/1106_tbl_Shop_Plant.sql
Normal file
@@ -0,0 +1,21 @@
|
||||
|
||||
# Plant
|
||||
|
||||
USE PARTSLTD_PROD;
|
||||
|
||||
SELECT CONCAT('WARNING: Table ', TABLE_NAME, ' already exists.') AS msg_warning FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'Shop_Plant';
|
||||
|
||||
CREATE TABLE IF NOT EXISTS Shop_Plant (
|
||||
id_plant INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||
code VARCHAR(50) NOT NULL,
|
||||
name VARCHAR(500) NOT NULL,
|
||||
id_address INT NOT NULL,
|
||||
id_user_manager INT NOT NULL,
|
||||
active BIT NOT NULL DEFAULT 1,
|
||||
created_on DATETIME,
|
||||
created_by VARCHAR(100),
|
||||
id_change_set INT,
|
||||
CONSTRAINT FK_Shop_Plant_id_change_set
|
||||
FOREIGN KEY (id_change_set)
|
||||
REFERENCES Shop_Product_Change_Set(id_change_set)
|
||||
);
|
||||
22
static/MySQL/1107_tbl_Shop_Plant_Audit.sql
Normal file
22
static/MySQL/1107_tbl_Shop_Plant_Audit.sql
Normal file
@@ -0,0 +1,22 @@
|
||||
|
||||
# Plant Audits
|
||||
|
||||
USE PARTSLTD_PROD;
|
||||
|
||||
SELECT CONCAT('WARNING: Table ', TABLE_NAME, ' already exists.') AS msg_warning FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'Shop_Plant_Audit';
|
||||
|
||||
CREATE TABLE IF NOT EXISTS Shop_Plant_Audit (
|
||||
id_audit INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||
id_plant INT NOT NULL,
|
||||
CONSTRAINT FK_Shop_Plant_Audit_id_plant
|
||||
FOREIGN KEY (id_plant)
|
||||
REFERENCES Shop_Plant(id_plant)
|
||||
ON UPDATE RESTRICT,
|
||||
name_field VARCHAR(50),
|
||||
value_prev VARCHAR(500),
|
||||
value_new VARCHAR(500),
|
||||
id_change_set INT NOT NULL,
|
||||
CONSTRAINT FK_Shop_Plant_Audit_id_change_set
|
||||
FOREIGN KEY (id_change_set)
|
||||
REFERENCES Shop_Product_Change_Set(id_change_set)
|
||||
);
|
||||
15
static/MySQL/1108_tbl_Shop_Plant_Temp.sql
Normal file
15
static/MySQL/1108_tbl_Shop_Plant_Temp.sql
Normal file
@@ -0,0 +1,15 @@
|
||||
|
||||
# Plant Temp
|
||||
|
||||
USE PARTSLTD_PROD;
|
||||
|
||||
SELECT CONCAT('WARNING: Table ', TABLE_NAME, ' already exists.') AS msg_warning FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'Shop_Plant_Temp';
|
||||
|
||||
CREATE TABLE IF NOT EXISTS Shop_Plant_Temp (
|
||||
id_plant INT NOT NULL PRIMARY KEY,
|
||||
code VARCHAR(50) NOT NULL,
|
||||
name VARCHAR(500) NOT NULL,
|
||||
id_address INT NOT NULL,
|
||||
id_user_manager INT NOT NULL,
|
||||
active BIT NOT NULL DEFAULT 1
|
||||
);
|
||||
23
static/MySQL/1109_tbl_Shop_Storage_Location.sql
Normal file
23
static/MySQL/1109_tbl_Shop_Storage_Location.sql
Normal file
@@ -0,0 +1,23 @@
|
||||
|
||||
# Storage Location
|
||||
|
||||
USE PARTSLTD_PROD;
|
||||
|
||||
SELECT CONCAT('WARNING: Table ', TABLE_NAME, ' already exists.') AS msg_warning FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'Shop_Storage_Location';
|
||||
|
||||
CREATE TABLE IF NOT EXISTS Shop_Storage_Location (
|
||||
id_location INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||
id_plant INT NOT NULL,
|
||||
CONSTRAINT FK_Shop_Storage_Location_id_plant
|
||||
FOREIGN KEY (id_plant)
|
||||
REFERENCES Shop_Plant(id_plant),
|
||||
code VARCHAR(50) NOT NULL,
|
||||
name VARCHAR(500) NOT NULL,
|
||||
active BIT NOT NULL DEFAULT 1,
|
||||
created_on DATETIME,
|
||||
created_by VARCHAR(100),
|
||||
id_change_set INT,
|
||||
CONSTRAINT FK_Shop_Storage_Location_id_change_set
|
||||
FOREIGN KEY (id_change_set)
|
||||
REFERENCES Shop_Product_Change_Set(id_change_set)
|
||||
);
|
||||
22
static/MySQL/1110_tbl_Shop_Storage_Location_Audit.sql
Normal file
22
static/MySQL/1110_tbl_Shop_Storage_Location_Audit.sql
Normal file
@@ -0,0 +1,22 @@
|
||||
|
||||
# Storage Location Audits
|
||||
|
||||
USE PARTSLTD_PROD;
|
||||
|
||||
SELECT CONCAT('WARNING: Table ', TABLE_NAME, ' already exists.') AS msg_warning FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'Shop_Storage_Location_Audit';
|
||||
|
||||
CREATE TABLE IF NOT EXISTS Shop_Storage_Location_Audit (
|
||||
id_audit INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||
id_location INT NOT NULL,
|
||||
CONSTRAINT FK_Shop_Storage_Location_Audit_id_location
|
||||
FOREIGN KEY (id_location)
|
||||
REFERENCES Shop_Storage_Location(id_location)
|
||||
ON UPDATE RESTRICT,
|
||||
name_field VARCHAR(50),
|
||||
value_prev VARCHAR(500),
|
||||
value_new VARCHAR(500),
|
||||
id_change_set INT NOT NULL,
|
||||
CONSTRAINT FK_Shop_Storage_Location_Audit_id_change_set
|
||||
FOREIGN KEY (id_change_set)
|
||||
REFERENCES Shop_Product_Change_Set(id_change_set)
|
||||
);
|
||||
13
static/MySQL/1111_tbl_Shop_Storage_Location_Temp.sql
Normal file
13
static/MySQL/1111_tbl_Shop_Storage_Location_Temp.sql
Normal file
@@ -0,0 +1,13 @@
|
||||
|
||||
# Storage Location Temp
|
||||
|
||||
USE PARTSLTD_PROD;
|
||||
|
||||
SELECT CONCAT('WARNING: Table ', TABLE_NAME, ' already exists.') AS msg_warning FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'Shop_Storage_Location_Temp';
|
||||
|
||||
CREATE TABLE IF NOT EXISTS Shop_Storage_Location (
|
||||
id_location INT NOT NULL PRIMARY KEY,
|
||||
code VARCHAR(50) NOT NULL,
|
||||
name VARCHAR(500) NOT NULL,
|
||||
active BIT NOT NULL DEFAULT 1
|
||||
);
|
||||
29
static/MySQL/1112_tbl_Shop_Storage_Location_Branch.sql
Normal file
29
static/MySQL/1112_tbl_Shop_Storage_Location_Branch.sql
Normal file
@@ -0,0 +1,29 @@
|
||||
|
||||
# Storage Location Branch
|
||||
|
||||
USE PARTSLTD_PROD;
|
||||
|
||||
SELECT CONCAT('WARNING: Table ', TABLE_NAME, ' already exists.') AS msg_warning FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'Shop_Storage_Location_Branch';
|
||||
|
||||
CREATE TABLE IF NOT EXISTS Shop_Storage_Location_Branch (
|
||||
id_branch INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||
id_location_parent INT NOT NULL,
|
||||
CONSTRAINT FK_Shop_Storage_Location_Branch_id_location_parent
|
||||
FOREIGN KEY (id_location_parent)
|
||||
REFERENCES Shop_Storage_Location(id_location)
|
||||
ON UPDATE RESTRICT,
|
||||
id_location_child INT NOT NULL,
|
||||
CONSTRAINT FK_Shop_Storage_Location_Branch_id_location_child
|
||||
FOREIGN KEY (id_location_child)
|
||||
REFERENCES Shop_Storage_Location(id_location)
|
||||
ON UPDATE RESTRICT,
|
||||
-- depth INT NOT NULL,
|
||||
active BIT NOT NULL DEFAULT 1,
|
||||
display_order INT NOT NULL,
|
||||
created_on DATETIME,
|
||||
created_by VARCHAR(100),
|
||||
id_change_set INT,
|
||||
CONSTRAINT FK_Shop_Storage_Location_Branch_id_change_set
|
||||
FOREIGN KEY (id_change_set)
|
||||
REFERENCES Shop_Product_Change_Set(id_change_set)
|
||||
);
|
||||
22
static/MySQL/1113_tbl_Shop_Storage_Location_Branch_Audit.sql
Normal file
22
static/MySQL/1113_tbl_Shop_Storage_Location_Branch_Audit.sql
Normal file
@@ -0,0 +1,22 @@
|
||||
|
||||
# Storage Location Branch Audits
|
||||
|
||||
USE PARTSLTD_PROD;
|
||||
|
||||
SELECT CONCAT('WARNING: Table ', TABLE_NAME, ' already exists.') AS msg_warning FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'Shop_Storage_Location_Branch_Audit';
|
||||
|
||||
CREATE TABLE IF NOT EXISTS Shop_Storage_Location_Branch_Audit (
|
||||
id_audit INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||
id_branch INT NOT NULL,
|
||||
CONSTRAINT FK_Shop_Storage_Location_Branch_Audit_id_branch
|
||||
FOREIGN KEY (id_branch)
|
||||
REFERENCES Shop_Storage_Location_Branch(id_branch)
|
||||
ON UPDATE RESTRICT,
|
||||
name_field VARCHAR(50),
|
||||
value_prev VARCHAR(500),
|
||||
value_new VARCHAR(500),
|
||||
id_change_set INT NOT NULL,
|
||||
CONSTRAINT FK_Shop_Storage_Location_Branch_Audit_id_change_set
|
||||
FOREIGN KEY (id_change_set)
|
||||
REFERENCES Shop_Product_Change_Set(id_change_set)
|
||||
);
|
||||
15
static/MySQL/1114_tbl_Shop_Storage_Location_Branch_Temp.sql
Normal file
15
static/MySQL/1114_tbl_Shop_Storage_Location_Branch_Temp.sql
Normal file
@@ -0,0 +1,15 @@
|
||||
|
||||
# Storage Location Branch Temp
|
||||
|
||||
USE PARTSLTD_PROD;
|
||||
|
||||
SELECT CONCAT('WARNING: Table ', TABLE_NAME, ' already exists.') AS msg_warning FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'Shop_Storage_Location_Branch_Temp';
|
||||
|
||||
CREATE TABLE IF NOT EXISTS Shop_Storage_Location_Branch_Temp (
|
||||
id_branch INT NOT NULL PRIMARY KEY,
|
||||
id_location_parent INT NOT NULL,
|
||||
id_location_child INT NOT NULL,
|
||||
-- depth INT NOT NULL,
|
||||
active BIT NOT NULL DEFAULT 1,
|
||||
display_order INT NOT NULL
|
||||
);
|
||||
16
static/MySQL/1117_tbl_Shop_Currency_Temp.sql
Normal file
16
static/MySQL/1117_tbl_Shop_Currency_Temp.sql
Normal file
@@ -0,0 +1,16 @@
|
||||
|
||||
# Currency Temp
|
||||
|
||||
USE PARTSLTD_PROD;
|
||||
|
||||
SELECT CONCAT('WARNING: Table ', TABLE_NAME, ' already exists.') AS msg_warning FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'Shop_Currency_Temp';
|
||||
|
||||
CREATE TABLE IF NOT EXISTS Shop_Currency_Temp (
|
||||
id_currency INT NOT NULL PRIMARY KEY,
|
||||
code VARCHAR(50) NOT NULL,
|
||||
name VARCHAR(255) NOT NULL,
|
||||
symbol VARCHAR(1) NOT NULL,
|
||||
factor_from_GBP FLOAT NOT NULL,
|
||||
active BIT NOT NULL DEFAULT 1,
|
||||
display_order INT NOT NULL
|
||||
);
|
||||
22
static/MySQL/1120_tbl_Shop_Tax_Or_Surcharge_Temp.sql
Normal file
22
static/MySQL/1120_tbl_Shop_Tax_Or_Surcharge_Temp.sql
Normal file
@@ -0,0 +1,22 @@
|
||||
|
||||
# Taxes and Surcharges Temp
|
||||
|
||||
USE PARTSLTD_PROD;
|
||||
|
||||
SELECT CONCAT('WARNING: Table ', TABLE_NAME, ' already exists.') AS msg_warning FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'Shop_Tax_Or_Surcharge_Temp';
|
||||
|
||||
CREATE TABLE Shop_Tax_Or_Surcharge_Temp (
|
||||
id_tax INT NOT NULL PRIMARY KEY,
|
||||
code VARCHAR(50) NOT NULL,
|
||||
name VARCHAR(200) NOT NULL,
|
||||
id_region_buyer INT NOT NULL,
|
||||
id_region_seller INT NOT NULL,
|
||||
id_currency INT,
|
||||
fixed_fee FLOAT NOT NULL DEFAULT 0,
|
||||
multiplier FLOAT NOT NULL DEFAULT 1 CHECK (multiplier > 0),
|
||||
apply_fixed_fee_before_multiplier BIT DEFAULT 1,
|
||||
quantity_min FLOAT NOT NULL DEFAULT 0,
|
||||
quantity_max FLOAT NOT NULL,
|
||||
active BIT NOT NULL DEFAULT 1,
|
||||
display_order INT NOT NULL
|
||||
);
|
||||
@@ -11,7 +11,10 @@ CREATE TABLE IF NOT EXISTS Shop_Unit_Measurement (
|
||||
name_plural VARCHAR(256) NOT NULL,
|
||||
symbol VARCHAR(50) NOT NULL,
|
||||
is_base_unit BIT NOT NULL DEFAULT 0,
|
||||
|
||||
is_unit_of_distance BIT NOT NULL DEFAULT 0,
|
||||
is_unit_of_mass BIT NOT NULL DEFAULT 0,
|
||||
is_unit_of_time BIT NOT NULL DEFAULT 0,
|
||||
is_unit_of_volume BIT NOT NULL DEFAULT 0,
|
||||
active BIT NOT NULL DEFAULT 1,
|
||||
created_on DATETIME,
|
||||
created_by VARCHAR(100),
|
||||
@@ -1,40 +0,0 @@
|
||||
|
||||
# Product Currency link
|
||||
|
||||
USE PARTSLTD_PROD;
|
||||
|
||||
SELECT CONCAT('WARNING: Table ', TABLE_NAME, ' already exists.') AS msg_warning FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'Shop_Product_Currency_Link';
|
||||
|
||||
CREATE TABLE IF NOT EXISTS Shop_Product_Currency_Link (
|
||||
id_link INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||
id_product INT NOT NULL,
|
||||
CONSTRAINT FK_Shop_Product_Currency_Link_id_product
|
||||
FOREIGN KEY (id_product)
|
||||
REFERENCES Shop_Product(id_product)
|
||||
ON UPDATE RESTRICT,
|
||||
id_permutation INT NULL,
|
||||
CONSTRAINT FK_Shop_Product_Currency_Link_id_permutation
|
||||
FOREIGN KEY (id_permutation)
|
||||
REFERENCES Shop_Product_Permutation(id_permutation)
|
||||
ON UPDATE RESTRICT,
|
||||
id_currency INT NOT NULL,
|
||||
CONSTRAINT FK_Shop_Product_Currency_Link_id_currency
|
||||
FOREIGN KEY (id_currency)
|
||||
REFERENCES Shop_Currency(id_currency)
|
||||
ON UPDATE RESTRICT,
|
||||
id_region_purchase INT NOT NULL,
|
||||
CONSTRAINT FK_Shop_Product_Currency_Link_id_region_purchase
|
||||
FOREIGN KEY (id_region_purchase)
|
||||
REFERENCES Shop_Region(id_region)
|
||||
ON UPDATE RESTRICT,
|
||||
price_local_VAT_incl FLOAT NULL,
|
||||
price_local_VAT_excl FLOAT NULL,
|
||||
id_stripe_price VARCHAR(200),
|
||||
active BIT NOT NULL DEFAULT 1,
|
||||
created_on DATETIME,
|
||||
created_by VARCHAR(100),
|
||||
id_change_set INT,
|
||||
CONSTRAINT FK_Shop_Product_Currency_Link_id_change_set
|
||||
FOREIGN KEY (id_change_set)
|
||||
REFERENCES Shop_Product_Change_Set(id_change_set)
|
||||
);
|
||||
16
static/MySQL/1205_tbl_Shop_Product_Temp.sql
Normal file
16
static/MySQL/1205_tbl_Shop_Product_Temp.sql
Normal file
@@ -0,0 +1,16 @@
|
||||
|
||||
# Products Temp
|
||||
|
||||
USE PARTSLTD_PROD;
|
||||
|
||||
SELECT CONCAT('WARNING: Table ', TABLE_NAME, ' already exists.') AS msg_warning FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'Shop_Product_Temp';
|
||||
|
||||
CREATE TABLE IF NOT EXISTS Shop_Product_Temp (
|
||||
id_product INT NOT NULL PRIMARY KEY,
|
||||
name VARCHAR(255) NOT NULL,
|
||||
id_category INT NOT NULL,
|
||||
has_variations BIT NOT NULL,
|
||||
id_access_level_required INT NOT NULL,
|
||||
active BIT NOT NULL DEFAULT 1,
|
||||
display_order INT NOT NULL
|
||||
);
|
||||
@@ -8,7 +8,7 @@ SELECT CONCAT('WARNING: Table ', TABLE_NAME, ' already exists.') AS msg_warning
|
||||
CREATE TABLE IF NOT EXISTS Shop_Product_Permutation (
|
||||
id_permutation INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||
id_product INT NOT NULL,
|
||||
CONSTRAINT FK_Shop_Product_Variation_Link_id_product
|
||||
CONSTRAINT FK_Shop_Product_Permutation_id_product
|
||||
FOREIGN KEY (id_product)
|
||||
REFERENCES Shop_Product(id_product)
|
||||
ON UPDATE RESTRICT,
|
||||
@@ -24,24 +24,32 @@ CREATE TABLE IF NOT EXISTS Shop_Product_Permutation (
|
||||
quantity_step FLOAT NOT NULL,
|
||||
quantity_stock FLOAT NOT NULL,
|
||||
is_subscription BIT NOT NULL,
|
||||
id_recurrence_interval INT,
|
||||
CONSTRAINT FK_Shop_Product_Permutation_id_recurrence_interval
|
||||
FOREIGN KEY (id_recurrence_interval)
|
||||
REFERENCES Shop_Recurrence_Interval(id_interval),
|
||||
count_recurrence_interval INT,
|
||||
/*
|
||||
id_access_level_required INT NOT NULL,
|
||||
CONSTRAINT FK_Shop_Product_Permutation_id_access_level_required
|
||||
FOREIGN KEY (id_access_level_required)
|
||||
REFERENCES Shop_Access_Level(id_access_level),
|
||||
id_interval_recurrence INT,
|
||||
CONSTRAINT FK_Shop_Product_Permutation_id_interval_recurrence
|
||||
FOREIGN KEY (id_interval_recurrence)
|
||||
REFERENCES Shop_Unit_Measurement(id_unit_measurement),
|
||||
/*
|
||||
CONSTRAINT CHECK_FK_Shop_Product_Permutation_id_interval_recurrence
|
||||
CHECK (id_interval_recurrence IN (SELECT id_unit_measurement FROM Shop_Unit_Measurement WHERE is_unit_of_time = 1)),
|
||||
*/
|
||||
count_interval_recurrence INT,
|
||||
id_stripe_product VARCHAR(100) NULL,
|
||||
does_expire_faster_once_unsealed BIT NOT NULL DEFAULT 0,
|
||||
id_interval_expiration_unsealed INT,
|
||||
CONSTRAINT FK_Shop_Product_Permutation_id_interval_expiration_unsealed
|
||||
FOREIGN KEY (id_interval_expiration_unsealed)
|
||||
REFERENCES Shop_Unit_Measurement(id_unit_measurement),
|
||||
/*
|
||||
CONSTRAINT CHECK_FK_Shop_Product_Permutation_id_interval_expiration_unsealed
|
||||
CHECK (id_interval_expiration_unsealed IN (SELECT id_unit_measurement FROM Shop_Unit_Measurement WHERE is_unit_of_time = 1)),
|
||||
*/
|
||||
count_interval_expiration_unsealed INT,
|
||||
active BIT NOT NULL DEFAULT 1,
|
||||
display_order INT NOT NULL,
|
||||
created_on DATETIME,
|
||||
created_by VARCHAR(100),
|
||||
id_change_set INT,
|
||||
CONSTRAINT FK_Shop_Product_Variation_Link_id_change_set
|
||||
CONSTRAINT FK_Shop_Product_Permutation_id_change_set
|
||||
FOREIGN KEY (id_change_set)
|
||||
REFERENCES Shop_Product_Change_Set(id_change_set)
|
||||
);
|
||||
42
static/MySQL/1208_tbl_Shop_Product_Permutation_Temp.sql
Normal file
42
static/MySQL/1208_tbl_Shop_Product_Permutation_Temp.sql
Normal file
@@ -0,0 +1,42 @@
|
||||
|
||||
# Product Permutation Temp
|
||||
|
||||
USE PARTSLTD_PROD;
|
||||
|
||||
SELECT CONCAT('WARNING: Table ', TABLE_NAME, ' already exists.') AS msg_warning FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'Shop_Product_Permutation_Temp';
|
||||
|
||||
CREATE TABLE IF NOT EXISTS Shop_Product_Permutation_Temp (
|
||||
id_permutation INT NOT NULL PRIMARY KEY,
|
||||
id_product INT NOT NULL,
|
||||
CONSTRAINT FK_Shop_Product_Permutation_Temp_id_product
|
||||
FOREIGN KEY (id_product)
|
||||
REFERENCES Shop_Product(id_product)
|
||||
ON UPDATE RESTRICT,
|
||||
description VARCHAR(4000) NOT NULL,
|
||||
cost_local FLOAT NOT NULL,
|
||||
id_currency_cost INT NOT NULL,
|
||||
profit_local_min FLOAT NOT NULL,
|
||||
latency_manufacture INT NOT NULL,
|
||||
quantity_min FLOAT NOT NULL,
|
||||
quantity_max FLOAT NOT NULL,
|
||||
quantity_step FLOAT NOT NULL,
|
||||
quantity_stock FLOAT NOT NULL,
|
||||
is_subscription BIT NOT NULL,
|
||||
id_interval_recurrence INT,
|
||||
CONSTRAINT FK_Shop_Product_Permutation_Temp_id_interval_recurrence
|
||||
FOREIGN KEY (id_interval_recurrence)
|
||||
REFERENCES Shop_Unit_Measurement(id_unit_measurement),
|
||||
count_interval_recurrence INT,
|
||||
id_stripe_product VARCHAR(100) NULL,
|
||||
does_expire_faster_once_unsealed BIT NOT NULL DEFAULT 0,
|
||||
id_interval_expiration_unsealed INT,
|
||||
CONSTRAINT FK_Shop_Product_Permutation_Temp_id_interval_expiration_unsealed
|
||||
FOREIGN KEY (id_interval_expiration_unsealed)
|
||||
REFERENCES Shop_Unit_Measurement(id_unit_measurement),
|
||||
count_interval_expiration_unsealed INT,
|
||||
active BIT NOT NULL DEFAULT 1,
|
||||
display_order INT NOT NULL,
|
||||
created_on DATETIME,
|
||||
created_by VARCHAR(100),
|
||||
guid VARCHAR(36)
|
||||
);
|
||||
38
static/MySQL/1218_tbl_Shop_Stock_Item.sql
Normal file
38
static/MySQL/1218_tbl_Shop_Stock_Item.sql
Normal file
@@ -0,0 +1,38 @@
|
||||
|
||||
# Stock Stock Item
|
||||
|
||||
USE PARTSLTD_PROD;
|
||||
|
||||
SELECT CONCAT('WARNING: Table ', TABLE_NAME, ' already exists.') AS msg_warning FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'Shop_Stock_Item';
|
||||
|
||||
CREATE TABLE IF NOT EXISTS Shop_Stock_Item (
|
||||
id_stock INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||
id_permutation INT NOT NULL,
|
||||
CONSTRAINT FK_Shop_Stock_Item_id_permutation
|
||||
FOREIGN KEY (id_permutation)
|
||||
REFERENCES Shop_Product_Permutation(id_permutation),
|
||||
date_purchased DATETIME NOT NULL,
|
||||
date_received DATETIME NULL,
|
||||
id_location_storage INT NOT NULL,
|
||||
CONSTRAINT FK_Shop_Stock_Item_id_location_storage
|
||||
FOREIGN KEY (id_location_storage)
|
||||
REFERENCES Shop_Storage_Location(id_location),
|
||||
id_currency_cost INT NOT NULL,
|
||||
CONSTRAINT FK_Shop_Stock_Item_id_currency
|
||||
FOREIGN KEY (id_currency_cost)
|
||||
REFERENCES Shop_Currency(id_currency),
|
||||
cost_local_VAT_incl FLOAT NOT NULL,
|
||||
cost_local_VAT_excl FLOAT NOT NULL,
|
||||
is_sealed BIT NOT NULL DEFAULT 1,
|
||||
date_unsealed DATETIME NULL,
|
||||
date_expiration DATETIME NOT NULL,
|
||||
is_consumed BIT NOT NULL DEFAULT 0,
|
||||
date_consumed DATETIME NULL,
|
||||
active BIT NOT NULL DEFAULT 1,
|
||||
created_on DATETIME,
|
||||
created_by VARCHAR(100),
|
||||
id_change_set INT,
|
||||
CONSTRAINT FK_Shop_Stock_Item_id_change_set
|
||||
FOREIGN KEY (id_change_set)
|
||||
REFERENCES Shop_Product_Change_Set(id_change_set)
|
||||
);
|
||||
23
static/MySQL/1219_tbl_Shop_Stock_Item_Audit.sql
Normal file
23
static/MySQL/1219_tbl_Shop_Stock_Item_Audit.sql
Normal file
@@ -0,0 +1,23 @@
|
||||
|
||||
# Stock Item Audits
|
||||
|
||||
USE PARTSLTD_PROD;
|
||||
|
||||
SELECT CONCAT('WARNING: Table ', TABLE_NAME, ' already exists.') AS msg_warning FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'Shop_Stock_Item_Audit';
|
||||
|
||||
CREATE TABLE IF NOT EXISTS Shop_Stock_Item_Audit (
|
||||
id_audit INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||
id_stock INT NOT NULL,
|
||||
CONSTRAINT FK_Shop_Stock_Item_Audit_id_stock
|
||||
FOREIGN KEY (id_stock)
|
||||
REFERENCES Shop_Stock_Item(id_stock)
|
||||
ON UPDATE RESTRICT,
|
||||
name_field VARCHAR(50),
|
||||
value_prev VARCHAR(500),
|
||||
value_new VARCHAR(500),
|
||||
id_change_set INT NOT NULL,
|
||||
CONSTRAINT FK_Shop_Stock_Item_Audit_id_change_set
|
||||
FOREIGN KEY (id_change_set)
|
||||
REFERENCES Shop_Product_Change_Set(id_change_set)
|
||||
ON UPDATE RESTRICT
|
||||
);
|
||||
22
static/MySQL/1220_tbl_Shop_Stock_Item_Temp.sql
Normal file
22
static/MySQL/1220_tbl_Shop_Stock_Item_Temp.sql
Normal file
@@ -0,0 +1,22 @@
|
||||
|
||||
# Stock Stock Item Temp
|
||||
|
||||
USE PARTSLTD_PROD;
|
||||
|
||||
SELECT CONCAT('WARNING: Table ', TABLE_NAME, ' already exists.') AS msg_warning FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'Shop_Stock_Item_Temp';
|
||||
|
||||
CREATE TABLE IF NOT EXISTS Shop_Stock_Item_Temp (
|
||||
id_stock INT NOT NULL PRIMARY KEY,
|
||||
id_permutation INT NOT NULL,
|
||||
date_purchased DATETIME NOT NULL,
|
||||
id_location_storage INT NOT NULL,
|
||||
id_currency INT NOT NULL,
|
||||
cost_local_VAT_incl FLOAT NOT NULL,
|
||||
cost_local_VAT_excl FLOAT NOT NULL,
|
||||
is_sealed BIT NOT NULL DEFAULT 1,
|
||||
date_unsealed DATETIME NULL,
|
||||
date_expiration DATETIME NULL,
|
||||
is_consumed BIT NOT NULL DEFAULT 0,
|
||||
date_consumed DATETIME NULL,
|
||||
active BIT NOT NULL DEFAULT 1
|
||||
);
|
||||
32
static/MySQL/1221_tbl_Shop_Product_Price.sql
Normal file
32
static/MySQL/1221_tbl_Shop_Product_Price.sql
Normal file
@@ -0,0 +1,32 @@
|
||||
|
||||
# Product Price
|
||||
|
||||
USE PARTSLTD_PROD;
|
||||
|
||||
SELECT CONCAT('WARNING: Table ', TABLE_NAME, ' already exists.') AS msg_warning FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'Shop_Product_Price';
|
||||
|
||||
CREATE TABLE IF NOT EXISTS Shop_Product_Price (
|
||||
id_price INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||
id_permutation INT NULL,
|
||||
CONSTRAINT FK_Shop_Product_Price_id_permutation
|
||||
FOREIGN KEY (id_permutation)
|
||||
REFERENCES Shop_Product_Permutation(id_permutation),
|
||||
id_currency INT NOT NULL,
|
||||
CONSTRAINT FK_Shop_Product_Price_id_currency
|
||||
FOREIGN KEY (id_currency)
|
||||
REFERENCES Shop_Currency(id_currency),
|
||||
id_region_purchase INT NOT NULL,
|
||||
CONSTRAINT FK_Shop_Product_Price_id_region_purchase
|
||||
FOREIGN KEY (id_region_purchase)
|
||||
REFERENCES Shop_Region(id_region),
|
||||
price_local_VAT_incl FLOAT NULL,
|
||||
price_local_VAT_excl FLOAT NULL,
|
||||
id_stripe_price VARCHAR(200),
|
||||
active BIT NOT NULL DEFAULT 1,
|
||||
created_on DATETIME,
|
||||
created_by VARCHAR(100),
|
||||
id_change_set INT,
|
||||
CONSTRAINT FK_Shop_Product_Price_id_change_set
|
||||
FOREIGN KEY (id_change_set)
|
||||
REFERENCES Shop_Product_Change_Set(id_change_set)
|
||||
);
|
||||
@@ -1,22 +1,22 @@
|
||||
|
||||
# Product Currency Link Audits
|
||||
# Product Price Audits
|
||||
|
||||
USE PARTSLTD_PROD;
|
||||
|
||||
SELECT CONCAT('WARNING: Table ', TABLE_NAME, ' already exists.') AS msg_warning FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'Shop_Product_Currency_Link_Audit';
|
||||
SELECT CONCAT('WARNING: Table ', TABLE_NAME, ' already exists.') AS msg_warning FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'Shop_Product_Price_Audit';
|
||||
|
||||
CREATE TABLE IF NOT EXISTS Shop_Product_Currency_Link_Audit (
|
||||
CREATE TABLE IF NOT EXISTS Shop_Product_Price_Audit (
|
||||
id_audit INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||
id_link INT NOT NULL,
|
||||
CONSTRAINT FK_Shop_Product_Currency_Link_Audit_id_link
|
||||
FOREIGN KEY (id_link)
|
||||
REFERENCES Shop_Product_Currency_Link(id_link)
|
||||
id_price INT NOT NULL,
|
||||
CONSTRAINT FK_Shop_Product_Price_Audit_id_price
|
||||
FOREIGN KEY (id_price)
|
||||
REFERENCES Shop_Product_Price(id_price)
|
||||
ON UPDATE RESTRICT,
|
||||
name_field VARCHAR(50),
|
||||
value_prev VARCHAR(500),
|
||||
value_new VARCHAR(500),
|
||||
id_change_set INT NOT NULL,
|
||||
CONSTRAINT FK_Shop_Product_Currency_Link_Audit_id_change_set
|
||||
CONSTRAINT FK_Shop_Product_Price_Audit_id_change_set
|
||||
FOREIGN KEY (id_change_set)
|
||||
REFERENCES Shop_Product_Change_Set(id_change_set)
|
||||
);
|
||||
17
static/MySQL/1223_tbl_Shop_Product_Price_Temp.sql
Normal file
17
static/MySQL/1223_tbl_Shop_Product_Price_Temp.sql
Normal file
@@ -0,0 +1,17 @@
|
||||
|
||||
# Product Price Temp
|
||||
|
||||
USE PARTSLTD_PROD;
|
||||
|
||||
SELECT CONCAT('WARNING: Table ', TABLE_NAME, ' already exists.') AS msg_warning FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'Shop_Product_Price_Temp';
|
||||
|
||||
CREATE TABLE IF NOT EXISTS Shop_Product_Price_Temp (
|
||||
id_price INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||
id_permutation INT NULL,
|
||||
id_currency INT NOT NULL,
|
||||
id_region_purchase INT NOT NULL,
|
||||
price_local_VAT_incl FLOAT NULL,
|
||||
price_local_VAT_excl FLOAT NULL,
|
||||
id_stripe_price VARCHAR(200),
|
||||
active BIT NOT NULL DEFAULT 1
|
||||
);
|
||||
@@ -1,26 +1,18 @@
|
||||
|
||||
# Images
|
||||
# Product Permutation Images
|
||||
|
||||
USE PARTSLTD_PROD;
|
||||
|
||||
SELECT CONCAT('WARNING: Table ', TABLE_NAME, ' already exists.') AS msg_warning FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'Shop_Image';
|
||||
SELECT CONCAT('WARNING: Table ', TABLE_NAME, ' already exists.') AS msg_warning FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'Shop_Product_Image';
|
||||
|
||||
CREATE TABLE IF NOT EXISTS Shop_Image (
|
||||
CREATE TABLE IF NOT EXISTS Shop_Product_Image (
|
||||
id_image INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||
id_type_image INT NOT NULL,
|
||||
CONSTRAINT FK_Shop_Image_id_type_image
|
||||
CONSTRAINT FK_Shop_Product_Image_id_type_image
|
||||
FOREIGN KEY (id_type_image)
|
||||
REFERENCES Shop_Image_Type(id_type),
|
||||
id_type_file INT NOT NULL,
|
||||
CONSTRAINT FK_Shop_Image_id_type_file
|
||||
FOREIGN KEY (id_type_file)
|
||||
REFERENCES File_Type(id_type),
|
||||
id_product INT NULL,
|
||||
CONSTRAINT FK_Shop_Image_id_product
|
||||
FOREIGN KEY (id_product)
|
||||
REFERENCES Shop_Product(id_product),
|
||||
id_permutation INT NULL,
|
||||
CONSTRAINT FK_Shop_Image_id_permutation
|
||||
CONSTRAINT FK_Shop_Product_Image_id_permutation
|
||||
FOREIGN KEY (id_permutation)
|
||||
REFERENCES Shop_Product_Permutation(id_permutation),
|
||||
url VARCHAR(255),
|
||||
@@ -29,7 +21,7 @@ CREATE TABLE IF NOT EXISTS Shop_Image (
|
||||
created_on DATETIME,
|
||||
created_by VARCHAR(100),
|
||||
id_change_set INT,
|
||||
CONSTRAINT FK_Shop_Image_id_change_set
|
||||
CONSTRAINT FK_Shop_Product_Image_id_change_set
|
||||
FOREIGN KEY (id_change_set)
|
||||
REFERENCES Shop_Product_Change_Set(id_change_set)
|
||||
);
|
||||
@@ -1,21 +1,21 @@
|
||||
|
||||
# Image Type Audits
|
||||
# Product Image Audits
|
||||
|
||||
USE PARTSLTD_PROD;
|
||||
|
||||
SELECT CONCAT('WARNING: Table ', TABLE_NAME, ' already exists.') AS msg_warning FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'Shop_Image_Audit';
|
||||
SELECT CONCAT('WARNING: Table ', TABLE_NAME, ' already exists.') AS msg_warning FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'Shop_Product_Image_Audit';
|
||||
|
||||
CREATE TABLE IF NOT EXISTS Shop_Image_Audit (
|
||||
CREATE TABLE IF NOT EXISTS Shop_Product_Image_Audit (
|
||||
id_audit INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||
id_image INT NOT NULL,
|
||||
CONSTRAINT FK_Shop_Image_Audit_id_image
|
||||
CONSTRAINT FK_Shop_Product_Image_Audit_id_image
|
||||
FOREIGN KEY (id_image)
|
||||
REFERENCES Shop_Image(id_image),
|
||||
REFERENCES Shop_Product_Image(id_image),
|
||||
name_field VARCHAR(50),
|
||||
value_prev VARCHAR(500),
|
||||
value_new VARCHAR(500),
|
||||
id_change_set INT NOT NULL,
|
||||
CONSTRAINT FK_Shop_Image_Audit_id_change_set
|
||||
CONSTRAINT FK_Shop_Product_Image_Audit_id_change_set
|
||||
FOREIGN KEY (id_change_set)
|
||||
REFERENCES Shop_Product_Change_Set(id_change_set)
|
||||
);
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user