CREATE TABLE `alertes` (
	`id` int AUTO_INCREMENT NOT NULL,
	`nom` varchar(255) NOT NULL,
	`type` enum('taux_remplissage','seuil_inscriptions') NOT NULL,
	`condition` varchar(10) NOT NULL,
	`valeurSeuil` int NOT NULL,
	`codeEtablissement` varchar(50),
	`emailsDestinataires` text NOT NULL,
	`actif` boolean NOT NULL DEFAULT true,
	`derniereVerification` timestamp,
	`dernierEnvoi` timestamp,
	`createdAt` timestamp NOT NULL DEFAULT (now()),
	`updatedAt` timestamp NOT NULL DEFAULT (now()) ON UPDATE CURRENT_TIMESTAMP,
	CONSTRAINT `alertes_id` PRIMARY KEY(`id`)
);
