Drop files here

SQL upload ( 0 ) x -

Page-related settings Click on the bar to scroll to top of page
Press Ctrl+Enter to execute query Press Enter to execute query
ascending
descending
Order:
Debug SQL
Count
Execution order
Time taken
Order by:
Group queries
Ungroup queries
Collapse Expand Show trace Hide trace Count : Time taken :
Bookmarks
Refresh
Add
No bookmarks
Add bookmark
Options
Set default





Collapse Expand Requery Edit Explain Profiling Bookmark Query failed Database : Queried time :
Untitled *
v Show/Hide tables list View in fullscreen Add tables from other databases New page Open page Save page Save page as Delete pages Create table Create relationship Choose column to display Reload Help Angular links / Direct links Snap to grid v Small/Big All Toggle small/big Toggle relationship lines Export schema > Move Menu > Pin text
Number of tables: 0
v complaint_system audit_trail
* id : bigint(20)
* module : varchar(50)
* record_id : int(11)
* action : enum('CREATE','UPDATE','DELETE','STATUS_CHANGE','AUTH_LOGIN','AUTH_LOGOUT','EVALUATION','APPROVAL')
* record_identifier : varchar(100)
* details : text
* old_values : longtext
* new_values : longtext
* user_id : int(11)
* user_name : varchar(100)
* ip_address : varchar(45)
* user_agent : varchar(255)
* created_at : datetime
v complaint_system capas
* id : int(11)
* capa_number : varchar(32)
* title : varchar(255)
* complaint_id : int(11)
* ncr_id : int(11)
* investigation_id : int(11)
* is_capa_required : tinyint(1)
* non_capa_justification : text
* d0_plan : text
* d1_team : text
* d2_problem : text
* d3_containment : text
* d4_root_cause : text
* d5_corrective_actions : text
* d6_implementation : text
* d7_prevent_recurrence : text
* d8_recognition : text
* problem_description : text
* root_cause : text
* interim_containment : text
* correction : text
* corrective_action : text
* preventive_action : text
* action_owner : varchar(100)
* target_date : date
* completion_date : date
* status : enum('Initiated','Plan_Approved','In_Implementation','Pending_Effectiveness','Closed','Rejected','Recurrence_Failed')
* approved_by : int(11)
* approved_at : datetime
* created_by : int(11)
* created_at : datetime
* updated_at : datetime
v complaint_system capa_actions
* id : int(11)
* capa_id : int(11)
* action_type : enum('Correction','Corrective','Preventive')
* description : text
* responsible_person : varchar(100)
* target_date : date
* status : enum('Pending','In_Progress','Completed','Overdue')
* completion_date : date
* evidence_notes : text
* created_at : datetime
v complaint_system capa_effectiveness
* id : int(11)
* capa_id : int(11)
* review_stage : enum('30_Day','60_Day','90_Day')
* review_date : date
* criteria : text
* evidence_observed : text
* result : enum('Effective','Partially_Effective','Ineffective_Recurred')
* reviewed_by : int(11)
* comments : text
* next_review_date : date
* created_at : datetime
v complaint_system complaints
* id : int(11)
* complaint_number : varchar(50)
* source : enum('Customer','Internal','Supplier','Auditor')
* customer_id : int(11)
* department_id : int(11)
* product_id : int(11)
* defect_type_id : int(11)
* severity : enum('Minor','Major','Critical')
* batch_lot_number : varchar(100)
* invoice_number : varchar(100)
* dispatch_date : date
* complaint_date : date
* quantity_supplied : int(11)
* quantity_defective : int(11)
* affected_quantity : int(11)
* problem_description : text
* immediate_containment : text
* containment_status : enum('Pending','Contained','Not_Required')
* status : enum('Registered','Assigned','Under_Investigation','CAPA_Pending','Verification','Closed','Reopened')
* assigned_to_user_id : int(11)
* responsible_department_id : int(11)
* responsible_person : varchar(100)
* target_closure_date : date
* actual_closure_date : date
* financial_impact : decimal(12,2)
* closure_remarks : text
* logged_by_user_id : int(11)
* created_at : timestamp
* updated_at : timestamp
v complaint_system complaint_attachments
* id : int(11)
* complaint_id : int(11)
* file_original_name : varchar(255)
* file_stored_name : varchar(255)
* file_path : varchar(255)
* file_size : int(11)
* mime_type : varchar(100)
* uploaded_by_user_id : int(11)
* created_at : timestamp
v complaint_system controlled_documents
* id : int(11)
* doc_number : varchar(64)
* title : varchar(255)
* doc_type : enum('SOP','Work_Instruction','Quality_Policy','Form_Format','Engineering_Drawing','Standard')
* department_id : int(11)
* revision_number : varchar(20)
* effective_date : date
* review_due_date : date
* file_path : varchar(255)
* file_hash : char(64)
* description : text
* status : enum('Draft','Effective','Under_Review','Obsolete')
* approved_by : int(11)
* created_by : int(11)
* created_at : datetime
* updated_at : datetime
v complaint_system customers
* id : int(11)
* customer_code : varchar(50)
* name : varchar(150)
* contact_person : varchar(100)
* email : varchar(150)
* phone : varchar(50)
* address : text
* is_active : tinyint(1)
* created_at : timestamp
* updated_at : timestamp
v complaint_system defect_types
* id : int(11)
* category : varchar(100)
* name : varchar(150)
* severity : enum('Minor','Major','Critical')
* department_id : int(11)
* is_active : tinyint(1)
* created_at : timestamp
* updated_at : timestamp
v complaint_system departments
* id : int(11)
* name : varchar(100)
* code : varchar(20)
* description : text
* is_active : tinyint(1)
* created_at : timestamp
* updated_at : timestamp
v complaint_system document_sequences
* sequence_type : varchar(50)
* fiscal_year : int(11)
* last_number : int(11)
* prefix : varchar(20)
* updated_at : timestamp
v complaint_system investigations
* id : int(11)
* investigation_number : varchar(32)
* investigation_date : date
* complaint_id : int(11)
* ncr_id : int(11)
* lead_investigator_id : int(11)
* problem_statement : text
* containment_verified : tinyint(1)
* containment_details : text
* why1 : text
* why2 : text
* why3 : text
* why4 : text
* why5 : text
* ishikawa_man : text
* ishikawa_machine : text
* ishikawa_material : text
* ishikawa_method : text
* ishikawa_measurement : text
* ishikawa_environment : text
* root_cause_category : varchar(100)
* identified_root_cause : text
* escape_point : text
* status : enum('In_Progress','Completed','Approved')
* created_by : int(11)
* created_at : datetime
* updated_at : datetime
v complaint_system machines
* id : int(11)
* machine_code : varchar(50)
* name : varchar(100)
* department_id : int(11)
* location : varchar(100)
* is_active : tinyint(1)
* created_at : timestamp
* updated_at : timestamp
v complaint_system materials
* id : int(11)
* material_code : varchar(50)
* name : varchar(150)
* category : enum('Raw Material','Sub-Assembly','Packaging','Chemical','Hardware')
* unit_of_measure : varchar(20)
* standard_cost : decimal(12,2)
* supplier_id : int(11)
* is_active : tinyint(1)
* created_at : timestamp
* updated_at : timestamp
v complaint_system ncrs
* id : int(11)
* ncr_number : varchar(32)
* ncr_date : date
* title : varchar(255)
* department_id : int(11)
* product_id : int(11)
* defect_type_id : int(11)
* severity : enum('Minor','Major','Critical')
* source : enum('Incoming Inspection','In-Process','Final QC','Internal Audit','Customer Return')
* lot_number : varchar(100)
* quantity_affected : int(11)
* description : text
* containment_action : text
* disposition : enum('Pending Review','Scrap','Rework','Sort & Segregate','Concession / Use As Is','Return to Vendor')
* status : enum('Draft','Open','Under_Investigation','CAPA_Initiated','Closed')
* created_by : int(11)
* created_at : datetime
* updated_at : datetime
v complaint_system processes
* id : int(11)
* process_code : varchar(50)
* name : varchar(150)
* department_id : int(11)
* description : text
* is_active : tinyint(1)
* created_at : timestamp
* updated_at : timestamp
v complaint_system products
* id : int(11)
* part_number : varchar(100)
* name : varchar(150)
* department_id : int(11)
* drawing_number : varchar(100)
* revision : varchar(20)
* unit_cost : decimal(12,2)
* is_active : tinyint(1)
* created_at : timestamp
* updated_at : timestamp
v complaint_system quality_actions
* id : int(11)
* action_code : varchar(32)
* source_module : enum('Complaint','Rejection','NCR','CAPA','Audit','General')
* source_id : int(11)
* source_identifier : varchar(100)
* title : varchar(255)
* description : text
* action_type : enum('Containment','Correction','Corrective','Preventive','Verification','Review')
* department_id : int(11)
* responsible_person : varchar(100)
* assigned_to_user_id : int(11)
* planned_start_date : date
* planned_completion_date : date
* actual_start_date : date
* actual_completion_date : date
* progress_percentage : int(11)
* status : enum('Not_Started','In_Progress','Completed','Overdue','On_Hold')
* priority : enum('Low','Medium','High','Critical')
* verification_notes : text
* created_by : int(11)
* created_at : datetime
* updated_at : datetime
v complaint_system rejections
* id : int(11)
* rejection_number : varchar(32)
* rejection_source : enum('Incoming Material','Supplier','In-Process Production','Final Inspection','Dispatch & Packing','Customer Returns','Other Quality Loss')
* rejection_stage : varchar(100)
* rejection_date : date
* department_id : int(11)
* product_id : int(11)
* machine_id : int(11)
* defect_type_id : int(11)
* supplier_id : int(11)
* customer_id : int(11)
* material_id : int(11)
* process_id : int(11)
* work_order : varchar(100)
* invoice_number : varchar(100)
* severity : enum('Minor','Major','Critical')
* detection_stage : varchar(100)
* shift : enum('Shift 1','Shift 2','Shift 3','General')
* unit_of_measure : varchar(20)
* total_received_qty : decimal(12,2)
* inspected_qty : decimal(12,2)
* accepted_qty : decimal(12,2)
* production_qty : int(11)
* rejected_qty : int(11)
* rework_qty : decimal(12,2)
* scrap_qty : decimal(12,2)
* sorting_qty : decimal(12,2)
* pending_qty : decimal(12,2)
* rejection_rate : decimal(6,2)
* acceptance_rate : decimal(6,2)
* disposition : enum('Scrap','Rework','RTV (Return to Vendor)','Use As Is','Sorting')
* disposition_notes : text
* disposition_approved_by : int(11)
* disposition_approved_at : datetime
* scrap_cost : decimal(12,2)
* root_cause_summary : text
* containment_action : text
* corrective_action : text
* preventive_action : text
* is_capa_required : tinyint(1)
* capa_id : int(11)
* ncr_id : int(11)
* responsible_department_id : int(11)
* responsible_employee : varchar(100)
* target_date : date
* status : enum('Open','Under_Investigation','Rework_In_Progress','Disposition_Approved','CAPA_Linked','Closed')
* material_unit_cost : decimal(12,2)
* manufacturing_unit_cost : decimal(12,2)
* material_loss_cost : decimal(12,2)
* mfg_loss_cost : decimal(12,2)
* rework_cost : decimal(12,2)
* sorting_cost : decimal(12,2)
* inspection_cost : decimal(12,2)
* freight_penalty_cost : decimal(12,2)
* gross_rejection_cost : decimal(12,2)
* scrap_recovery : decimal(12,2)
* supplier_recovery : decimal(12,2)
* customer_recovery : decimal(12,2)
* other_recoveries : decimal(12,2)
* total_recoveries : decimal(12,2)
* net_rejection_loss : decimal(12,2)
* costing_method : varchar(50)
* operator_name : varchar(100)
* batch_number : varchar(100)
* created_by : int(11)
* created_at : datetime
* updated_at : datetime
v complaint_system rejection_cost_items
* id : int(11)
* rejection_id : int(11)
* category : enum('Material','Labor','Machine','Sorting','Inspection','Freight','Debit_Note','Scrap_Recovery','Supplier_Recovery','Customer_Recovery','Other')
* description : varchar(255)
* quantity : decimal(12,2)
* unit_cost : decimal(12,2)
* amount : decimal(12,2)
* is_recovery : tinyint(1)
* created_at : datetime
v complaint_system suppliers
* id : int(11)
* supplier_code : varchar(50)
* name : varchar(150)
* contact_person : varchar(100)
* email : varchar(150)
* phone : varchar(50)
* address : text
* material_supplied : text
* supplier_category : varchar(50)
* approval_status : enum('Approved','Conditional','Under_Audit','Blocked')
* quality_rating : decimal(4,1)
* is_active : tinyint(1)
* created_at : timestamp
* updated_at : timestamp
v complaint_system users
* id : int(11)
* employee_id : varchar(50)
* username : varchar(50)
* name : varchar(100)
* designation : varchar(100)
* email : varchar(150)
* department_id : int(11)
* division : varchar(50)
* phone : varchar(50)
* password : varchar(255)
* role : varchar(50)
* is_active : tinyint(1)
* last_login_at : datetime
* created_at : timestamp
* updated_at : timestamp
Create relationship
FOREIGN KEY
on delete
on update
Delete relationship