{ "version": "5", "dialect": "mysql", "id": "634fe51e-8827-4f0f-b033-dcd01c3acb21", "prevId": "d7d07602-ed71-4c09-b5d4-3ebd05e45303", "tables": { "apprenants": { "name": "apprenants", "columns": { "id": { "name": "id", "type": "int", "primaryKey": false, "notNull": true, "autoincrement": true }, "nom": { "name": "nom", "type": "varchar(255)", "primaryKey": false, "notNull": true, "autoincrement": false }, "prenom": { "name": "prenom", "type": "varchar(255)", "primaryKey": false, "notNull": true, "autoincrement": false }, "email": { "name": "email", "type": "varchar(320)", "primaryKey": false, "notNull": true, "autoincrement": false }, "codeEtablissement": { "name": "codeEtablissement", "type": "varchar(50)", "primaryKey": false, "notNull": true, "autoincrement": false }, "fonction": { "name": "fonction", "type": "enum('directeur','chef_service','autre')", "primaryKey": false, "notNull": true, "autoincrement": false }, "createdAt": { "name": "createdAt", "type": "timestamp", "primaryKey": false, "notNull": true, "autoincrement": false, "default": "(now())" }, "updatedAt": { "name": "updatedAt", "type": "timestamp", "primaryKey": false, "notNull": true, "autoincrement": false, "onUpdate": true, "default": "(now())" } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": { "apprenants_id": { "name": "apprenants_id", "columns": [ "id" ] } }, "uniqueConstraints": { "apprenants_email_unique": { "name": "apprenants_email_unique", "columns": [ "email" ] } }, "checkConstraint": {} }, "datesFormation": { "name": "datesFormation", "columns": { "id": { "name": "id", "type": "int", "primaryKey": false, "notNull": true, "autoincrement": true }, "sequenceId": { "name": "sequenceId", "type": "int", "primaryKey": false, "notNull": true, "autoincrement": false }, "dateDebut": { "name": "dateDebut", "type": "datetime", "primaryKey": false, "notNull": true, "autoincrement": false }, "dateFin": { "name": "dateFin", "type": "datetime", "primaryKey": false, "notNull": true, "autoincrement": false }, "ordre": { "name": "ordre", "type": "int", "primaryKey": false, "notNull": true, "autoincrement": false }, "createdAt": { "name": "createdAt", "type": "timestamp", "primaryKey": false, "notNull": true, "autoincrement": false, "default": "(now())" } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": { "datesFormation_id": { "name": "datesFormation_id", "columns": [ "id" ] } }, "uniqueConstraints": {}, "checkConstraint": {} }, "emailConfig": { "name": "emailConfig", "columns": { "id": { "name": "id", "type": "int", "primaryKey": false, "notNull": true, "autoincrement": true }, "provider": { "name": "provider", "type": "varchar(50)", "primaryKey": false, "notNull": true, "autoincrement": false, "default": "'resend'" }, "apiKey": { "name": "apiKey", "type": "text", "primaryKey": false, "notNull": false, "autoincrement": false }, "fromEmail": { "name": "fromEmail", "type": "varchar(320)", "primaryKey": false, "notNull": true, "autoincrement": false }, "fromName": { "name": "fromName", "type": "varchar(255)", "primaryKey": false, "notNull": true, "autoincrement": false, "default": "'Formation Manager Itinova'" }, "mode": { "name": "mode", "type": "enum('simulation','production')", "primaryKey": false, "notNull": true, "autoincrement": false, "default": "'simulation'" }, "domainVerified": { "name": "domainVerified", "type": "boolean", "primaryKey": false, "notNull": true, "autoincrement": false, "default": false }, "active": { "name": "active", "type": "boolean", "primaryKey": false, "notNull": true, "autoincrement": false, "default": true }, "createdAt": { "name": "createdAt", "type": "timestamp", "primaryKey": false, "notNull": true, "autoincrement": false, "default": "(now())" }, "updatedAt": { "name": "updatedAt", "type": "timestamp", "primaryKey": false, "notNull": true, "autoincrement": false, "onUpdate": true, "default": "(now())" } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": { "emailConfig_id": { "name": "emailConfig_id", "columns": [ "id" ] } }, "uniqueConstraints": {}, "checkConstraint": {} }, "emailTemplates": { "name": "emailTemplates", "columns": { "id": { "name": "id", "type": "int", "primaryKey": false, "notNull": true, "autoincrement": true }, "type": { "name": "type", "type": "varchar(50)", "primaryKey": false, "notNull": true, "autoincrement": false }, "name": { "name": "name", "type": "varchar(255)", "primaryKey": false, "notNull": true, "autoincrement": false }, "logoUrl": { "name": "logoUrl", "type": "text", "primaryKey": false, "notNull": false, "autoincrement": false }, "primaryColor": { "name": "primaryColor", "type": "varchar(7)", "primaryKey": false, "notNull": true, "autoincrement": false, "default": "'#2563eb'" }, "headerBgColor": { "name": "headerBgColor", "type": "varchar(7)", "primaryKey": false, "notNull": true, "autoincrement": false, "default": "'#2563eb'" }, "headerTextColor": { "name": "headerTextColor", "type": "varchar(7)", "primaryKey": false, "notNull": true, "autoincrement": false, "default": "'#ffffff'" }, "headerTitle": { "name": "headerTitle", "type": "varchar(255)", "primaryKey": false, "notNull": true, "autoincrement": false, "default": "'Formation Manager Itinova'" }, "footerText": { "name": "footerText", "type": "text", "primaryKey": false, "notNull": false, "autoincrement": false }, "active": { "name": "active", "type": "boolean", "primaryKey": false, "notNull": true, "autoincrement": false, "default": true }, "createdAt": { "name": "createdAt", "type": "timestamp", "primaryKey": false, "notNull": true, "autoincrement": false, "default": "(now())" }, "updatedAt": { "name": "updatedAt", "type": "timestamp", "primaryKey": false, "notNull": true, "autoincrement": false, "onUpdate": true, "default": "(now())" } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": { "emailTemplates_id": { "name": "emailTemplates_id", "columns": [ "id" ] } }, "uniqueConstraints": { "emailTemplates_type_unique": { "name": "emailTemplates_type_unique", "columns": [ "type" ] } }, "checkConstraint": {} }, "formateurs": { "name": "formateurs", "columns": { "id": { "name": "id", "type": "int", "primaryKey": false, "notNull": true, "autoincrement": true }, "nom": { "name": "nom", "type": "varchar(255)", "primaryKey": false, "notNull": true, "autoincrement": false }, "actif": { "name": "actif", "type": "boolean", "primaryKey": false, "notNull": true, "autoincrement": false, "default": true }, "createdAt": { "name": "createdAt", "type": "timestamp", "primaryKey": false, "notNull": true, "autoincrement": false, "default": "(now())" }, "updatedAt": { "name": "updatedAt", "type": "timestamp", "primaryKey": false, "notNull": true, "autoincrement": false, "onUpdate": true, "default": "(now())" } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": { "formateurs_id": { "name": "formateurs_id", "columns": [ "id" ] } }, "uniqueConstraints": { "formateurs_nom_unique": { "name": "formateurs_nom_unique", "columns": [ "nom" ] } }, "checkConstraint": {} }, "formations": { "name": "formations", "columns": { "id": { "name": "id", "type": "int", "primaryKey": false, "notNull": true, "autoincrement": true }, "nom": { "name": "nom", "type": "varchar(255)", "primaryKey": false, "notNull": true, "autoincrement": false }, "description": { "name": "description", "type": "text", "primaryKey": false, "notNull": false, "autoincrement": false }, "lienUnique": { "name": "lienUnique", "type": "varchar(100)", "primaryKey": false, "notNull": true, "autoincrement": false }, "actif": { "name": "actif", "type": "boolean", "primaryKey": false, "notNull": true, "autoincrement": false, "default": true }, "createdAt": { "name": "createdAt", "type": "timestamp", "primaryKey": false, "notNull": true, "autoincrement": false, "default": "(now())" }, "updatedAt": { "name": "updatedAt", "type": "timestamp", "primaryKey": false, "notNull": true, "autoincrement": false, "onUpdate": true, "default": "(now())" } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": { "formations_id": { "name": "formations_id", "columns": [ "id" ] } }, "uniqueConstraints": { "formations_lienUnique_unique": { "name": "formations_lienUnique_unique", "columns": [ "lienUnique" ] } }, "checkConstraint": {} }, "inscriptions": { "name": "inscriptions", "columns": { "id": { "name": "id", "type": "int", "primaryKey": false, "notNull": true, "autoincrement": true }, "apprenantId": { "name": "apprenantId", "type": "int", "primaryKey": false, "notNull": true, "autoincrement": false }, "sequenceId": { "name": "sequenceId", "type": "int", "primaryKey": false, "notNull": true, "autoincrement": false }, "statut": { "name": "statut", "type": "enum('confirmee','liste_attente','annulee')", "primaryKey": false, "notNull": true, "autoincrement": false }, "dateInscription": { "name": "dateInscription", "type": "timestamp", "primaryKey": false, "notNull": true, "autoincrement": false, "default": "(now())" }, "createdAt": { "name": "createdAt", "type": "timestamp", "primaryKey": false, "notNull": true, "autoincrement": false, "default": "(now())" }, "updatedAt": { "name": "updatedAt", "type": "timestamp", "primaryKey": false, "notNull": true, "autoincrement": false, "onUpdate": true, "default": "(now())" } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": { "inscriptions_id": { "name": "inscriptions_id", "columns": [ "id" ] } }, "uniqueConstraints": {}, "checkConstraint": {} }, "passwordResetTokens": { "name": "passwordResetTokens", "columns": { "id": { "name": "id", "type": "int", "primaryKey": false, "notNull": true, "autoincrement": true }, "userId": { "name": "userId", "type": "int", "primaryKey": false, "notNull": true, "autoincrement": false }, "token": { "name": "token", "type": "varchar(255)", "primaryKey": false, "notNull": true, "autoincrement": false }, "expiresAt": { "name": "expiresAt", "type": "timestamp", "primaryKey": false, "notNull": true, "autoincrement": false }, "used": { "name": "used", "type": "boolean", "primaryKey": false, "notNull": true, "autoincrement": false, "default": false }, "createdAt": { "name": "createdAt", "type": "timestamp", "primaryKey": false, "notNull": true, "autoincrement": false, "default": "(now())" } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": { "passwordResetTokens_id": { "name": "passwordResetTokens_id", "columns": [ "id" ] } }, "uniqueConstraints": { "passwordResetTokens_token_unique": { "name": "passwordResetTokens_token_unique", "columns": [ "token" ] } }, "checkConstraint": {} }, "rappels": { "name": "rappels", "columns": { "id": { "name": "id", "type": "int", "primaryKey": false, "notNull": true, "autoincrement": true }, "nom": { "name": "nom", "type": "varchar(255)", "primaryKey": false, "notNull": true, "autoincrement": false }, "joursAvant": { "name": "joursAvant", "type": "int", "primaryKey": false, "notNull": true, "autoincrement": false }, "emailTemplate": { "name": "emailTemplate", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "actif": { "name": "actif", "type": "boolean", "primaryKey": false, "notNull": true, "autoincrement": false, "default": true }, "createdAt": { "name": "createdAt", "type": "timestamp", "primaryKey": false, "notNull": true, "autoincrement": false, "default": "(now())" }, "updatedAt": { "name": "updatedAt", "type": "timestamp", "primaryKey": false, "notNull": true, "autoincrement": false, "onUpdate": true, "default": "(now())" } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": { "rappels_id": { "name": "rappels_id", "columns": [ "id" ] } }, "uniqueConstraints": {}, "checkConstraint": {} }, "rappelsEnvoyes": { "name": "rappelsEnvoyes", "columns": { "id": { "name": "id", "type": "int", "primaryKey": false, "notNull": true, "autoincrement": true }, "rappelId": { "name": "rappelId", "type": "int", "primaryKey": false, "notNull": true, "autoincrement": false }, "inscriptionId": { "name": "inscriptionId", "type": "int", "primaryKey": false, "notNull": true, "autoincrement": false }, "dateEnvoi": { "name": "dateEnvoi", "type": "timestamp", "primaryKey": false, "notNull": true, "autoincrement": false, "default": "(now())" } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": { "rappelsEnvoyes_id": { "name": "rappelsEnvoyes_id", "columns": [ "id" ] } }, "uniqueConstraints": {}, "checkConstraint": {} }, "sequences": { "name": "sequences", "columns": { "id": { "name": "id", "type": "int", "primaryKey": false, "notNull": true, "autoincrement": true }, "formationId": { "name": "formationId", "type": "int", "primaryKey": false, "notNull": true, "autoincrement": false }, "nom": { "name": "nom", "type": "varchar(255)", "primaryKey": false, "notNull": true, "autoincrement": false }, "lieu": { "name": "lieu", "type": "varchar(500)", "primaryKey": false, "notNull": true, "autoincrement": false }, "publicCible": { "name": "publicCible", "type": "enum('directeur','chef_service','tous','autre')", "primaryKey": false, "notNull": true, "autoincrement": false }, "formateur": { "name": "formateur", "type": "varchar(255)", "primaryKey": false, "notNull": false, "autoincrement": false }, "capaciteMax": { "name": "capaciteMax", "type": "int", "primaryKey": false, "notNull": true, "autoincrement": false, "default": 12 }, "dateBlocage": { "name": "dateBlocage", "type": "datetime", "primaryKey": false, "notNull": true, "autoincrement": false }, "statut": { "name": "statut", "type": "enum('ouverte','bloquee','terminee')", "primaryKey": false, "notNull": true, "autoincrement": false, "default": "'ouverte'" }, "createdAt": { "name": "createdAt", "type": "timestamp", "primaryKey": false, "notNull": true, "autoincrement": false, "default": "(now())" }, "updatedAt": { "name": "updatedAt", "type": "timestamp", "primaryKey": false, "notNull": true, "autoincrement": false, "onUpdate": true, "default": "(now())" } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": { "sequences_id": { "name": "sequences_id", "columns": [ "id" ] } }, "uniqueConstraints": {}, "checkConstraint": {} }, "users": { "name": "users", "columns": { "id": { "name": "id", "type": "int", "primaryKey": false, "notNull": true, "autoincrement": true }, "openId": { "name": "openId", "type": "varchar(64)", "primaryKey": false, "notNull": false, "autoincrement": false }, "name": { "name": "name", "type": "text", "primaryKey": false, "notNull": false, "autoincrement": false }, "email": { "name": "email", "type": "varchar(320)", "primaryKey": false, "notNull": false, "autoincrement": false }, "loginMethod": { "name": "loginMethod", "type": "varchar(64)", "primaryKey": false, "notNull": false, "autoincrement": false }, "role": { "name": "role", "type": "enum('user','admin')", "primaryKey": false, "notNull": true, "autoincrement": false, "default": "'user'" }, "isActive": { "name": "isActive", "type": "boolean", "primaryKey": false, "notNull": true, "autoincrement": false, "default": true }, "createdAt": { "name": "createdAt", "type": "timestamp", "primaryKey": false, "notNull": true, "autoincrement": false, "default": "(now())" }, "updatedAt": { "name": "updatedAt", "type": "timestamp", "primaryKey": false, "notNull": true, "autoincrement": false, "onUpdate": true, "default": "(now())" }, "lastSignedIn": { "name": "lastSignedIn", "type": "timestamp", "primaryKey": false, "notNull": true, "autoincrement": false, "default": "(now())" } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": { "users_id": { "name": "users_id", "columns": [ "id" ] } }, "uniqueConstraints": {}, "checkConstraint": {} } }, "views": {}, "_meta": { "schemas": {}, "tables": {}, "columns": {} }, "internal": { "tables": {}, "indexes": {} } }