-- TIJARA — vider complètement la base (réinstallation from zero)
-- À exécuter dans phpMyAdmin sur la base cible AVANT schema_full.mysql.sql
SET FOREIGN_KEY_CHECKS=0;
DROP TABLE IF EXISTS ai_queries;
DROP TABLE IF EXISTS gps_integrations;
DROP TABLE IF EXISTS contracts;
DROP TABLE IF EXISTS numbering_rules;
DROP TABLE IF EXISTS fiscal_years;
DROP TABLE IF EXISTS user_branches;
DROP TABLE IF EXISTS company_subscriptions;
DROP TABLE IF EXISTS company_modules;
DROP TABLE IF EXISTS saas_plans;
DROP TABLE IF EXISTS company_rules;
DROP TABLE IF EXISTS approval_logs;
DROP TABLE IF EXISTS vehicle_maintenance;
DROP TABLE IF EXISTS ocr_fields;
DROP TABLE IF EXISTS ocr_jobs;
DROP TABLE IF EXISTS documents;
DROP TABLE IF EXISTS purchase_receipt_items;
DROP TABLE IF EXISTS purchase_receipts;
DROP TABLE IF EXISTS purchase_order_items;
DROP TABLE IF EXISTS purchase_orders;
DROP TABLE IF EXISTS supplier_payments;
DROP TABLE IF EXISTS supplier_invoice_items;
DROP TABLE IF EXISTS supplier_invoices;
DROP TABLE IF EXISTS mission_expenses;
DROP TABLE IF EXISTS mission_orders;
DROP TABLE IF EXISTS vehicles;
DROP TABLE IF EXISTS drivers;
DROP TABLE IF EXISTS credit_note_items;
DROP TABLE IF EXISTS attachments;
DROP TABLE IF EXISTS user_companies;
DROP TABLE IF EXISTS activity_logs;
DROP TABLE IF EXISTS notifications;
DROP TABLE IF EXISTS subscriptions;
DROP TABLE IF EXISTS bank_transactions;
DROP TABLE IF EXISTS bank_accounts;
DROP TABLE IF EXISTS cash_transactions;
DROP TABLE IF EXISTS cash_accounts;
DROP TABLE IF EXISTS stock_movements;
DROP TABLE IF EXISTS expenses;
DROP TABLE IF EXISTS payments;
DROP TABLE IF EXISTS credit_notes;
DROP TABLE IF EXISTS invoice_items;
DROP TABLE IF EXISTS invoices;
DROP TABLE IF EXISTS delivery_note_items;
DROP TABLE IF EXISTS delivery_notes;
DROP TABLE IF EXISTS order_items;
DROP TABLE IF EXISTS orders;
DROP TABLE IF EXISTS quote_items;
DROP TABLE IF EXISTS quotes;
DROP TABLE IF EXISTS products;
DROP TABLE IF EXISTS categories;
DROP TABLE IF EXISTS customers;
DROP TABLE IF EXISTS suppliers;
DROP TABLE IF EXISTS document_counters;
DROP TABLE IF EXISTS branches;
DROP TABLE IF EXISTS users;
DROP TABLE IF EXISTS companies;
SET FOREIGN_KEY_CHECKS=1;
