create table if not exists oc_gestion_facture_status ( facture_status_key VARCHAR(255) PRIMARY KEY NOT NULL, facture_status_label VARCHAR(255) DEFAULT '' ); INSERT INTO oc_gestion_facture_status (facture_status_key, facture_status_label) VALUES ('PENDING', 'En attente'), ('PAID', 'Payée'), ('CANCELED', 'Annulée'); create table if not exists oc_gestion_facture_payment_type ( id INT PRIMARY KEY AUTO_INCREMENT, facture_payment_type_label VARCHAR(255) DEFAULT '' ); INSERT INTO oc_gestion_facture_payment_type (facture_payment_type_label) VALUES ('Comptant'), ('Chèque'), ('Virement'); alter table oc_gestion_facture add column fk_facture_status_key VARCHAR(255) DEFAULT 'PENDING', add column fk_facture_payment_type_id INT DEFAULT NULL, add column payment_date DATE DEFAULT NULL;