CREATE TABLE `bapHistory` (
	`id` int AUTO_INCREMENT NOT NULL,
	`userId` int NOT NULL,
	`invoiceId` int NOT NULL,
	`supplierName` varchar(255),
	`invoiceNumber` varchar(100),
	`invoiceDate` timestamp,
	`totalAmount` varchar(50),
	`typeAchat` varchar(50),
	`serviceConcerne` varchar(100),
	`ventilationComptable` varchar(100),
	`recipientName` varchar(255),
	`exportMode` enum('browser','folder') NOT NULL DEFAULT 'browser',
	`exportPath` text,
	`pdfUrl` text,
	`signatureName` varchar(255),
	`validatedAt` timestamp NOT NULL DEFAULT (now()),
	CONSTRAINT `bapHistory_id` PRIMARY KEY(`id`)
);
--> statement-breakpoint
ALTER TABLE `importSettings` ADD `bapExportMode` enum('browser','folder') DEFAULT 'browser' NOT NULL;