Checkpoint: Ajout de la page de gestion des flux RSS : liste des flux, formulaire d'ajout/édition avec type (Veille/AAP), type par défaut, règles d'automatisme par mots-clés, paramètres de fréquence (heure fixe ou intervalle), activation/désactivation. Tables BDD rss_feeds et rss_settings. Procédures tRPC complètes. Navigation sidebar mise à jour.
This commit is contained in:
26
drizzle/0004_clear_edwin_jarvis.sql
Normal file
26
drizzle/0004_clear_edwin_jarvis.sql
Normal file
@@ -0,0 +1,26 @@
|
||||
CREATE TABLE `rss_feeds` (
|
||||
`id` int AUTO_INCREMENT NOT NULL,
|
||||
`url` text NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`feedType` enum('veille','aap') NOT NULL,
|
||||
`defaultTypeVeille` enum('reglementaire','concurrentielle','technologique','generale'),
|
||||
`defaultCategorieAap` enum('Handicap','PA','Enfance','Précarité','Sanitaire','Autre'),
|
||||
`autoRules` json,
|
||||
`isActive` boolean NOT NULL DEFAULT true,
|
||||
`lastFetchedAt` timestamp,
|
||||
`lastFetchStatus` enum('ok','error','pending') DEFAULT 'pending',
|
||||
`lastFetchError` text,
|
||||
`createdAt` timestamp NOT NULL DEFAULT (now()),
|
||||
`updatedAt` timestamp NOT NULL DEFAULT (now()) ON UPDATE CURRENT_TIMESTAMP,
|
||||
CONSTRAINT `rss_feeds_id` PRIMARY KEY(`id`)
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE TABLE `rss_settings` (
|
||||
`id` int AUTO_INCREMENT NOT NULL,
|
||||
`fetchIntervalMinutes` int NOT NULL DEFAULT 360,
|
||||
`scheduledTime` varchar(5) DEFAULT '06:00',
|
||||
`fetchMode` enum('interval','scheduled') NOT NULL DEFAULT 'scheduled',
|
||||
`autoFetchEnabled` boolean NOT NULL DEFAULT true,
|
||||
`updatedAt` timestamp NOT NULL DEFAULT (now()) ON UPDATE CURRENT_TIMESTAMP,
|
||||
CONSTRAINT `rss_settings_id` PRIMARY KEY(`id`)
|
||||
);
|
||||
Reference in New Issue
Block a user