DATABASE SCHEMA DOCUMENTATION ============================ TABLE: audits ------------- COLUMNS: - id: bigint unsigned NOT NULL auto_increment [PRIMARY KEY] - user_type: varchar(255) NULL - user_id: bigint unsigned NULL [INDEX] - event: varchar(255) NOT NULL - auditable_type: varchar(255) NOT NULL [INDEX] - auditable_id: bigint unsigned NOT NULL [INDEX] - old_values: text NULL - new_values: text NULL - url: text NULL - ip_address: varchar(45) NULL - user_agent: varchar(1023) NULL - tags: varchar(255) NULL - created_at: timestamp NULL - updated_at: timestamp NULL INDEXES: - audits_auditable_type_auditable_id_index: auditable_type, auditable_id - audits_user_id_user_type_index: user_id, user_type - auditable_index: auditable_id, auditable_type - audits_user_id_index: user_id - audits_user_id_created_at_index: user_id, created_at - audits_type_id_created_idx: auditable_type, auditable_id, created_at TABLE: cashflow_lines --------------------- COLUMNS: - id: bigint unsigned NOT NULL auto_increment [PRIMARY KEY] - created_at: timestamp NULL - updated_at: timestamp NULL - cmt: double(8,2) NULL - cmt_terms: int NULL - cmt_currency: enum('€','£','$') NOT NULL - total_cmt_base: decimal(10,2) NULL - yarn: double(8,2) NULL - yarn_terms: int NULL - yarn_currency: enum('€','£','$') NOT NULL - total_yarn_base: decimal(10,2) NULL - sale: double(8,2) NULL - sale_terms: json NULL - sale_currency: enum('€','£','$') NOT NULL - total_quote_base: decimal(10,2) NULL - vat: double(8,2) NULL - vat_base: decimal(10,2) NULL - customer_po: varchar(255) NULL - customer_ref: varchar(255) NULL - description: varchar(255) NULL - colour: varchar(255) NULL - incoterms: enum('EXW','FCA','CPT','CIP','DAP','DPU','DDP','FAS','FOB','CFR','CIF') NOT NULL - exfty: varchar(255) NULL - cashflows_id: bigint unsigned NULL [INDEX] - shipment_lines_id: bigint unsigned NULL [INDEX] - seasons_id: bigint unsigned NULL [INDEX] - suppliers_id: bigint unsigned NULL [INDEX] - customers_id: bigint unsigned NULL [INDEX] - designs_id: bigint unsigned NULL [INDEX] - factored: tinyint(1) NOT NULL DEFAULT 0 - qty: double(8,2) NULL - is_full_factored: tinyint(1) NOT NULL DEFAULT 0 - is_compelte: tinyint(1) NOT NULL DEFAULT 0 - is_complete: tinyint(1) NOT NULL DEFAULT 0 - sales_terms: json NULL - total_factoring: double NULL FOREIGN KEYS: - cashflows_id -> cashflows.id - customers_id -> customers.id - designs_id -> designs.id - seasons_id -> seasons.id - shipment_lines_id -> shipment_lines.id - suppliers_id -> suppliers.id INDEXES: - cashflow_lines_cashflows_id_foreign: cashflows_id - cashflow_lines_shipment_lines_id_foreign: shipment_lines_id - cashflow_lines_seasons_id_foreign: seasons_id - cashflow_lines_suppliers_id_foreign: suppliers_id - cashflow_lines_customers_id_foreign: customers_id - cashflow_lines_designs_id_foreign: designs_id TABLE: cashflows ---------------- COLUMNS: - id: bigint unsigned NOT NULL auto_increment [PRIMARY KEY] - created_at: timestamp NULL - updated_at: timestamp NULL - name: varchar(255) NOT NULL - data: json NOT NULL - locked: tinyint(1) NOT NULL DEFAULT 0 TABLE: colourway_yarns ---------------------- COLUMNS: - id: bigint unsigned NOT NULL auto_increment [PRIMARY KEY] - colourways_id: bigint unsigned NOT NULL [INDEX] - cust_ref: varchar(255) NULL - percentage: double NULL - price: double NULL - not_full_factored: tinyint(1) NULL - created_at: timestamp NULL - updated_at: timestamp NULL - yarn_colours_id: bigint unsigned NOT NULL [INDEX] - deleted_at: timestamp NULL FOREIGN KEYS: - colourways_id -> colourways.id - yarn_colours_id -> yarn_colours.id INDEXES: - colourway_yarns_colourways_id_foreign: colourways_id - colourway_yarns_yarn_colours_id_foreign: yarn_colours_id TABLE: colourways ----------------- COLUMNS: - id: bigint unsigned NOT NULL auto_increment [PRIMARY KEY] - style_versions_id: bigint unsigned NOT NULL [INDEX] - name: varchar(255) NOT NULL [INDEX] - image: varchar(255) NULL - comments: text NULL - created_at: timestamp NULL - updated_at: timestamp NULL - cancelled: tinyint(1) NOT NULL DEFAULT 0 [INDEX] - accessories: text NULL - colour_type: enum('solid','melange','mixed') NOT NULL DEFAULT solid - img_thumb: varchar(255) NULL [INDEX] - deleted_at: timestamp NULL [INDEX] - composition: varchar(255) NULL - customer_description: varchar(255) NULL - testing_comments: varchar(255) NULL - colour_approval_comments: varchar(255) NULL FOREIGN KEYS: - style_versions_id -> style_versions.id INDEXES: - idx_colourways_style_deleted: style_versions_id, deleted_at - idx_colourways_img_thumb: img_thumb - idx_colourways_cancelled: cancelled - cw_style_versions_id_idx: style_versions_id - cw_deleted_at_idx: deleted_at - cw_name_idx: name - idx_colourways_style_version_name: style_versions_id, name TABLE: commodity_codes ---------------------- COLUMNS: - id: bigint unsigned NOT NULL auto_increment [PRIMARY KEY] - description: text NOT NULL - cet_duty_rate: varchar(255) NOT NULL - ukgt_duty_rate: varchar(255) NOT NULL - created_at: timestamp NULL - updated_at: timestamp NULL - deleted_at: timestamp NULL TABLE: countries ---------------- COLUMNS: - id: bigint unsigned NOT NULL auto_increment [PRIMARY KEY] - country: varchar(255) NOT NULL - code: char(2) NOT NULL [UNIQUE] - created_at: timestamp NULL - updated_at: timestamp NULL - deleted_at: timestamp NULL INDEXES: - countries_code_unique: code TABLE: counts ------------- COLUMNS: - id: bigint unsigned NOT NULL auto_increment [PRIMARY KEY] - count: varchar(255) NOT NULL - created_at: timestamp NULL - updated_at: timestamp NULL - deleted_at: timestamp NULL INDEXES: - idx_counts_id_deleted: id, deleted_at TABLE: customer_addresses ------------------------- COLUMNS: - id: bigint unsigned NOT NULL auto_increment [PRIMARY KEY] - name: varchar(255) NOT NULL - customer_id: bigint unsigned NOT NULL [INDEX] - line1: varchar(255) NOT NULL - line2: varchar(255) NULL - line3: varchar(255) NULL - city: varchar(255) NULL - region: varchar(255) NULL - postcode: varchar(255) NULL - countries_id: bigint unsigned NOT NULL [INDEX] - created_at: timestamp NULL - updated_at: timestamp NULL - deleted_at: timestamp NULL FOREIGN KEYS: - countries_id -> countries.id - customer_id -> customers.id INDEXES: - customer_addresses_countries_id_foreign: countries_id - idx_customer_addresses_customer_name: customer_id, name TABLE: customer_agents ---------------------- COLUMNS: - id: bigint unsigned NOT NULL auto_increment [PRIMARY KEY] - deleted_at: timestamp NULL - created_at: timestamp NULL - updated_at: timestamp NULL - name: text NOT NULL - email: text NOT NULL - phone: text NOT NULL - customers_id: bigint unsigned NULL [INDEX] FOREIGN KEYS: - customers_id -> customers.id INDEXES: - customer_agents_customers_id_foreign: customers_id TABLE: customer_invoice_layouts ------------------------------- COLUMNS: - id: bigint unsigned NOT NULL auto_increment [PRIMARY KEY] - created_at: timestamp NULL - updated_at: timestamp NULL - customer_id: bigint unsigned NOT NULL [INDEX] - invoice_layouts_id: bigint unsigned NOT NULL [INDEX] - incoterm: enum('EXW','FCA','CPT','CIP','DAP','DPU','DDP','FAS','FOB','CFR','CIF') NOT NULL FOREIGN KEYS: - customer_id -> customers.id - invoice_layouts_id -> invoice_layouts.id INDEXES: - customer_invoice_layouts_customers_foreign: customer_id - customer_invoice_layouts_invoice_layouts_id_foreign: invoice_layouts_id TABLE: customer_order_files --------------------------- COLUMNS: - id: bigint unsigned NOT NULL auto_increment [PRIMARY KEY] - customer_orders_id: bigint unsigned NOT NULL [INDEX] - filename: varchar(255) NOT NULL - file: varchar(255) NOT NULL - created_at: timestamp NULL - updated_at: timestamp NULL - deleted_at: timestamp NULL FOREIGN KEYS: - customer_orders_id -> customer_orders.id INDEXES: - customer_order_files_customer_orders_id_foreign: customer_orders_id TABLE: customer_order_line_quantities ------------------------------------- COLUMNS: - id: bigint unsigned NOT NULL auto_increment [PRIMARY KEY] - customer_order_lines_id: bigint unsigned NOT NULL [INDEX] - sizes_id: bigint unsigned NOT NULL [INDEX] - qty: int NOT NULL - SKU: varchar(255) NULL - barcode: varchar(255) NULL - created_at: timestamp NULL - updated_at: timestamp NULL - price: double(8,2) NULL - discount: double(8,2) NULL - commission: double(8,2) NULL - deleted_at: timestamp NULL - prices_id: bigint unsigned NULL [INDEX] FOREIGN KEYS: - customer_order_lines_id -> customer_order_lines.id - prices_id -> prices.id - sizes_id -> sizes.id INDEXES: - customer_order_line_quantities_prices_id_foreign: prices_id - idx_colq_col_sizes: customer_order_lines_id, sizes_id - idx_colq_sizes_order_lines: sizes_id, customer_order_lines_id TABLE: customer_order_lines --------------------------- COLUMNS: - id: bigint unsigned NOT NULL auto_increment [PRIMARY KEY] - customer_orders_id: bigint unsigned NOT NULL [INDEX] - colourways_id: bigint unsigned NOT NULL [INDEX] - location: varchar(255) NULL - notes: text NULL - actual_ship_date: date NULL - created_at: timestamp NULL - updated_at: timestamp NULL - factory_cust_date: date NULL - cp_notes: text NULL - colour_approved_date: date NULL - lab_dips_sent_date: date NULL - colour_approval_comments: text NULL - wh_cust_date: date NULL - start_knit: date NULL - deleted_at: timestamp NULL [INDEX] - bulk_yarn_order_date: varchar(255) NULL - bulk_yarn_order_comments: varchar(255) NULL - bulk_yarn_order_delivery_date: varchar(255) NULL - bulk_yarn_order_delivery_comments: varchar(255) NULL - order_sent_factory: date NULL - cancelled: tinyint(1) NOT NULL DEFAULT 0 [INDEX] FOREIGN KEYS: - colourways_id -> colourways.id - customer_orders_id -> customer_orders.id INDEXES: - idx_customer_order_lines_order_deleted: customer_orders_id, deleted_at - idx_customer_order_lines_colourways: colourways_id - idx_customer_order_lines_cancelled: cancelled - col_co_id_idx: customer_orders_id - col_cw_id_idx: colourways_id - col_cancelled_idx: cancelled - col_deleted_at_idx: deleted_at - idx_customer_order_lines_order_colourway: customer_orders_id, colourways_id TABLE: customer_orders ---------------------- COLUMNS: - id: bigint unsigned NOT NULL auto_increment [PRIMARY KEY] - departments_id: bigint unsigned NOT NULL [INDEX] - seasons_id: bigint unsigned NOT NULL [INDEX] - customers_id: bigint unsigned NOT NULL [INDEX] - customer_po: varchar(255) NOT NULL [INDEX] - order_date: date NULL - cancelled: tinyint(1) NOT NULL DEFAULT 0 [INDEX] - created_at: timestamp NULL - updated_at: timestamp NULL - incoterms: enum('EXW','FCA','CPT','CIP','DAP','DPU','DDP','FAS','FOB','CFR','CIF') NOT NULL - cust_ship_no: varchar(255) NULL - customer_addresses_id: bigint unsigned NULL [INDEX] - incomplete_flag: tinyint(1) NOT NULL DEFAULT 0 - order_type: enum('wholesale','commission') NOT NULL DEFAULT wholesale [INDEX] - sent_to_factory: date NULL - deleted_at: timestamp NULL [INDEX] - received: varchar(255) NULL - shipment_mode: varchar(255) NULL - phase_id: bigint unsigned NULL [INDEX] FOREIGN KEYS: - customers_id -> customers.id - customer_addresses_id -> customer_addresses.id - departments_id -> departments.id - phase_id -> phases.id - seasons_id -> seasons.id INDEXES: - unique_customer_po_per_customer: customers_id, customer_po - customer_orders_departments_id_foreign: departments_id - customer_orders_customer_addresses_id_foreign: customer_addresses_id - customer_orders_phase_id_foreign: phase_id - idx_customer_orders_customers_deleted: customers_id, deleted_at - idx_customer_orders_seasons_deleted: seasons_id, deleted_at - idx_customer_orders_cancelled: cancelled - co_order_type_cancelled_idx: order_type, cancelled - co_seasons_id_idx: seasons_id - co_customers_id_idx: customers_id - co_deleted_at_idx: deleted_at - co_order_cancelled_cust_idx: order_type, cancelled, customers_id - idx_co_type_cancelled: order_type, cancelled - idx_co_customer_season: customers_id, seasons_id - idx_customer_orders_po_season_dept_customer_type: customer_po, seasons_id, departments_id, customers_id, order_type TABLE: customer_payment_terms ----------------------------- COLUMNS: - id: bigint unsigned NOT NULL auto_increment [PRIMARY KEY] - customer_id: bigint unsigned NOT NULL [INDEX] - percentage: int unsigned NOT NULL - days: int unsigned NOT NULL - created_at: timestamp NULL - updated_at: timestamp NULL FOREIGN KEYS: - customer_id -> customers.id INDEXES: - customer_payment_terms_customer_id_foreign: customer_id TABLE: customers ---------------- COLUMNS: - id: bigint unsigned NOT NULL auto_increment [PRIMARY KEY] - name: varchar(255) NOT NULL [UNIQUE] - countries_id: bigint unsigned NOT NULL [INDEX] - contact: varchar(255) NULL - email: varchar(255) NULL [UNIQUE] - phone: varchar(255) NULL - finance_contact: varchar(255) NULL - finance_email: varchar(255) NULL [UNIQUE] - finance_phone: varchar(255) NULL - notes: text NULL - finance_notes: text NULL - payment_terms: int unsigned NULL - factored: tinyint(1) NULL - currency: enum('€','£','$') NOT NULL - created_at: timestamp NULL - updated_at: timestamp NULL - settings: text NULL - custom_prompt: text NULL - show_mid: tinyint(1) NULL - logo: varchar(255) NULL - show_embroidery: tinyint(1) NULL - customs: tinyint(1) NULL - yc_email: varchar(255) NULL - yc_address: text NULL - vat: varchar(255) NULL - eori: varchar(255) NULL - samples_required: json NULL - deleted_at: timestamp NULL - customer_invoice_layout_id: bigint unsigned NULL [INDEX] - zoho_customer: varchar(255) NULL - zoho_customer_tag: varchar(255) NULL - zoho_factored: varchar(255) NULL - discount: double NULL - default_commission: double NULL - default_discount: double NULL FOREIGN KEYS: - countries_id -> countries.id - customer_invoice_layout_id -> customer_invoice_layouts.id INDEXES: - customers_name_unique: name - customers_email_unique: email - customers_finance_email_unique: finance_email - customers_countries_id_foreign: countries_id - customers_customer_invoice_layout_id_foreign: customer_invoice_layout_id - idx_customers_id_deleted: id, deleted_at - idx_customers_name_deleted: name, deleted_at TABLE: departments ------------------ COLUMNS: - id: bigint unsigned NOT NULL auto_increment [PRIMARY KEY] - description: varchar(255) NOT NULL [UNIQUE] - created_at: timestamp NULL - updated_at: timestamp NULL - deleted_at: timestamp NULL - type: enum('wholesale','commission') NOT NULL DEFAULT wholesale - hidden: tinyint(1) NOT NULL DEFAULT 0 - locked: tinyint(1) NOT NULL DEFAULT 0 - zoho_name: varchar(255) NULL INDEXES: - departments_description_unique: description TABLE: designs -------------- COLUMNS: - id: bigint unsigned NOT NULL auto_increment [PRIMARY KEY] - description: varchar(255) NOT NULL - customers_id: bigint unsigned NOT NULL [INDEX] - issued: date NULL - gauge_id: bigint unsigned NOT NULL [INDEX] - yarn: varchar(255) NOT NULL - factory_id: bigint unsigned NOT NULL [INDEX] - created_at: timestamp NULL - updated_at: timestamp NULL - deleted_at: timestamp NULL FOREIGN KEYS: - customers_id -> customers.id - factory_id -> suppliers.id - gauge_id -> gauges.id INDEXES: - idx_designs_id_deleted: id, deleted_at - idx_designs_customers: customers_id - idx_designs_gauge_deleted: gauge_id, deleted_at - designs_customers_id_idx: customers_id - idx_designs_factory_customer_desc: factory_id, customers_id, description TABLE: failed_jobs ------------------ COLUMNS: - id: bigint unsigned NOT NULL auto_increment [PRIMARY KEY] - uuid: varchar(255) NOT NULL [UNIQUE] - connection: text NOT NULL - queue: text NOT NULL - payload: longtext NOT NULL - exception: longtext NOT NULL - failed_at: timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP DEFAULT_GENERATED INDEXES: - failed_jobs_uuid_unique: uuid TABLE: gauges ------------- COLUMNS: - id: bigint unsigned NOT NULL auto_increment [PRIMARY KEY] - gauge: varchar(255) NOT NULL [INDEX] - created_at: timestamp NULL - updated_at: timestamp NULL - deleted_at: timestamp NULL INDEXES: - idx_gauges_gauge: gauge TABLE: gemini_ss_table ---------------------- COLUMNS: [ERROR - Cannot describe table: SQLSTATE[HY000]: General error: 1356 View 'knit.gemini_ss_table' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them (Connection: mysql, SQL: DESCRIBE `gemini_ss_table`)] TABLE: intakes -------------- COLUMNS: - id: bigint unsigned NOT NULL auto_increment [PRIMARY KEY] - created_at: timestamp NULL - updated_at: timestamp NULL - description: text NOT NULL - start_month: tinyint NOT NULL - end_month: tinyint NOT NULL TABLE: invoice_layouts ---------------------- COLUMNS: - id: bigint unsigned NOT NULL auto_increment [PRIMARY KEY] - created_at: timestamp NULL - updated_at: timestamp NULL - line_title: varchar(255) NULL - line_description: varchar(255) NULL - line_price: varchar(255) NULL - line_qty: varchar(255) NULL - line_vat: tinyint(1) NOT NULL DEFAULT 0 - invoice_comments: longtext NULL - invoice_by: varchar(255) NULL - deleted_at: timestamp NULL - name: varchar(255) NOT NULL - default: tinyint(1) NOT NULL DEFAULT 0 - invoice_layout: varchar(255) NULL - per_size: tinyint(1) NOT NULL DEFAULT 0 - zoho_account: varchar(255) NULL - separate_invoice_per_collection_date: tinyint(1) NOT NULL DEFAULT 0 TABLE: jobs ----------- COLUMNS: - id: bigint unsigned NOT NULL auto_increment [PRIMARY KEY] - queue: varchar(255) NOT NULL [INDEX] - payload: longtext NOT NULL - attempts: tinyint unsigned NOT NULL - reserved_at: int unsigned NULL - available_at: int unsigned NOT NULL - created_at: int unsigned NOT NULL INDEXES: - jobs_queue_index: queue TABLE: materials ---------------- COLUMNS: - id: bigint unsigned NOT NULL auto_increment [PRIMARY KEY] - material: varchar(255) NOT NULL [UNIQUE] - created_at: timestamp NULL - updated_at: timestamp NULL - deleted_at: timestamp NULL INDEXES: - materials_material_unique: material TABLE: migrations ----------------- COLUMNS: - id: int unsigned NOT NULL auto_increment [PRIMARY KEY] - migration: varchar(255) NOT NULL - batch: int NOT NULL TABLE: password_resets ---------------------- COLUMNS: - email: varchar(255) NOT NULL [INDEX] - token: varchar(255) NOT NULL - created_at: timestamp NULL INDEXES: - password_resets_email_index: email TABLE: personal_access_tokens ----------------------------- COLUMNS: - id: bigint unsigned NOT NULL auto_increment [PRIMARY KEY] - tokenable_type: varchar(255) NOT NULL [INDEX] - tokenable_id: bigint unsigned NOT NULL - name: varchar(255) NOT NULL - token: varchar(64) NOT NULL [UNIQUE] - abilities: text NULL - last_used_at: timestamp NULL - created_at: timestamp NULL - updated_at: timestamp NULL INDEXES: - personal_access_tokens_token_unique: token - personal_access_tokens_tokenable_type_tokenable_id_index: tokenable_type, tokenable_id TABLE: phases ------------- COLUMNS: - id: bigint unsigned NOT NULL auto_increment [PRIMARY KEY] - created_at: timestamp NULL - updated_at: timestamp NULL - name: text NOT NULL TABLE: price_resolutions ------------------------ COLUMNS: - id: bigint unsigned NOT NULL auto_increment [PRIMARY KEY] - style_versions_id: bigint unsigned NOT NULL [INDEX] - colourways_id: bigint unsigned NOT NULL [INDEX] - sizes_id: bigint unsigned NULL [INDEX] - phase_id: bigint unsigned NULL [INDEX] - season_id: bigint unsigned NULL [INDEX] - customer_id: bigint unsigned NULL [INDEX] - supplier_id: bigint unsigned NULL [INDEX] - style_id: bigint unsigned NULL [INDEX] - design_id: bigint unsigned NULL [INDEX] - price_id: bigint unsigned NULL [INDEX] - cmt: decimal(12,4) NULL - cmt_base: decimal(12,4) NULL - quote: decimal(12,4) NULL - quote_base: decimal(12,4) NULL - discount_price: decimal(12,4) NULL - discount_price_base: decimal(12,4) NULL - gmt_trans_base: decimal(12,4) NULL - subtotal: decimal(12,4) NULL - subtotal_base: decimal(12,4) NULL - yarn_value_euro: decimal(12,4) NULL - cmt_status: varchar(32) NULL - quote_status: varchar(32) NULL - margin: decimal(6,2) NULL - cust_currency: char(3) NULL - fact_currency: char(3) NULL - fresh_at: timestamp NULL [INDEX] - created_at: timestamp NULL - updated_at: timestamp NULL INDEXES: - uq_price_resolutions: style_versions_id, colourways_id, sizes_id, phase_id, season_id - price_resolutions_style_versions_id_index: style_versions_id - price_resolutions_colourways_id_index: colourways_id - price_resolutions_sizes_id_index: sizes_id - price_resolutions_phase_id_index: phase_id - price_resolutions_season_id_index: season_id - price_resolutions_customer_id_index: customer_id - price_resolutions_supplier_id_index: supplier_id - price_resolutions_style_id_index: style_id - price_resolutions_design_id_index: design_id - price_resolutions_price_id_index: price_id - idx_pr_fresh_at: fresh_at - idx_pr_cw_size_phase_season_fresh: colourways_id, sizes_id, phase_id, season_id, fresh_at TABLE: prices ------------- COLUMNS: - id: bigint unsigned NOT NULL auto_increment [PRIMARY KEY] - style_versions_id: bigint unsigned NULL [INDEX] - name: varchar(255) NULL - model: enum('standard','full_factored','manual') NOT NULL DEFAULT standard - yarn_trans: double(8,2) NULL - yarn_trans_currency: enum('€','£','$') NOT NULL DEFAULT € - cmt: double(8,2) NULL - gmt_trans: double(8,2) NULL - gmt_trans_currency: enum('€','£','$') NOT NULL DEFAULT € - notes: text NULL - aoc: double NOT NULL DEFAULT 0 - weight: double(8,2) NULL - yarn: double(8,2) NULL - accessory: double(8,2) NULL - created_at: timestamp NULL - updated_at: timestamp NULL - yarn_currency: char(3) NULL DEFAULT € - accessory_currency: enum('€','£','$') NOT NULL DEFAULT € - target: double(8,2) NULL - costed_weight: double(8,5) NULL - min_qty: int NULL - label: double(8,2) NULL - label_currency: enum('€','£','$') NOT NULL DEFAULT € - yarn_value: double(8,2) NULL - yarn_value_currency: char(3) NULL DEFAULT € - sizes_id: bigint unsigned NULL [INDEX] - customer_notes: text NULL - embroidery: double(8,2) NULL - embroidery_currency: enum('€','£','$') NOT NULL DEFAULT € - testing: double(8,2) NULL - testing_courier: double(8,2) NULL - weight_comments: text NULL - cost_comments: text NULL - comments_toggle: tinyint(1) NULL DEFAULT 0 - colourways_id: bigint unsigned NULL [INDEX] - cmt_status: enum('not_confirmed','estimate','confirmed') NOT NULL - quote_status: enum('not_confirmed','estimate','confirmed') NOT NULL - valid_until: date NULL - colour_type: enum('solid','melange','mixed') NULL - quote: double(8,2) NULL - quotes_sent: json NULL - deleted_at: timestamp NULL - discount: int NULL - duty: double(8,2) NOT NULL DEFAULT 0.00 - phase_id: bigint unsigned NULL [INDEX] - yarnkg: double NULL - yarnkg_currency: enum('£','$','€') NULL FOREIGN KEYS: - colourways_id -> colourways.id - phase_id -> phases.id - sizes_id -> sizes.id - style_versions_id -> style_versions.id INDEXES: - prices_style_versions_id_foreign: style_versions_id - prices_sizes_id_foreign: sizes_id - prices_colourways_id_foreign: colourways_id - prices_phase_id_foreign: phase_id TABLE: sample_types ------------------- COLUMNS: - id: bigint unsigned NOT NULL auto_increment [PRIMARY KEY] - name: varchar(255) NOT NULL [UNIQUE] - charge: tinyint(1) NULL - charge_proto: tinyint(1) NULL - charge_surcharge: tinyint(1) NULL - created_at: timestamp NULL - updated_at: timestamp NULL - deleted_at: timestamp NULL INDEXES: - sample_types_name_unique: name TABLE: samples -------------- COLUMNS: - id: bigint unsigned NOT NULL auto_increment [PRIMARY KEY] - sample_types_id: bigint unsigned NOT NULL [INDEX] - colourways_id: bigint unsigned NULL [INDEX] - date_expected: date NULL - date_sent: date NULL - tracking: varchar(255) NULL - weight: double NULL - sizes_id: bigint unsigned NULL [INDEX] - date_received: date NULL - do_not_charge: tinyint(1) NOT NULL DEFAULT 0 - comments: text NULL - qty: int NULL - rt_invoice: varchar(255) NULL - fty_invoice: varchar(255) NULL - created_at: timestamp NULL - updated_at: timestamp NULL - do_not_charge_dev: tinyint(1) NULL DEFAULT 0 - finance_comments: text NULL - fn_notes: text NULL - po: varchar(255) NULL - approved_date: date NULL - status: enum('pending','approved','rejected') NOT NULL DEFAULT pending - production_comment: varchar(255) NULL - fn_complete: tinyint(1) NOT NULL DEFAULT 0 - deleted_at: timestamp NULL FOREIGN KEYS: - colourways_id -> colourways.id - sample_types_id -> sample_types.id INDEXES: - samples_sizes_id_foreign: sizes_id - samples_type_cw_created_idx: sample_types_id, colourways_id, created_at - idx_samples_cw_type_deleted: colourways_id, sample_types_id, deleted_at - idx_samples_cw_type_created: colourways_id, sample_types_id, created_at TABLE: seasons -------------- COLUMNS: - id: bigint unsigned NOT NULL auto_increment [PRIMARY KEY] - description: varchar(255) NOT NULL [UNIQUE] - start_date: date NOT NULL [UNIQUE] - end_date: date NOT NULL [UNIQUE] - euro_rate: double(8,2) NOT NULL - usd_rate: double(8,2) NOT NULL - markup: tinyint NOT NULL - created_at: timestamp NULL [INDEX] - updated_at: timestamp NULL - settings: text NULL - gbp_rate: double(8,2) NOT NULL DEFAULT 1.00 - deleted_at: timestamp NULL - locked: tinyint(1) NOT NULL DEFAULT 0 INDEXES: - seasons_description_unique: description - seasons_start_date_unique: start_date - seasons_end_date_unique: end_date - idx_seasons_id_deleted: id, deleted_at - idx_seasons_created_deleted: created_at, deleted_at TABLE: sessions --------------- COLUMNS: - id: varchar(255) NOT NULL [PRIMARY KEY] - user_id: bigint unsigned NULL [INDEX] - ip_address: varchar(45) NULL - user_agent: text NULL - payload: text NOT NULL - last_activity: int NOT NULL [INDEX] INDEXES: - sessions_user_id_index: user_id - sessions_last_activity_index: last_activity TABLE: shipment_files --------------------- COLUMNS: - id: bigint unsigned NOT NULL auto_increment [PRIMARY KEY] - shipment_id: bigint unsigned NOT NULL [INDEX] - filename: varchar(255) NOT NULL - file: varchar(255) NOT NULL - type: enum('customs','transporters_invoice','packingList','other') NOT NULL - created_at: timestamp NULL - updated_at: timestamp NULL - deleted_at: timestamp NULL FOREIGN KEYS: - shipment_id -> shipments.id INDEXES: - shipment_files_shipment_id_foreign: shipment_id TABLE: shipment_line_sizes -------------------------- COLUMNS: - id: bigint unsigned NOT NULL auto_increment [PRIMARY KEY] - sizes_id: bigint unsigned NOT NULL [INDEX] - shipment_line_id: bigint unsigned NOT NULL [INDEX] - qty: double(8,2) NOT NULL - created_at: timestamp NULL - updated_at: timestamp NULL - shipped_qty: double(8,2) NULL - deleted_at: timestamp NULL FOREIGN KEYS: - shipment_line_id -> shipment_lines.id - sizes_id -> sizes.id INDEXES: - sls_shipment_line_id_idx: shipment_line_id - sls_sizes_id_idx: sizes_id - idx_sls_sl_sizes: shipment_line_id, sizes_id - idx_shipment_line_sizes_size_shipment: sizes_id, shipment_line_id TABLE: shipment_lines --------------------- COLUMNS: - id: bigint unsigned NOT NULL auto_increment [PRIMARY KEY] - shipment_id: bigint unsigned NULL [INDEX] - customer_order_lines_id: bigint unsigned NOT NULL [INDEX] - truck_plates: varchar(255) NULL - collection_date: date NULL [INDEX] - delivery_date: date NULL - complete: tinyint(1) NOT NULL DEFAULT 0 [INDEX] - rt_invoice: varchar(255) NULL - factory_invoice: varchar(255) NULL - customs_agency_invoice: varchar(255) NULL - created_at: timestamp NULL - updated_at: timestamp NULL - cp_notes: text NULL - cp_photoshoot_deadline: date NULL - transporter_invoioce: varchar(255) NULL - ss_comments: text NULL - invoiced: tinyint(1) NOT NULL DEFAULT 0 [INDEX] - buttons: text NULL - labels: text NULL - care: text NULL - pp_sent: date NULL - buttons_done: tinyint(1) NOT NULL DEFAULT 0 - labels_done: tinyint(1) NOT NULL DEFAULT 0 - care_done: tinyint(1) NOT NULL DEFAULT 0 - no_invoiced: int NULL - fn_notes: text NULL - factory_order_yarn: tinyint(1) NOT NULL DEFAULT 0 - yarn_comments: text NULL - sealer_deadline: date NULL - exfty: date NULL [INDEX] - deleted_at: timestamp NULL [INDEX] - notes: varchar(255) NULL - shipment_status: enum('approved','rejected','pending') NULL - shipment_comments: text NULL - sealer_status: enum('approved','rejected','pending') NULL - sealer_comments: text NULL - start_knit_comments: varchar(255) NULL - shipped_qty: int NULL - customer_invoice_no: varchar(255) NULL - pl_sent_date: date NULL - payment_reference: varchar(255) NULL - bol_reference: varchar(255) NULL - bol_tracking_factory: varchar(255) NULL - bol_tracking_rt: varchar(255) NULL - container_no: varchar(255) NULL - container_eta: date NULL - asn: varchar(255) NULL - asn_transferred_date: date NULL - asn_transferred_comments: varchar(255) NULL - flag_issue: tinyint(1) NOT NULL DEFAULT 0 - foy_ordered: tinyint(1) NOT NULL DEFAULT 0 - foy_due: date NULL - foy_delivered: tinyint(1) NOT NULL DEFAULT 0 - buttons_due: date NULL - gross_weight: float NULL - net_weight: float NULL - no_cartons: int NULL - buttons_required: tinyint(1) NOT NULL DEFAULT 0 - pre_production_comments: text NULL - customer_id: bigint unsigned NULL [INDEX] - factory_id: bigint unsigned NULL [INDEX] - style_id: bigint unsigned NULL [INDEX] - design_id: bigint unsigned NULL [INDEX] - colourway_id: bigint unsigned NULL [INDEX] FOREIGN KEYS: - colourway_id -> colourways.id - customer_order_lines_id -> customer_order_lines.id - design_id -> designs.id - factory_id -> suppliers.id - shipment_id -> shipments.id - style_id -> styles.id INDEXES: - idx_shipment_lines_customer_order_deleted: customer_order_lines_id, deleted_at - idx_shipment_lines_complete_exfty: complete, exfty - idx_shipment_lines_shipment_id: shipment_id - sl_shipment_id_idx: shipment_id - sl_col_id_idx: customer_order_lines_id - sl_exfty_idx: exfty - sl_collection_date_idx: collection_date - sl_complete_idx: complete - sl_invoiced_idx: invoiced - sl_deleted_at_idx: deleted_at - sl_shipment_complete_exfty_idx: shipment_id, complete, exfty - sl_shipment_collection_idx: shipment_id, collection_date - idx_sl_complete_exfty: complete, exfty - idx_sl_shipment_complete: shipment_id, complete - shipment_lines_customer_id_foreign: customer_id - shipment_lines_factory_id_foreign: factory_id - shipment_lines_style_id_foreign: style_id - shipment_lines_design_id_foreign: design_id - shipment_lines_colourway_id_foreign: colourway_id - idx_shipment_lines_order_line_exfty: customer_order_lines_id, exfty TABLE: shipments ---------------- COLUMNS: - id: bigint unsigned NOT NULL auto_increment [PRIMARY KEY] - organiser: varchar(255) NULL - transporter_id: bigint unsigned NULL [INDEX] - cost: double NULL - truck_first_collection: date NULL [INDEX] - additional_cost: double(8,2) NULL - customs_submitted: tinyint(1) NOT NULL DEFAULT 0 - transporter_invoice: varchar(255) NULL - comments: text NULL - created_at: timestamp NULL - updated_at: timestamp NULL - customs_submitted_text: varchar(255) NULL - no_cartons: int NULL - weight: int NULL - no_trucks: int NULL - deleted_at: timestamp NULL FOREIGN KEYS: - transporter_id -> suppliers.id INDEXES: - shipments_transporter_id_foreign: transporter_id - shipments_truck_first_collection_idx: truck_first_collection TABLE: sizes ------------ COLUMNS: - id: bigint unsigned NOT NULL auto_increment [PRIMARY KEY] - name: varchar(255) NOT NULL [UNIQUE] - created_at: timestamp NULL - updated_at: timestamp NULL - order: int NOT NULL DEFAULT 1 [INDEX] - deleted_at: timestamp NULL INDEXES: - sizes_name_unique: name - idx_sizes_order_deleted: order, deleted_at - idx_sizes_name: name TABLE: style_versions --------------------- COLUMNS: - id: bigint unsigned NOT NULL auto_increment [PRIMARY KEY] - styles_id: bigint unsigned NOT NULL [INDEX] - factory_id: bigint unsigned NOT NULL [INDEX] - name: varchar(255) NOT NULL [INDEX] - gauge_id: bigint unsigned NOT NULL [INDEX] - created_at: timestamp NULL - updated_at: timestamp NULL - yarn_ends: int NULL - issued: date NULL - deleted_at: timestamp NULL - sample_yarn: enum('Not Ordered','Expected','Arrived') NOT NULL DEFAULT Not Ordered - sample_accessories: enum('Not Ordered','Expected','Arrived') NOT NULL DEFAULT Not Ordered - sample_yarn_date: date NULL - sample_accessories_date: date NULL - comments: text NULL FOREIGN KEYS: - factory_id -> suppliers.id - gauge_id -> gauges.id - styles_id -> styles.id INDEXES: - style_versions_gauge_id_foreign: gauge_id - idx_style_versions_styles_deleted: styles_id, deleted_at - idx_style_versions_factory_deleted: factory_id, deleted_at - sv_styles_id_idx: styles_id - sv_factory_id_idx: factory_id - sv_name_idx: name - idx_style_versions_name_style_factory: name, styles_id, factory_id TABLE: styles ------------- COLUMNS: - id: bigint unsigned NOT NULL auto_increment [PRIMARY KEY] - designs_id: bigint unsigned NULL [INDEX] - departments_id: bigint unsigned NOT NULL [INDEX] - seasons_id: bigint unsigned NOT NULL [INDEX] - customers_id: bigint unsigned NOT NULL [INDEX] - customer_ref: varchar(255) NULL [INDEX] - commodity_codes_id: bigint unsigned NULL [INDEX] - notes: text NULL - created_at: timestamp NULL - updated_at: timestamp NULL - carryover: tinyint(1) NOT NULL DEFAULT 0 - category: enum('mens','ladies','accessories','childrens') NULL - cancelled: tinyint(1) NOT NULL DEFAULT 0 [INDEX] - deleted_at: timestamp NULL [INDEX] - customer_samp_no: varchar(255) NULL - green_seal_approval_comments: varchar(255) NULL - photo_shoot_sample_comments: varchar(255) NULL - intake_id: bigint unsigned NULL [INDEX] FOREIGN KEYS: - commodity_codes_id -> commodity_codes.id - customers_id -> customers.id - departments_id -> departments.id - designs_id -> designs.id - intake_id -> intakes.id - seasons_id -> seasons.id INDEXES: - unique_key_styles_designs_etc: designs_id, departments_id, seasons_id, customers_id, category, customer_ref - styles_seasons_id_foreign: seasons_id - styles_commodity_codes_id_foreign: commodity_codes_id - styles_intake_id_foreign: intake_id - idx_styles_customers_seasons: customers_id, seasons_id - idx_styles_departments_category: departments_id, category - idx_styles_cancelled: cancelled - idx_styles_deleted_created: deleted_at, created_at - styles_designs_id_idx: designs_id - styles_customers_id_idx: customers_id - styles_customer_ref_idx: customer_ref - idx_styles_design_season_dept_customer: designs_id, seasons_id, departments_id, customers_id TABLE: supplier_addresses ------------------------- COLUMNS: - id: bigint unsigned NOT NULL auto_increment [PRIMARY KEY] - name: varchar(255) NOT NULL - suppliers_id: bigint unsigned NOT NULL [INDEX] - line1: varchar(255) NOT NULL - line2: varchar(255) NULL - line3: varchar(255) NULL - city: varchar(255) NULL - region: varchar(255) NULL - postcode: varchar(255) NULL - countries_id: bigint unsigned NOT NULL [INDEX] - created_at: timestamp NULL - updated_at: timestamp NULL - email: varchar(255) NULL - deleted_at: timestamp NULL FOREIGN KEYS: - countries_id -> countries.id - suppliers_id -> suppliers.id INDEXES: - supplier_addresses_suppliers_id_foreign: suppliers_id - supplier_addresses_countries_id_foreign: countries_id TABLE: suppliers ---------------- COLUMNS: - id: bigint unsigned NOT NULL auto_increment [PRIMARY KEY] - type: enum('yarn','fabric','accessory','factory','transporter') NULL [INDEX] - name: varchar(255) NOT NULL [UNIQUE] - countries_id: bigint unsigned NOT NULL [INDEX] - contact: varchar(255) NULL - email: varchar(255) NULL [UNIQUE] - phone: varchar(255) NULL - finance_contact: varchar(255) NULL - finance_email: varchar(255) NULL [UNIQUE] - finance_phone: varchar(255) NULL - payment_terms: int unsigned NULL - currency: enum('€','£','$') NOT NULL - created_at: timestamp NULL - updated_at: timestamp NULL - customs: tinyint(1) NULL - mid: varchar(255) NULL - logo: varchar(255) NULL - yc_email: varchar(255) NULL - deleted_at: timestamp NULL [INDEX] FOREIGN KEYS: - countries_id -> countries.id INDEXES: - suppliers_name_unique: name - suppliers_email_unique: email - suppliers_finance_email_unique: finance_email - idx_suppliers_deleted_name: deleted_at, name - idx_suppliers_type_deleted: type, deleted_at - idx_suppliers_country_deleted: countries_id, deleted_at - suppliers_countries_id_idx: countries_id - suppliers_type_idx: type - suppliers_name_idx: name TABLE: team_invitations ----------------------- COLUMNS: - id: bigint unsigned NOT NULL auto_increment [PRIMARY KEY] - team_id: bigint unsigned NOT NULL [INDEX] - email: varchar(255) NOT NULL - role: varchar(255) NULL - created_at: timestamp NULL - updated_at: timestamp NULL FOREIGN KEYS: - team_id -> teams.id INDEXES: - team_invitations_team_id_email_unique: team_id, email TABLE: team_user ---------------- COLUMNS: - id: bigint unsigned NOT NULL auto_increment [PRIMARY KEY] - team_id: bigint unsigned NOT NULL [INDEX] - user_id: bigint unsigned NOT NULL - role: varchar(255) NULL - created_at: timestamp NULL - updated_at: timestamp NULL INDEXES: - team_user_team_id_user_id_unique: team_id, user_id TABLE: teams ------------ COLUMNS: - id: bigint unsigned NOT NULL auto_increment [PRIMARY KEY] - user_id: bigint unsigned NOT NULL [INDEX] - name: varchar(255) NOT NULL - personal_team: tinyint(1) NOT NULL - created_at: timestamp NULL - updated_at: timestamp NULL INDEXES: - teams_user_id_index: user_id TABLE: telescope_entries ------------------------ COLUMNS: - sequence: bigint unsigned NOT NULL auto_increment [PRIMARY KEY] - uuid: char(36) NOT NULL [UNIQUE] - batch_id: char(36) NOT NULL [INDEX] - family_hash: varchar(255) NULL [INDEX] - should_display_on_index: tinyint(1) NOT NULL DEFAULT 1 - type: varchar(20) NOT NULL [INDEX] - content: longtext NOT NULL - created_at: datetime NULL [INDEX] INDEXES: - telescope_entries_uuid_unique: uuid - telescope_entries_batch_id_index: batch_id - telescope_entries_family_hash_index: family_hash - telescope_entries_created_at_index: created_at - telescope_entries_type_should_display_on_index_index: type, should_display_on_index TABLE: telescope_entries_tags ----------------------------- COLUMNS: - entry_uuid: char(36) NOT NULL [PRIMARY KEY] - tag: varchar(255) NOT NULL [PRIMARY KEY] FOREIGN KEYS: - entry_uuid -> telescope_entries.uuid INDEXES: - telescope_entries_tags_tag_index: tag TABLE: telescope_monitoring --------------------------- COLUMNS: - tag: varchar(255) NOT NULL [PRIMARY KEY] TABLE: total_cache ------------------ COLUMNS: - id: bigint unsigned NOT NULL auto_increment [PRIMARY KEY] - entity_type: enum('shipment_line','customer_order_line','customer_order','shipment') NOT NULL [INDEX] - entity_id: bigint unsigned NOT NULL - cache_key: varchar(255) NOT NULL - cached_data: json NOT NULL - fresh_at: timestamp NULL [INDEX] - created_at: timestamp NULL - updated_at: timestamp NULL INDEXES: - unique_entity_cache: entity_type, entity_id, cache_key - idx_entity: entity_type, entity_id - idx_fresh: fresh_at - idx_entity_fresh: entity_type, fresh_at TABLE: user_departments ----------------------- COLUMNS: - id: bigint unsigned NOT NULL auto_increment [PRIMARY KEY] - users_id: bigint unsigned NULL [INDEX] - departments_id: bigint unsigned NULL [INDEX] - created_at: timestamp NULL - updated_at: timestamp NULL FOREIGN KEYS: - departments_id -> departments.id - users_id -> users.id INDEXES: - user_departments_users_id_foreign: users_id - user_departments_departments_id_foreign: departments_id TABLE: users ------------ COLUMNS: - id: bigint unsigned NOT NULL auto_increment [PRIMARY KEY] - name: varchar(255) NOT NULL - email: varchar(255) NOT NULL [UNIQUE] - email_verified_at: timestamp NULL - password: varchar(255) NOT NULL - two_factor_secret: text NULL - two_factor_recovery_codes: text NULL - two_factor_confirmed_at: timestamp NULL - remember_token: varchar(100) NULL - current_team_id: bigint unsigned NULL - profile_photo_path: varchar(2048) NULL - created_at: timestamp NULL - updated_at: timestamp NULL - settings: text NOT NULL - phone: varchar(255) NULL - deleted_at: timestamp NULL - zoho_refresh_token: text NULL - zoho_access_token: text NULL - zoho_access_token_expires_at: text NULL INDEXES: - users_email_unique: email TABLE: vw_colourways -------------------- COLUMNS: - id: bigint unsigned NOT NULL DEFAULT 0 - style_versions_id: bigint unsigned NOT NULL - name: varchar(255) NOT NULL - image: varchar(255) NULL - comments: text NULL - created_at: timestamp NULL - updated_at: timestamp NULL - cancelled: tinyint(1) NOT NULL DEFAULT 0 - accessories: text NULL - colour_type: enum('solid','melange','mixed') NOT NULL DEFAULT solid - img_thumb: varchar(255) NULL - yarn_cost_kg_eur: float NULL TABLE: vw_critical_path ----------------------- COLUMNS: - id: bigint unsigned NULL DEFAULT 0 - season: varchar(255) NOT NULL - factory_id: bigint unsigned NOT NULL DEFAULT 0 - factory: varchar(255) NOT NULL - departments_id: bigint unsigned NOT NULL - customer: varchar(255) NOT NULL - customer_id: bigint unsigned NOT NULL DEFAULT 0 - order_issued: date NULL - customer_po: varchar(255) NOT NULL - description: varchar(255) NOT NULL - colour: varchar(255) NULL - img_thumb: varchar(255) NULL - truck: bigint unsigned NULL - truck_organiser: varchar(255) NULL - truck_price: double NULL - truck_currency: enum('€','£','$') NULL - transporter: varchar(255) NULL - collection_date: date NULL - customs_ern: varchar(255) NULL - shipped: tinyint(1) NULL DEFAULT 0 - rt_invoice: varchar(255) NULL - factory_invoice: varchar(255) NULL - customs_invoice: varchar(255) NULL - transporter_invoice: varchar(255) NULL - finance_complete: tinyint(1) NULL DEFAULT 0 - complete: tinyint(1) NULL DEFAULT 0 - shipment_id: bigint unsigned NULL - revised_exfty: date NULL - customer_orders_id: bigint unsigned NOT NULL DEFAULT 0 - styles_id: bigint unsigned NOT NULL DEFAULT 0 - colourways_id: bigint unsigned NULL DEFAULT 0 - colour_type: enum('solid','melange','mixed') NULL DEFAULT solid - style_versions_id: bigint unsigned NULL DEFAULT 0 - cust_currency: enum('€','£','$') NOT NULL - fact_currency: enum('€','£','$') NOT NULL - coo: bigint unsigned NOT NULL - fn_notes: text NULL - customer_factored: tinyint(1) NULL - customer_terms: int unsigned NULL - seasons_id: bigint unsigned NOT NULL DEFAULT 0 - incoterms: enum('EXW','FCA','CPT','CIP','DAP','DPU','DDP','FAS','FOB','CFR','CIF') NOT NULL - customer_exfty: date NULL - yarn_comments: text NULL - buttons_done: text NULL - labels_done: text NULL - care_done: text NULL - factory_order_yarn: tinyint(1) NULL DEFAULT 0 - cp_photoshoot_deadline: date NULL - button: text NULL - label: text NULL - care: text NULL - sealer_required: longtext NULL - shipment_required: longtext NULL - style: varchar(276) NULL - sizes: longtext NULL - sealer: json NULL - shipment: json NULL - shipped_sizes: longtext NULL - total_shipped: double(19,2) NULL - total_qty: double(19,2) NULL - prices: longtext NULL - truck_first_collection: date NULL - origional_exfty: longtext NULL - yarns: longtext NULL TABLE: vw_finance_samples ------------------------- COLUMNS: - id: bigint unsigned NOT NULL DEFAULT 0 - season: varchar(255) NULL - customer: varchar(255) NULL - rt_no: bigint unsigned NULL DEFAULT 0 - customer_ref: varchar(255) NULL - description: varchar(255) NULL - size: varchar(255) NULL - colourway: varchar(255) NULL - po: varchar(255) NULL - sample_type: varchar(255) NULL - sample_type_id: bigint unsigned NULL DEFAULT 0 - factory: varchar(255) NULL - carryover: tinyint(1) NULL DEFAULT 0 - qty: int NULL - date_expected: date NULL - date_received: date NULL - date_sent: date NULL - fn_notes: text NULL - rt_invoice: varchar(255) NULL - fty_invoice: varchar(255) NULL - finance_comments: text NULL - do_not_charge: tinyint(1) NOT NULL DEFAULT 0 - cust_settings: text NULL - colourways_id: bigint unsigned NULL DEFAULT 0 - colour_type: enum('solid','melange','mixed') NULL DEFAULT solid - cust_currency: enum('€','£','$') NULL - fact_currency: enum('€','£','$') NULL - styles_id: bigint unsigned NULL DEFAULT 0 - orders: longtext NULL - prices: longtext NULL - seasons_id: bigint unsigned NULL DEFAULT 0 - factory_id: bigint unsigned NULL DEFAULT 0 - coo: bigint unsigned NULL - departments_id: bigint unsigned NULL - category: enum('mens','ladies','accessories','childrens') NULL - customers_id: bigint unsigned NULL DEFAULT 0 - fn_complete: tinyint(1) NOT NULL DEFAULT 0 - cw_cancelled: tinyint(1) NULL DEFAULT 0 - s_cancelled: tinyint(1) NULL DEFAULT 0 TABLE: vw_prices ---------------- COLUMNS: - margin: varchar(61) NULL - subtotal_customs_gbp: double NULL - subtotal_gbp: double NULL - yarn_value: double NULL - total_yarn_cost: double NULL - yarnkg: double(8,2) NULL - yarnkg_currency: char(3) NULL DEFAULT € - design_id: bigint unsigned NOT NULL DEFAULT 0 - description: varchar(255) NOT NULL - style_id: bigint unsigned NOT NULL DEFAULT 0 - customer_ref: varchar(255) NULL - seasons_id: bigint unsigned NOT NULL - style_version_id: bigint unsigned NULL DEFAULT 0 - style_version_name: varchar(255) NULL - factory_id: bigint unsigned NOT NULL DEFAULT 0 - factory: varchar(255) NOT NULL - price_id: bigint unsigned NULL DEFAULT 0 - price_name: varchar(255) NULL - model: enum('standard','full_factored','manual') NULL DEFAULT standard - comments_toggle: tinyint(1) NULL DEFAULT 0 - sizes_id: bigint unsigned NULL - colour_type: enum('solid','melange','mixed') NULL - colourways_id: bigint unsigned NULL - yarn_trans_currency: enum('€','£','$') NULL DEFAULT € - yarn_trans: varchar(61) NULL - weight: varchar(61) NULL - costed_weight: varchar(61) NULL - cmt: varchar(61) NULL - cmt_status: enum('not_confirmed','estimate','confirmed') NULL - valid_until: date NULL - aoc: double NULL DEFAULT 0 - accessory_currency: enum('€','£','$') NULL DEFAULT € - accessory: varchar(61) NULL - label_currency: enum('€','£','$') NULL DEFAULT € - label: varchar(61) NULL - gmt_trans_currency: enum('€','£','$') NULL DEFAULT € - gmt_trans: varchar(61) NULL - embroidery_currency: enum('€','£','$') NULL DEFAULT € - embroidery: varchar(61) NULL - testing: varchar(61) NULL - testing_courier: varchar(61) NULL - quote_status: enum('not_confirmed','estimate','confirmed') NULL - target: varchar(61) NULL - min_qty: int NULL - notes: text NULL - customer_notes: text NULL - fact_currency: enum('€','£','$') NOT NULL - cust_currency: enum('€','£','$') NOT NULL - customer_id: bigint unsigned NOT NULL DEFAULT 0 - customer_customs: tinyint(1) NULL - factory_customs: tinyint(1) NULL - season_locked: tinyint(1) NOT NULL DEFAULT 0 - image: varchar(255) NULL - no_style_version_prices: bigint NULL - yarn: longtext NULL - colourways: longtext NULL - historic: json NULL - quotes_sent: json NULL - weight_comments: text NULL - cost_comments: text NULL - quote: varchar(61) NULL - quote_gbp: float NULL - coo: bigint unsigned NOT NULL - coo_name: varchar(255) NOT NULL - departments_id: bigint unsigned NOT NULL - category: enum('mens','ladies','accessories','childrens') NULL - style_cancelled: tinyint(1) NOT NULL DEFAULT 0 - sizes_name: varchar(255) NULL - colourways_name: varchar(255) NULL - last_updated_by: varchar(255) NULL - yarn_cost_kg: float NULL TABLE: wh_cashflow_events ------------------------- COLUMNS: - id: bigint unsigned NOT NULL auto_increment [PRIMARY KEY] - wh_cashflow_id: bigint unsigned NOT NULL [INDEX] - wh_cashflow_line_id: bigint unsigned NOT NULL [INDEX] - shipment_line_id: bigint unsigned NULL [INDEX] - event_date: date NOT NULL [INDEX] - week_key: varchar(10) NOT NULL [INDEX] - type: enum('sale_in','cmt_out','yarn_out','vat_out','sale_in_base','cmt_out_base','yarn_out_base','vat_out_base') NOT NULL [INDEX] - currency: varchar(3) NULL - amount: decimal(14,4) NOT NULL - meta: json NULL - created_at: timestamp NULL - updated_at: timestamp NULL FOREIGN KEYS: - shipment_line_id -> shipment_lines.id - wh_cashflow_id -> wh_cashflows.id - wh_cashflow_line_id -> wh_cashflow_lines.id INDEXES: - wh_cashflow_events_wh_cashflow_line_id_foreign: wh_cashflow_line_id - wh_cashflow_events_shipment_line_id_foreign: shipment_line_id - wh_cashflow_events_wh_cashflow_id_index: wh_cashflow_id - wh_cashflow_events_event_date_index: event_date - wh_cashflow_events_week_key_index: week_key - wh_cashflow_events_type_index: type TABLE: wh_cashflow_lines ------------------------ COLUMNS: - id: bigint unsigned NOT NULL auto_increment [PRIMARY KEY] - wh_cashflow_id: bigint unsigned NOT NULL [INDEX] - shipment_line_id: bigint unsigned NULL [INDEX] - customer_id: bigint unsigned NULL [INDEX] - factory_id: bigint unsigned NULL [INDEX] - department_id: bigint unsigned NULL [INDEX] - season_id: bigint unsigned NULL [INDEX] - exfty: date NULL - factory_cust_date: date NULL - effective_date: date NULL [INDEX] - incoterms: varchar(10) NULL - category: varchar(20) NULL - currency: varchar(3) NULL [INDEX] - sale_currency: varchar(3) NULL - cmt_currency: varchar(3) NULL - yarn_currency: varchar(3) NULL - sale_base: decimal(14,4) NOT NULL DEFAULT 0.0000 - sale_native: decimal(14,4) NOT NULL DEFAULT 0.0000 - cmt_base: decimal(14,4) NOT NULL DEFAULT 0.0000 - cmt_native: decimal(14,4) NOT NULL DEFAULT 0.0000 - yarn_base: decimal(14,4) NOT NULL DEFAULT 0.0000 - yarn_native: decimal(14,4) NOT NULL DEFAULT 0.0000 - vat_base: decimal(14,4) NOT NULL DEFAULT 0.0000 - original_totals: json NULL - terms: json NULL - factored: tinyint(1) NOT NULL DEFAULT 0 - qty: int unsigned NOT NULL DEFAULT 0 - customer_po: varchar(255) NULL - customer_ref: varchar(255) NULL - style: varchar(255) NULL - colour: varchar(255) NULL - created_at: timestamp NULL - updated_at: timestamp NULL FOREIGN KEYS: - customer_id -> customers.id - department_id -> departments.id - factory_id -> suppliers.id - season_id -> seasons.id - shipment_line_id -> shipment_lines.id - wh_cashflow_id -> wh_cashflows.id INDEXES: - wh_cashflow_lines_shipment_line_id_foreign: shipment_line_id - wh_cashflow_lines_customer_id_foreign: customer_id - wh_cashflow_lines_factory_id_foreign: factory_id - wh_cashflow_lines_department_id_foreign: department_id - wh_cashflow_lines_season_id_foreign: season_id - wh_cashflow_lines_wh_cashflow_id_index: wh_cashflow_id - wh_cashflow_lines_effective_date_index: effective_date - wh_cashflow_lines_currency_index: currency TABLE: wh_cashflows ------------------- COLUMNS: - id: bigint unsigned NOT NULL auto_increment [PRIMARY KEY] - name: varchar(255) NOT NULL - filters: json NULL - created_by: bigint unsigned NULL [INDEX] - locked: tinyint(1) NOT NULL DEFAULT 0 - created_at: timestamp NULL - updated_at: timestamp NULL FOREIGN KEYS: - created_by -> users.id INDEXES: - wh_cashflows_created_by_foreign: created_by TABLE: yarn_colours ------------------- COLUMNS: - id: bigint unsigned NOT NULL auto_increment [PRIMARY KEY] - yarn_id: bigint unsigned NULL [INDEX] - reference: varchar(255) NOT NULL [INDEX] - description: varchar(255) NULL - created_at: timestamp NULL - updated_at: timestamp NULL - deleted_at: timestamp NULL FOREIGN KEYS: - yarn_id -> yarns.id INDEXES: - idx_yarn_colours_yarns_deleted: yarn_id, deleted_at - idx_yarn_colours_reference_deleted: reference, deleted_at - yarn_colours_yarn_id_idx: yarn_id TABLE: yarn_compositions ------------------------ COLUMNS: - id: bigint unsigned NOT NULL auto_increment [PRIMARY KEY] - yarn_id: bigint unsigned NOT NULL [INDEX] - materials_id: bigint unsigned NOT NULL [INDEX] - percentage: double(8,2) NOT NULL - created_at: timestamp NULL - updated_at: timestamp NULL - deleted_at: timestamp NULL FOREIGN KEYS: - materials_id -> materials.id - yarn_id -> yarns.id INDEXES: - yarn_compositions_yarn_id_foreign: yarn_id - yarn_compositions_materials_id_foreign: materials_id TABLE: yarn_order_files ----------------------- COLUMNS: - id: bigint unsigned NOT NULL auto_increment [PRIMARY KEY] - yarn_order_id: bigint unsigned NULL [INDEX] - file: varchar(255) NOT NULL - created_at: timestamp NULL - updated_at: timestamp NULL - filename: varchar(255) NOT NULL - deleted_at: timestamp NULL FOREIGN KEYS: - yarn_order_id -> yarn_orders.id INDEXES: - yarn_order_files_yarn_orders_foreign: yarn_order_id TABLE: yarn_order_line_styles ----------------------------- COLUMNS: - id: bigint unsigned NOT NULL auto_increment [PRIMARY KEY] - yarn_order_lines_id: bigint unsigned NULL [INDEX] - notes: text NULL - created_at: timestamp NULL - updated_at: timestamp NULL - customer_order_lines_id: bigint unsigned NULL [INDEX] - invoice_no: varchar(255) NULL - deleted_at: timestamp NULL FOREIGN KEYS: - customer_order_lines_id -> customer_order_lines.id - yarn_order_lines_id -> yarn_order_lines.id INDEXES: - yarn_order_line_styles_yarn_order_lines_id_foreign: yarn_order_lines_id - yarn_order_line_styles_customer_order_lines_id_foreign: customer_order_lines_id TABLE: yarn_order_lines ----------------------- COLUMNS: - id: bigint unsigned NOT NULL auto_increment [PRIMARY KEY] - yarn_order_id: bigint unsigned NULL [INDEX] - price: double(8,2) NULL - qty: double(8,2) NOT NULL - spinner_invoice_no: varchar(255) NULL - factory_invoice_no: varchar(255) NULL - recd: double(8,2) NULL - ship_date: date NULL - actual_ship_date: date NULL - delivery_date: date NULL - notes: text NULL - created_at: timestamp NULL - updated_at: timestamp NULL - yarn_colours_id: bigint unsigned NULL [INDEX] - invoice_no: varchar(255) NULL - invoiced_qty: varchar(255) NULL - fn_notes: varchar(255) NULL - deleted_at: timestamp NULL FOREIGN KEYS: - yarn_colours_id -> yarn_colours.id - yarn_order_id -> yarn_orders.id INDEXES: - idx_yarn_order_lines_order_deleted: yarn_order_id, deleted_at - idx_yarn_order_lines_yarn_colours: yarn_colours_id TABLE: yarn_orders ------------------ COLUMNS: - id: bigint unsigned NOT NULL auto_increment [PRIMARY KEY] - suppliers_id: bigint unsigned NULL [INDEX] - date: date NOT NULL - created_at: timestamp NULL - updated_at: timestamp NULL - comments: text NULL - invoice_to_id: bigint unsigned NOT NULL - deliver_to_id: bigint unsigned NOT NULL - customers_id: bigint unsigned NULL [INDEX] - seasons_id: bigint unsigned NULL [INDEX] - deleted_at: timestamp NULL FOREIGN KEYS: - customers_id -> customers.id - seasons_id -> seasons.id - suppliers_id -> suppliers.id INDEXES: - yarn_orders_seasons_id_foreign: seasons_id - idx_yarn_orders_customers_deleted: customers_id, deleted_at - idx_yarn_orders_suppliers_deleted: suppliers_id, deleted_at TABLE: yarns ------------ COLUMNS: - id: bigint unsigned NOT NULL auto_increment [PRIMARY KEY] - suppliers_id: bigint unsigned NOT NULL [INDEX] - description: varchar(255) NOT NULL - counts_id: bigint unsigned NOT NULL [INDEX] - created_at: timestamp NULL - updated_at: timestamp NULL - deleted_at: timestamp NULL FOREIGN KEYS: - counts_id -> counts.id - suppliers_id -> suppliers.id INDEXES: - yarns_suppliers_id_foreign: suppliers_id - yarns_counts_id_idx: counts_id