{ "version": "5", "dialect": "mysql", "id": "4fe63ed8-4a51-434d-960c-4ade08966a9d", "prevId": "b04049b4-e4f3-4358-a31e-56390324c61b", "tables": { "etablissements": { "name": "etablissements", "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 }, "logoUrl": { "name": "logoUrl", "type": "text", "primaryKey": false, "notNull": false, "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": { "etablissements_id": { "name": "etablissements_id", "columns": [ "id" ] } }, "uniqueConstraints": {}, "checkConstraint": {} }, "mots_cles": { "name": "mots_cles", "columns": { "id": { "name": "id", "type": "int", "primaryKey": false, "notNull": true, "autoincrement": true }, "label": { "name": "label", "type": "varchar(100)", "primaryKey": false, "notNull": true, "autoincrement": false }, "createdAt": { "name": "createdAt", "type": "timestamp", "primaryKey": false, "notNull": true, "autoincrement": false, "default": "(now())" } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": { "mots_cles_id": { "name": "mots_cles_id", "columns": [ "id" ] } }, "uniqueConstraints": { "mots_cles_label_unique": { "name": "mots_cles_label_unique", "columns": [ "label" ] } }, "checkConstraint": {} }, "podcast_mots_cles": { "name": "podcast_mots_cles", "columns": { "podcastId": { "name": "podcastId", "type": "int", "primaryKey": false, "notNull": true, "autoincrement": false }, "motCleId": { "name": "motCleId", "type": "int", "primaryKey": false, "notNull": true, "autoincrement": false } }, "indexes": {}, "foreignKeys": { "podcast_mots_cles_podcastId_podcasts_id_fk": { "name": "podcast_mots_cles_podcastId_podcasts_id_fk", "tableFrom": "podcast_mots_cles", "tableTo": "podcasts", "columnsFrom": [ "podcastId" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" }, "podcast_mots_cles_motCleId_mots_cles_id_fk": { "name": "podcast_mots_cles_motCleId_mots_cles_id_fk", "tableFrom": "podcast_mots_cles", "tableTo": "mots_cles", "columnsFrom": [ "motCleId" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": { "podcast_mots_cles_podcastId_motCleId_pk": { "name": "podcast_mots_cles_podcastId_motCleId_pk", "columns": [ "podcastId", "motCleId" ] } }, "uniqueConstraints": {}, "checkConstraint": {} }, "podcasts": { "name": "podcasts", "columns": { "id": { "name": "id", "type": "int", "primaryKey": false, "notNull": true, "autoincrement": true }, "titre": { "name": "titre", "type": "varchar(255)", "primaryKey": false, "notNull": true, "autoincrement": false }, "resume": { "name": "resume", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "etablissementId": { "name": "etablissementId", "type": "int", "primaryKey": false, "notNull": true, "autoincrement": false }, "audioUrl": { "name": "audioUrl", "type": "text", "primaryKey": false, "notNull": false, "autoincrement": false }, "audioKey": { "name": "audioKey", "type": "text", "primaryKey": false, "notNull": false, "autoincrement": false }, "dureeSecondes": { "name": "dureeSecondes", "type": "int", "primaryKey": false, "notNull": false, "autoincrement": false }, "statut": { "name": "statut", "type": "enum('brouillon','publie')", "primaryKey": false, "notNull": true, "autoincrement": false, "default": "'brouillon'" }, "auteurId": { "name": "auteurId", "type": "int", "primaryKey": false, "notNull": false, "autoincrement": false }, "imageUrl": { "name": "imageUrl", "type": "text", "primaryKey": false, "notNull": false, "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": { "podcasts_etablissementId_etablissements_id_fk": { "name": "podcasts_etablissementId_etablissements_id_fk", "tableFrom": "podcasts", "tableTo": "etablissements", "columnsFrom": [ "etablissementId" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" }, "podcasts_auteurId_users_id_fk": { "name": "podcasts_auteurId_users_id_fk", "tableFrom": "podcasts", "tableTo": "users", "columnsFrom": [ "auteurId" ], "columnsTo": [ "id" ], "onDelete": "no action", "onUpdate": "no action" } }, "compositePrimaryKeys": { "podcasts_id": { "name": "podcasts_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": true, "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'" }, "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": { "users_openId_unique": { "name": "users_openId_unique", "columns": [ "openId" ] } }, "checkConstraint": {} } }, "views": {}, "_meta": { "schemas": {}, "tables": {}, "columns": {} }, "internal": { "tables": {}, "indexes": {} } }