Fix (MySQL): Update for MariaDB v10.3 to match ERPNext installation on Oracle VPS.
This commit is contained in:
@@ -18,7 +18,7 @@ BEGIN
|
||||
*/
|
||||
|
||||
|
||||
# Access Levels
|
||||
-- Access Levels
|
||||
INSERT INTO Shop_Access_Level (
|
||||
display_order, code, name, priority
|
||||
)
|
||||
@@ -28,7 +28,7 @@ VALUES
|
||||
(3, 'ADMIN', 'Admin', 1)
|
||||
;
|
||||
|
||||
# Error Message Types
|
||||
-- Error Message Types
|
||||
INSERT INTO Shop_Msg_Error_Type (
|
||||
code, name, description
|
||||
)
|
||||
@@ -40,7 +40,7 @@ VALUES
|
||||
, ('WARNING', 'Warning', 'Non-breaking error.')
|
||||
;
|
||||
|
||||
# File Types
|
||||
-- File Types
|
||||
INSERT INTO File_Type (
|
||||
code, name, extension
|
||||
)
|
||||
@@ -51,7 +51,7 @@ VALUES
|
||||
('MPEG-4', 'Multimedia Photographic Export Group 4', 'mp4')
|
||||
;
|
||||
|
||||
# Generic / shared properties
|
||||
-- Generic / shared properties
|
||||
INSERT INTO Shop_General (
|
||||
quantity_max
|
||||
)
|
||||
@@ -59,7 +59,7 @@ VALUES (
|
||||
10
|
||||
);
|
||||
|
||||
# Image types
|
||||
-- Image types
|
||||
INSERT INTO Shop_Image_Type (
|
||||
display_order, code, name, name_plural
|
||||
)
|
||||
@@ -69,7 +69,7 @@ VALUES
|
||||
(3, 'THUMBNAIL', 'Thumbnail Image', 'Thumbnail Images')
|
||||
;
|
||||
|
||||
# Regions
|
||||
-- Regions
|
||||
INSERT INTO Shop_Region (
|
||||
display_order, code, name
|
||||
)
|
||||
@@ -78,7 +78,7 @@ VALUES
|
||||
;
|
||||
|
||||
/*
|
||||
# Region Branches
|
||||
-- Region Branches
|
||||
INSERT INTO Shop_Region_Branch (
|
||||
display_order, id_region_parent, id_region_child
|
||||
)
|
||||
@@ -87,7 +87,7 @@ VALUES
|
||||
;
|
||||
*/
|
||||
|
||||
# Addresses
|
||||
-- Addresses
|
||||
INSERT INTO Shop_Address (
|
||||
id_region, postcode, address_line_1, address_line_2, city, county
|
||||
)
|
||||
@@ -95,7 +95,7 @@ VALUES (
|
||||
1, 'CV22 6DN', '53 Alfred Green Close', '', 'Rugby', 'Warwickshire'
|
||||
);
|
||||
|
||||
# Plants
|
||||
-- Plants
|
||||
INSERT INTO Shop_Plant (
|
||||
code, name, id_address, id_user_manager
|
||||
)
|
||||
@@ -103,7 +103,7 @@ VALUES
|
||||
('MAIN', 'Main Plant', 1, 1)
|
||||
;
|
||||
|
||||
# Storage Locations
|
||||
-- Storage Locations
|
||||
INSERT INTO Shop_Storage_Location (
|
||||
id_plant, code, name
|
||||
)
|
||||
@@ -184,7 +184,7 @@ VALUES
|
||||
;
|
||||
|
||||
/*
|
||||
# Storage Location Branches
|
||||
-- Storage Location Branches
|
||||
INSERT INTO Shop_Storage_Location_Branch (
|
||||
id_location_parent, id_location_child
|
||||
)
|
||||
@@ -193,7 +193,7 @@ VALUES
|
||||
;
|
||||
*/
|
||||
|
||||
# Currency
|
||||
-- Currency
|
||||
INSERT INTO Shop_Currency (
|
||||
display_order, code, name, symbol, factor_from_GBP
|
||||
)
|
||||
@@ -202,7 +202,7 @@ VALUES
|
||||
(2, 'EUR', 'Euro', '€', 1.17)
|
||||
;
|
||||
|
||||
# Taxes and Surcharges
|
||||
-- Taxes and Surcharges
|
||||
INSERT INTO Shop_Tax_Or_Surcharge (
|
||||
display_order,
|
||||
id_tax,
|
||||
@@ -220,7 +220,7 @@ VALUES
|
||||
(1, 1, 'VAT', 'Value Added Tax', 1, 1, 0, 0.2, 1, 0, 1)
|
||||
;
|
||||
|
||||
# Unit of Measurement
|
||||
-- Unit of Measurement
|
||||
INSERT INTO Shop_Unit_Measurement (
|
||||
name_singular, name_plural, symbol, is_base_unit, is_unit_of_distance, is_unit_of_mass, is_unit_of_time, is_unit_of_volume
|
||||
)
|
||||
@@ -236,7 +236,7 @@ VALUES
|
||||
, ('day', 'days', 'd', 0, 0, 0, 1, 0)
|
||||
;
|
||||
|
||||
# Unit of Measurement Conversion
|
||||
-- Unit of Measurement Conversion
|
||||
INSERT INTO Shop_Unit_Measurement_Conversion (
|
||||
id_unit_derived
|
||||
, id_unit_base
|
||||
@@ -281,7 +281,7 @@ VALUES
|
||||
;
|
||||
|
||||
|
||||
# Categories
|
||||
-- Categories
|
||||
INSERT INTO Shop_Product_Category (
|
||||
display_order,
|
||||
code,
|
||||
@@ -297,7 +297,7 @@ VALUES
|
||||
;
|
||||
|
||||
/*
|
||||
# Recurrence Interval
|
||||
-- Recurrence Interval
|
||||
INSERT INTO Shop_Interval_Recurrence (
|
||||
code, name, name_plural
|
||||
)
|
||||
@@ -308,7 +308,7 @@ VALUES
|
||||
;
|
||||
*/
|
||||
|
||||
# Products
|
||||
-- Products
|
||||
INSERT INTO Shop_Product (
|
||||
display_order,
|
||||
id_category,
|
||||
@@ -360,7 +360,7 @@ VALUES
|
||||
)
|
||||
;
|
||||
|
||||
# Product Permutations
|
||||
-- Product Permutations
|
||||
INSERT INTO Shop_Product_Permutation (
|
||||
-- display_order,
|
||||
id_permutation_temp,
|
||||
@@ -370,7 +370,7 @@ INSERT INTO Shop_Product_Permutation (
|
||||
cost_local_VAT_incl,
|
||||
id_currency_cost,
|
||||
profit_local_min,
|
||||
# id_currency_profit_min,
|
||||
-- id_currency_profit_min,
|
||||
latency_manufacture,
|
||||
id_unit_measurement_quantity,
|
||||
count_unit_measurement_per_quantity_step,
|
||||
@@ -396,7 +396,7 @@ VALUES
|
||||
6,
|
||||
1,
|
||||
3,
|
||||
# 1,
|
||||
-- 1,
|
||||
14,
|
||||
1,
|
||||
1,
|
||||
@@ -421,7 +421,7 @@ VALUES
|
||||
7.2,
|
||||
1,
|
||||
4,
|
||||
# 1,
|
||||
-- 1,
|
||||
14,
|
||||
1,
|
||||
1,
|
||||
@@ -446,7 +446,7 @@ VALUES
|
||||
12,
|
||||
1,
|
||||
5,
|
||||
# 1,
|
||||
-- 1,
|
||||
14,
|
||||
1,
|
||||
1,
|
||||
@@ -471,7 +471,7 @@ VALUES
|
||||
12,
|
||||
1,
|
||||
5,
|
||||
# 1,
|
||||
-- 1,
|
||||
14,
|
||||
1,
|
||||
1,
|
||||
@@ -496,7 +496,7 @@ VALUES
|
||||
12,
|
||||
1,
|
||||
5,
|
||||
# 1,
|
||||
-- 1,
|
||||
14,
|
||||
1,
|
||||
1,
|
||||
@@ -521,7 +521,7 @@ VALUES
|
||||
12,
|
||||
1,
|
||||
5,
|
||||
# 1,
|
||||
-- 1,
|
||||
14,
|
||||
1,
|
||||
1,
|
||||
@@ -539,7 +539,7 @@ VALUES
|
||||
)
|
||||
;
|
||||
|
||||
# Variation Types
|
||||
-- Variation Types
|
||||
INSERT INTO Shop_Variation_Type (
|
||||
display_order, code, name, name_plural
|
||||
)
|
||||
@@ -548,7 +548,7 @@ VALUES
|
||||
, (2, 'SIZE', 'Size', 'Sizes')
|
||||
;
|
||||
|
||||
# Variations
|
||||
-- Variations
|
||||
INSERT INTO Shop_Variation (
|
||||
display_order, id_type, code, name, id_unit_measurement, count_unit_measurement
|
||||
)
|
||||
@@ -681,7 +681,7 @@ WHERE
|
||||
V.id_type = 2
|
||||
;
|
||||
|
||||
# Product Permutation Variation Links
|
||||
-- Product Permutation Variation Links
|
||||
INSERT INTO Shop_Product_Permutation_Variation_Link (
|
||||
display_order, id_permutation, id_variation
|
||||
)
|
||||
@@ -690,7 +690,7 @@ VALUES
|
||||
(2, 2, 2)
|
||||
;
|
||||
|
||||
# Stock items
|
||||
-- Stock items
|
||||
INSERT INTO Shop_Stock_Item (
|
||||
id_permutation
|
||||
, date_purchased
|
||||
@@ -709,7 +709,7 @@ VALUES
|
||||
(6, NOW(), 1, 1, 10, 8.4, '2030-09-05 00:00:00')
|
||||
;
|
||||
|
||||
# Product Price
|
||||
-- Product Price
|
||||
INSERT INTO Shop_Product_Price (
|
||||
id_permutation
|
||||
, id_currency
|
||||
@@ -727,7 +727,7 @@ VALUES
|
||||
(6, 1, 1, 180, 150)
|
||||
;
|
||||
|
||||
# Product Images
|
||||
-- Product Images
|
||||
INSERT INTO Shop_Product_Image (
|
||||
display_order,
|
||||
id_permutation,
|
||||
@@ -736,16 +736,16 @@ INSERT INTO Shop_Product_Image (
|
||||
)
|
||||
VALUES
|
||||
(1, 1, 1, '/static/images/prod_PB0NUOSEs06ymG.jpg'),
|
||||
# (1, 1, 1, '/static/images/prod_PB0NUOSEs06ymG.jpg'),
|
||||
-- (1, 1, 1, '/static/images/prod_PB0NUOSEs06ymG.jpg'),
|
||||
(2, 2, 1, '/static/images/prod_PB0NUOSEs06ymG.jpg'),
|
||||
# (1, 2, 1, '/static/images/prod_PB0NUOSEs06ymG.jpg')
|
||||
-- (1, 2, 1, '/static/images/prod_PB0NUOSEs06ymG.jpg')
|
||||
(3, 3, 1, '/static/images/prod_PB0NUOSEs06ymG.jpg'),
|
||||
(4, 4, 1, '/static/images/prod_.jpg'),
|
||||
(5, 5, 1, '/static/images/prod_1.jpg'),
|
||||
(6, 6, 1, '/static/images/prod_2.jpg')
|
||||
;
|
||||
|
||||
# Delivery Options
|
||||
-- Delivery Options
|
||||
INSERT INTO Shop_Delivery_Option (
|
||||
display_order, code, name, latency_delivery_min, latency_delivery_max
|
||||
)
|
||||
@@ -754,7 +754,7 @@ VALUES
|
||||
(2, 'SIGNED_1', 'First Class Signed-For', 2, 4)
|
||||
;
|
||||
|
||||
# Product Delivery Option Links
|
||||
-- Product Delivery Option Links
|
||||
INSERT INTO Shop_Product_Permutation_Delivery_Option_Link (
|
||||
display_order, id_product, id_permutation, id_delivery_option, id_region, id_currency, price_local, quantity_min, quantity_max
|
||||
)
|
||||
@@ -767,7 +767,7 @@ VALUES
|
||||
(6, 5, 6, 1, 1, 1, 10, 0, 1)
|
||||
;
|
||||
|
||||
# Discounts
|
||||
-- Discounts
|
||||
INSERT INTO Shop_Discount (
|
||||
id_product,
|
||||
id_permutation,
|
||||
@@ -785,7 +785,7 @@ VALUES
|
||||
(1, 2, 'CRIMBO50', 'Christmas 50% off sale!', 0.5, 3, 9, NOW(), '2023-12-31 23:59:59', 1)
|
||||
;
|
||||
|
||||
# Discount Delivery Region Currency Links
|
||||
-- Discount Delivery Region Currency Links
|
||||
INSERT INTO Shop_Discount_Region_Currency_Link (
|
||||
id_discount,
|
||||
id_region,
|
||||
@@ -799,7 +799,7 @@ VALUES
|
||||
;
|
||||
|
||||
|
||||
# Permission Groups
|
||||
-- Permission Groups
|
||||
INSERT INTO Shop_Permission_Group (
|
||||
display_order, code, name
|
||||
)
|
||||
@@ -815,7 +815,7 @@ VALUES
|
||||
select * from Shop_Permission
|
||||
select * from Shop_Role_Permission_Link
|
||||
*/
|
||||
# Permissions
|
||||
-- Permissions
|
||||
INSERT INTO Shop_Permission (
|
||||
display_order, code, name, id_permission_group, id_access_level_required
|
||||
)
|
||||
@@ -833,7 +833,7 @@ VALUES
|
||||
(99, 'CONTACT_US', 'Contact Us Page', 2, 1)
|
||||
;
|
||||
|
||||
# Roles
|
||||
-- Roles
|
||||
INSERT INTO Shop_Role (
|
||||
display_order,
|
||||
code,
|
||||
@@ -844,7 +844,7 @@ VALUES
|
||||
(2, 'USER', 'User')
|
||||
;
|
||||
|
||||
# Role Permission link
|
||||
-- Role Permission link
|
||||
INSERT INTO Shop_Role_Permission_Link (
|
||||
id_role, id_permission, id_access_level
|
||||
)
|
||||
@@ -867,7 +867,7 @@ VALUES
|
||||
(2, 5, 1)
|
||||
;
|
||||
|
||||
# Users
|
||||
-- Users
|
||||
INSERT INTO Shop_User (
|
||||
id_user_auth0
|
||||
, firstname
|
||||
@@ -903,7 +903,7 @@ VALUES
|
||||
)
|
||||
;
|
||||
|
||||
# User Role link
|
||||
-- User Role link
|
||||
INSERT INTO Shop_User_Role_Link (
|
||||
id_user, id_role
|
||||
)
|
||||
@@ -911,7 +911,7 @@ VALUES
|
||||
(1, 1)
|
||||
;
|
||||
|
||||
# User Addresses
|
||||
-- User Addresses
|
||||
INSERT INTO Shop_User_Address (
|
||||
id_user, id_region, name_full, phone_number, postcode, address_line_1, address_line_2, city, county
|
||||
)
|
||||
@@ -919,7 +919,7 @@ SELECT U.id_user, 1, CONCAT(U.firstname, ' ', U.surname), '07375 571430', 'CV22
|
||||
FROM Shop_User U
|
||||
;
|
||||
|
||||
# User Basket
|
||||
-- User Basket
|
||||
INSERT INTO Shop_User_Basket (
|
||||
id_user,
|
||||
id_product,
|
||||
@@ -930,7 +930,7 @@ VALUES
|
||||
(1, 1, 1, 69)
|
||||
;
|
||||
|
||||
# User Order Status
|
||||
-- User Order Status
|
||||
INSERT INTO Shop_User_Order_Status (
|
||||
display_order, code, name, name_plural
|
||||
)
|
||||
@@ -940,7 +940,7 @@ VALUES
|
||||
;
|
||||
|
||||
/*
|
||||
# User Order
|
||||
-- User Order
|
||||
INSERT INTO Shop_User_Order (
|
||||
id_user, value_total, id_order_status, id_checkout_session, id_currency
|
||||
)
|
||||
@@ -949,7 +949,7 @@ VALUES
|
||||
(1, 25, 1, 'noods', 1)
|
||||
;
|
||||
|
||||
# User Order Product Link
|
||||
-- User Order Product Link
|
||||
INSERT INTO Shop_User_Order_Product_Link (
|
||||
id_order, id_product, id_permutation, quantity
|
||||
)
|
||||
@@ -960,7 +960,7 @@ VALUES
|
||||
;
|
||||
*/
|
||||
|
||||
# Supplier
|
||||
-- Supplier
|
||||
INSERT INTO Shop_Supplier (
|
||||
id_supplier_temp
|
||||
, name_company
|
||||
@@ -988,7 +988,7 @@ VALUES
|
||||
)
|
||||
;
|
||||
|
||||
# Suppliers
|
||||
-- Suppliers
|
||||
INSERT INTO Shop_Supplier (
|
||||
id_supplier_temp
|
||||
, name_company
|
||||
@@ -1028,7 +1028,7 @@ VALUES
|
||||
)
|
||||
;
|
||||
|
||||
# Supplier Addresses
|
||||
-- Supplier Addresses
|
||||
INSERT INTO Shop_Supplier_Address (
|
||||
id_supplier
|
||||
, id_region
|
||||
@@ -1063,14 +1063,14 @@ VALUES
|
||||
;
|
||||
|
||||
/*
|
||||
# Supplier Purchase Order
|
||||
-- Supplier Purchase Order
|
||||
INSERT INTO Shop_Supplier_Purchase_Order (
|
||||
id_supplier, value_total, id_order_status, id_checkout_session, id_currency
|
||||
)
|
||||
VALUES
|
||||
;
|
||||
|
||||
# Supplier Purchase Order Product Link
|
||||
-- Supplier Purchase Order Product Link
|
||||
INSERT INTO Shop_Supplier_Purchase_Order_Product_Link (
|
||||
id_order, id_permutation, cost_total_local, id_currency_cost, quantity_ordered, id_unit_quantity, quantity_received, latency_delivery, display_order
|
||||
)
|
||||
@@ -1079,14 +1079,14 @@ VALUES
|
||||
*/
|
||||
|
||||
/*
|
||||
# Manufacturing Purchase Order
|
||||
-- Manufacturing Purchase Order
|
||||
INSERT INTO Shop_Manufacturing_Purchase_Order (
|
||||
cost_total_local, id_currency_cost
|
||||
)
|
||||
VALUES
|
||||
;
|
||||
|
||||
# Manufacturing Purchase Order Product Link
|
||||
-- Manufacturing Purchase Order Product Link
|
||||
INSERT INTO Shop_Manufacturing_Purchase_Order_Product_Link (
|
||||
id_order, id_permutation, cost_total_local, id_currency_cost, quantity_used, id_unit_quantity, quantity_produced, latency_manufacturing_days, display_order
|
||||
)
|
||||
@@ -1095,7 +1095,7 @@ VALUES
|
||||
*/
|
||||
|
||||
/*
|
||||
# Customer
|
||||
-- Customer
|
||||
INSERT INTO Shop_Customer (
|
||||
name_company, name_contact, department_contact, id_address, phone_number, email, id_currency
|
||||
)
|
||||
@@ -1105,14 +1105,14 @@ VALUES
|
||||
*/
|
||||
|
||||
/*
|
||||
# Customer Sales Order
|
||||
-- Customer Sales Order
|
||||
INSERT INTO Shop_Customer_Sales_Order (
|
||||
cost_total_local, id_currency_cost
|
||||
)
|
||||
VALUES
|
||||
;
|
||||
|
||||
# Customer Sales Order Product Link
|
||||
-- Customer Sales Order Product Link
|
||||
INSERT INTO Shop_Customer_Sales_Order_Product_Link (
|
||||
id_order, id_permutation, cost_total_local, id_currency_cost, quantity_ordered, id_unit_quantity, quantity_delivered, latency_delivery_days, display_order
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user