create table

CREATE TABLE IF NOT EXISTS wp_sf_inventory (id int AUTO_INCREMENT,farm_id int, supplier_id int, item varchar(250), quantity int, lot varchar(250), instructions varchar(5000), notes varchar(5000), Primary Key (id), UNIQUE KEY ID_UNIQUE (id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci ;

CREATE TABLE IF NOT EXISTS wp_sf_supplier (id int AUTO_INCREMENT,farm_id int, name varchar(250), phone varchar(250), email varchar(250), website varchar(250), primary_contact varchar(250), notes varchar(5000), Primary Key (id), UNIQUE KEY ID_UNIQUE (id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci ;

CREATE TABLE IF NOT EXISTS wp_sf_cleaning_supplies (id int AUTO_INCREMENT,farm_id int, supplier_id int, item varchar(250), quantity int, lot varchar(250), instructions varchar(5000), notes varchar(5000), Primary Key (id), UNIQUE KEY ID_UNIQUE (id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci ;

CREATE TABLE IF NOT EXISTS wp_sf_planting_locations (id int AUTO_INCREMENT,farm_id int, name varchar(250), zone varchar(250), unit varchar(250), instructions varchar(5000), notes varchar(5000), Primary Key (id), UNIQUE KEY ID_UNIQUE (id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci ;

CREATE TABLE IF NOT EXISTS wp_sf_activity_logs (id int AUTO_INCREMENT,farm_id int, user_id int, name varchar(250), type varchar(250), notes varchar(5000), timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP, Primary Key (id), UNIQUE KEY ID_UNIQUE (id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci ;

CREATE TABLE IF NOT EXISTS wp_sf_log (id int AUTO_INCREMENT,farm_id int, user_id int, name varchar(250), type varchar(250), notes varchar(5000), timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP, Primary Key (id), UNIQUE KEY ID_UNIQUE (id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci ;

CREATE TABLE IF NOT EXISTS wp_sf_planting_log (id int AUTO_INCREMENT,order_id int, log_id int, planting_count int, planting_location_id int, seed_id int, quantity decimal(11,4), timeframe varchar(250), medium_id int, medium_amount decimal(11,4), timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP, Primary Key (id), UNIQUE KEY ID_UNIQUE (id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci ;

CREATE TABLE IF NOT EXISTS wp_sf_harvesting_log (id int AUTO_INCREMENT,log_id int, order_id int, planting_location_id int, quantity_oz varchar(250), loss varchar(250), timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP, Primary Key (id), UNIQUE KEY ID_UNIQUE (id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci ;

CREATE TABLE IF NOT EXISTS wp_sf_testing_log (id int AUTO_INCREMENT,log_id int, variable_name varchar(250), current_setting varchar(250), new_setting varchar(250), notes varchar(5000), Primary Key (id), UNIQUE KEY ID_UNIQUE (id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci ;

CREATE TABLE IF NOT EXISTS wp_sf_incident_log (id int AUTO_INCREMENT,log_id int, manager_id int, employee_id int, customer_id int, description varchar(5000), notes varchar(5000), timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP, Primary Key (id), UNIQUE KEY ID_UNIQUE (id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci ;

CREATE TABLE IF NOT EXISTS wp_sf_setting_log (id int AUTO_INCREMENT,log_id int, setting_name varchar(250), current_setting varchar(250), new_setting varchar(250), notes varchar(5000), timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP, Primary Key (id), UNIQUE KEY ID_UNIQUE (id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci ;

CREATE TABLE IF NOT EXISTS wp_sf_equipment_test_log (id int AUTO_INCREMENT,log_id int, employee_id int, equipment_name varchar(250), date varchar(250), test_name varchar(250), test_result varchar(250), notes varchar(5000), timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP, Primary Key (id), UNIQUE KEY ID_UNIQUE (id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci ;

CREATE TABLE IF NOT EXISTS wp_sf_sensor_data (id int AUTO_INCREMENT,farm_id int, sensor_name varchar(250), datapoint_name varchar(250), datapoint varchar(5000), notes varchar(5000), timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP, Primary Key (id), UNIQUE KEY ID_UNIQUE (id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci ;

CREATE TABLE IF NOT EXISTS wp_sf_seeds (id int AUTO_INCREMENT,farm_id int, supplier_id int, name varchar(250), invetory_weight_oz decimal(11,4), lot_number varchar(250), category varchar(250), planting_amount varchar(250), grow_time varchar(250), preferred_medium int, medium_amount decimal(11,4), cost varchar(250), cost_per_oz varchar(250), Primary Key (id), UNIQUE KEY ID_UNIQUE (id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci ;

CREATE TABLE IF NOT EXISTS wp_sf_supplies_order (id int AUTO_INCREMENT,farm_id int, supplier_id int, employee_id int, item varchar(250), quantity int, unit_price varchar(250), timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP, Primary Key (id), UNIQUE KEY ID_UNIQUE (id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci ;

CREATE TABLE IF NOT EXISTS wp_sf_customer_contact (id int AUTO_INCREMENT,farm_id int, customer_id int, employee_id int, order_id int, method varchar(250), details varchar(5000), notes varchar(5000), timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP, Primary Key (id), UNIQUE KEY ID_UNIQUE (id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci ;

CREATE TABLE IF NOT EXISTS wp_sf_credits (id int AUTO_INCREMENT,farm_id int, customer_id int, employee_id int, order_id int, method varchar(250), details varchar(5000), amount varchar(250), notes varchar(5000), timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP, Primary Key (id), UNIQUE KEY ID_UNIQUE (id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci ;

CREATE TABLE IF NOT EXISTS wp_sf_payments (id int AUTO_INCREMENT,farm_id int, customer_id int, employee_id int, order_id int, method varchar(250), details varchar(5000), amount varchar(250), notes varchar(5000), timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP, Primary Key (id), UNIQUE KEY ID_UNIQUE (id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci ;

CREATE TABLE IF NOT EXISTS wp_sf_trays (id int AUTO_INCREMENT,farm_id int, supplier_id int, name varchar(250), size varchar(250), qty varchar(250), cost varchar(250), lot_number varchar(250), category varchar(250), notes varchar(5000), timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP, Primary Key (id), UNIQUE KEY ID_UNIQUE (id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci ;

CREATE TABLE IF NOT EXISTS wp_sf_medium (id int AUTO_INCREMENT,farm_id int, supplier_id int, name varchar(250), size varchar(250), qty varchar(250), total_cost varchar(250), unit_cost varchar(250), lot_number varchar(250), category varchar(250), timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP, Primary Key (id), UNIQUE KEY ID_UNIQUE (id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci ;

CREATE TABLE IF NOT EXISTS wp_sf_testing_equipment (id int AUTO_INCREMENT,farm_id int, supplier_id int, name varchar(250), type varchar(250), instructions varchar(5000), notes varchar(5000), timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP, Primary Key (id), UNIQUE KEY ID_UNIQUE (id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci ;

CREATE TABLE IF NOT EXISTS wp_sf_orders (id int AUTO_INCREMENT,farm_id int, customer_id int, employee_id int, start_date date, end_date date, schedule_recuring_id int, details varchar(5000), notes varchar(5000), timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP, Primary Key (id), UNIQUE KEY ID_UNIQUE (id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci ;

CREATE TABLE IF NOT EXISTS wp_sf_order_line_item (id int AUTO_INCREMENT,order_id int, seed_id int, planting_amount varchar(250), grow_time varchar(250), item varchar(250), description varchar(250), qty varchar(250), item_price varchar(250), discount varchar(250), credit varchar(250), Primary Key (id), UNIQUE KEY ID_UNIQUE (id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci ;

CREATE TABLE IF NOT EXISTS wp_sf_schedules (id int AUTO_INCREMENT,freq_type int, freq_interval int, freq_relative_interval int, freq_recurrence int, Primary Key (id), UNIQUE KEY ID_UNIQUE (id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci ;

CREATE TABLE IF NOT EXISTS wp_sf_invoice (id int AUTO_INCREMENT,farm_id int, customer_id int, order_id int, employee_id int, invoice_number varchar(250), details varchar(5000), notes varchar(5000), timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP, Primary Key (id), UNIQUE KEY ID_UNIQUE (id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci ;

CREATE TABLE IF NOT EXISTS wp_sf_invoice_line_item (id int AUTO_INCREMENT,invoice_id int, name varchar(250), description varchar(250), qty varchar(250), item_price varchar(250), discount varchar(250), credit varchar(250), Primary Key (id), UNIQUE KEY ID_UNIQUE (id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci ;

CREATE TABLE IF NOT EXISTS wp_sf_iot (id int AUTO_INCREMENT,farm_id int, device_name varchar(250), description varchar(250), device_id varchar(250), UUID varchar(250), product_id varchar(250), binding_user varchar(250), channel varchar(250), account_name varchar(250), status varchar(250), Primary Key (id), UNIQUE KEY ID_UNIQUE (id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci ;

CREATE TABLE IF NOT EXISTS wp_sf_farm (id int AUTO_INCREMENT,name varchar(250), planting_count int, description varchar(250), address varchar(250), phone varchar(250), admin_user_id int, category varchar(250), preferred_medium_id int, preferred_medium_amount decimal(11,4), default_order_id int, timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP, Primary Key (id), UNIQUE KEY ID_UNIQUE (id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci ;

CREATE TABLE IF NOT EXISTS wp_sf_customer (id int AUTO_INCREMENT,farm_id int, user_id int, name varchar(250), description varchar(250), address varchar(250), phone varchar(250), category varchar(250), timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP, Primary Key (id), UNIQUE KEY ID_UNIQUE (id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci ;

CREATE TABLE IF NOT EXISTS wp_sf_todo (id int AUTO_INCREMENT,farm_id int, user_id int, log_id int, name varchar(250), description varchar(250), category varchar(250), todo_date varchar(250), timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP, Primary Key (id), UNIQUE KEY ID_UNIQUE (id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci ;

CREATE TABLE IF NOT EXISTS wp_sf_log_types (id int AUTO_INCREMENT,name varchar(250), notes varchar(5000), Primary Key (id), UNIQUE KEY ID_UNIQUE (id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci ;

Comments are closed.

Registration

Forgotten Password?