Checkpoint: Correction des erreurs de colonnes manquantes dans les tables :
- Modification du schéma apprenants : codeEtablissement et fonction en VARCHAR nullable (au lieu de NOT NULL et ENUM) - Suppression de la colonne isActive qui n'existe pas dans la base de données - Modification du schéma sequences : ajout des statuts "bloquee" et "terminee" dans l'ENUM - Suppression de la colonne dateBloquage qui n'existe pas dans la base de données - Le dashboard admin fonctionne maintenant correctement sans erreurs de requêtes SQL
This commit is contained in:
74
.manus/db/db-query-1768216505244.json
Normal file
74
.manus/db/db-query-1768216505244.json
Normal file
@@ -0,0 +1,74 @@
|
||||
{
|
||||
"query": "DESCRIBE apprenants;",
|
||||
"command": "mysql --batch --raw --column-names --default-character-set=utf8mb4 --host gateway02.us-east-1.prod.aws.tidbcloud.com --port 4000 --user 4CrrYuB5tme73Qo.root --database 7PAT67UmWoxv8vwp8Bbcv6 --execute DESCRIBE apprenants;",
|
||||
"rows": [
|
||||
{
|
||||
"Field": "id",
|
||||
"Type": "int(11)",
|
||||
"Null": "NO",
|
||||
"Key": "PRI",
|
||||
"Default": "NULL",
|
||||
"Extra": "auto_increment"
|
||||
},
|
||||
{
|
||||
"Field": "nom",
|
||||
"Type": "varchar(255)",
|
||||
"Null": "NO",
|
||||
"Key": "",
|
||||
"Default": "NULL",
|
||||
"Extra": ""
|
||||
},
|
||||
{
|
||||
"Field": "prenom",
|
||||
"Type": "varchar(255)",
|
||||
"Null": "NO",
|
||||
"Key": "",
|
||||
"Default": "NULL",
|
||||
"Extra": ""
|
||||
},
|
||||
{
|
||||
"Field": "email",
|
||||
"Type": "varchar(320)",
|
||||
"Null": "NO",
|
||||
"Key": "UNI",
|
||||
"Default": "NULL",
|
||||
"Extra": ""
|
||||
},
|
||||
{
|
||||
"Field": "codeEtablissement",
|
||||
"Type": "varchar(50)",
|
||||
"Null": "NO",
|
||||
"Key": "",
|
||||
"Default": "NULL",
|
||||
"Extra": ""
|
||||
},
|
||||
{
|
||||
"Field": "createdAt",
|
||||
"Type": "timestamp",
|
||||
"Null": "NO",
|
||||
"Key": "",
|
||||
"Default": "CURRENT_TIMESTAMP",
|
||||
"Extra": ""
|
||||
},
|
||||
{
|
||||
"Field": "updatedAt",
|
||||
"Type": "timestamp",
|
||||
"Null": "NO",
|
||||
"Key": "",
|
||||
"Default": "CURRENT_TIMESTAMP",
|
||||
"Extra": "DEFAULT_GENERATED on update CURRENT_TIMESTAMP"
|
||||
},
|
||||
{
|
||||
"Field": "fonction",
|
||||
"Type": "enum('directeur','chef_service','autre')",
|
||||
"Null": "NO",
|
||||
"Key": "",
|
||||
"Default": "NULL",
|
||||
"Extra": ""
|
||||
}
|
||||
],
|
||||
"messages": [],
|
||||
"stdout": "Field\tType\tNull\tKey\tDefault\tExtra\nid\tint(11)\tNO\tPRI\tNULL\tauto_increment\nnom\tvarchar(255)\tNO\t\tNULL\t\nprenom\tvarchar(255)\tNO\t\tNULL\t\nemail\tvarchar(320)\tNO\tUNI\tNULL\t\ncodeEtablissement\tvarchar(50)\tNO\t\tNULL\t\ncreatedAt\ttimestamp\tNO\t\tCURRENT_TIMESTAMP\t\nupdatedAt\ttimestamp\tNO\t\tCURRENT_TIMESTAMP\tDEFAULT_GENERATED on update CURRENT_TIMESTAMP\nfonction\tenum('directeur','chef_service','autre')\tNO\t\tNULL\t\n",
|
||||
"stderr": "",
|
||||
"execution_time_ms": 664
|
||||
}
|
||||
114
.manus/db/db-query-1768216510525.json
Normal file
114
.manus/db/db-query-1768216510525.json
Normal file
@@ -0,0 +1,114 @@
|
||||
{
|
||||
"query": "DESCRIBE sequences;",
|
||||
"command": "mysql --batch --raw --column-names --default-character-set=utf8mb4 --host gateway02.us-east-1.prod.aws.tidbcloud.com --port 4000 --user 4CrrYuB5tme73Qo.root --database 7PAT67UmWoxv8vwp8Bbcv6 --execute DESCRIBE sequences;",
|
||||
"rows": [
|
||||
{
|
||||
"Field": "id",
|
||||
"Type": "int(11)",
|
||||
"Null": "NO",
|
||||
"Key": "PRI",
|
||||
"Default": "NULL",
|
||||
"Extra": "auto_increment"
|
||||
},
|
||||
{
|
||||
"Field": "formationId",
|
||||
"Type": "int(11)",
|
||||
"Null": "NO",
|
||||
"Key": "",
|
||||
"Default": "NULL",
|
||||
"Extra": ""
|
||||
},
|
||||
{
|
||||
"Field": "nom",
|
||||
"Type": "varchar(255)",
|
||||
"Null": "NO",
|
||||
"Key": "",
|
||||
"Default": "NULL",
|
||||
"Extra": ""
|
||||
},
|
||||
{
|
||||
"Field": "lieu",
|
||||
"Type": "varchar(500)",
|
||||
"Null": "NO",
|
||||
"Key": "",
|
||||
"Default": "NULL",
|
||||
"Extra": ""
|
||||
},
|
||||
{
|
||||
"Field": "capaciteMax",
|
||||
"Type": "int(11)",
|
||||
"Null": "NO",
|
||||
"Key": "",
|
||||
"Default": "12",
|
||||
"Extra": ""
|
||||
},
|
||||
{
|
||||
"Field": "dateBlocage",
|
||||
"Type": "datetime",
|
||||
"Null": "NO",
|
||||
"Key": "",
|
||||
"Default": "NULL",
|
||||
"Extra": ""
|
||||
},
|
||||
{
|
||||
"Field": "statut",
|
||||
"Type": "enum('ouverte','bloquee','terminee')",
|
||||
"Null": "NO",
|
||||
"Key": "",
|
||||
"Default": "ouverte",
|
||||
"Extra": ""
|
||||
},
|
||||
{
|
||||
"Field": "createdAt",
|
||||
"Type": "timestamp",
|
||||
"Null": "NO",
|
||||
"Key": "",
|
||||
"Default": "CURRENT_TIMESTAMP",
|
||||
"Extra": ""
|
||||
},
|
||||
{
|
||||
"Field": "updatedAt",
|
||||
"Type": "timestamp",
|
||||
"Null": "NO",
|
||||
"Key": "",
|
||||
"Default": "CURRENT_TIMESTAMP",
|
||||
"Extra": "DEFAULT_GENERATED on update CURRENT_TIMESTAMP"
|
||||
},
|
||||
{
|
||||
"Field": "publicCible",
|
||||
"Type": "enum('directeur','chef_service','tous','autre')",
|
||||
"Null": "NO",
|
||||
"Key": "",
|
||||
"Default": "NULL",
|
||||
"Extra": ""
|
||||
},
|
||||
{
|
||||
"Field": "formateur",
|
||||
"Type": "varchar(255)",
|
||||
"Null": "YES",
|
||||
"Key": "",
|
||||
"Default": "NULL",
|
||||
"Extra": ""
|
||||
},
|
||||
{
|
||||
"Field": "formateurId",
|
||||
"Type": "int(11)",
|
||||
"Null": "YES",
|
||||
"Key": "",
|
||||
"Default": "NULL",
|
||||
"Extra": ""
|
||||
},
|
||||
{
|
||||
"Field": "qrCodeToken",
|
||||
"Type": "varchar(64)",
|
||||
"Null": "YES",
|
||||
"Key": "",
|
||||
"Default": "NULL",
|
||||
"Extra": ""
|
||||
}
|
||||
],
|
||||
"messages": [],
|
||||
"stdout": "Field\tType\tNull\tKey\tDefault\tExtra\nid\tint(11)\tNO\tPRI\tNULL\tauto_increment\nformationId\tint(11)\tNO\t\tNULL\t\nnom\tvarchar(255)\tNO\t\tNULL\t\nlieu\tvarchar(500)\tNO\t\tNULL\t\ncapaciteMax\tint(11)\tNO\t\t12\t\ndateBlocage\tdatetime\tNO\t\tNULL\t\nstatut\tenum('ouverte','bloquee','terminee')\tNO\t\touverte\t\ncreatedAt\ttimestamp\tNO\t\tCURRENT_TIMESTAMP\t\nupdatedAt\ttimestamp\tNO\t\tCURRENT_TIMESTAMP\tDEFAULT_GENERATED on update CURRENT_TIMESTAMP\npublicCible\tenum('directeur','chef_service','tous','autre')\tNO\t\tNULL\t\nformateur\tvarchar(255)\tYES\t\tNULL\t\nformateurId\tint(11)\tYES\t\tNULL\t\nqrCodeToken\tvarchar(64)\tYES\t\tNULL\t\n",
|
||||
"stderr": "",
|
||||
"execution_time_ms": 54
|
||||
}
|
||||
74
.manus/db/db-query-1768216533905.json
Normal file
74
.manus/db/db-query-1768216533905.json
Normal file
@@ -0,0 +1,74 @@
|
||||
{
|
||||
"query": "SHOW COLUMNS FROM apprenants;",
|
||||
"command": "mysql --batch --raw --column-names --default-character-set=utf8mb4 --host gateway02.us-east-1.prod.aws.tidbcloud.com --port 4000 --user 4CrrYuB5tme73Qo.root --database 7PAT67UmWoxv8vwp8Bbcv6 --execute SHOW COLUMNS FROM apprenants;",
|
||||
"rows": [
|
||||
{
|
||||
"Field": "id",
|
||||
"Type": "int(11)",
|
||||
"Null": "NO",
|
||||
"Key": "PRI",
|
||||
"Default": "NULL",
|
||||
"Extra": "auto_increment"
|
||||
},
|
||||
{
|
||||
"Field": "nom",
|
||||
"Type": "varchar(255)",
|
||||
"Null": "NO",
|
||||
"Key": "",
|
||||
"Default": "NULL",
|
||||
"Extra": ""
|
||||
},
|
||||
{
|
||||
"Field": "prenom",
|
||||
"Type": "varchar(255)",
|
||||
"Null": "NO",
|
||||
"Key": "",
|
||||
"Default": "NULL",
|
||||
"Extra": ""
|
||||
},
|
||||
{
|
||||
"Field": "email",
|
||||
"Type": "varchar(320)",
|
||||
"Null": "NO",
|
||||
"Key": "UNI",
|
||||
"Default": "NULL",
|
||||
"Extra": ""
|
||||
},
|
||||
{
|
||||
"Field": "codeEtablissement",
|
||||
"Type": "varchar(50)",
|
||||
"Null": "NO",
|
||||
"Key": "",
|
||||
"Default": "NULL",
|
||||
"Extra": ""
|
||||
},
|
||||
{
|
||||
"Field": "createdAt",
|
||||
"Type": "timestamp",
|
||||
"Null": "NO",
|
||||
"Key": "",
|
||||
"Default": "CURRENT_TIMESTAMP",
|
||||
"Extra": ""
|
||||
},
|
||||
{
|
||||
"Field": "updatedAt",
|
||||
"Type": "timestamp",
|
||||
"Null": "NO",
|
||||
"Key": "",
|
||||
"Default": "CURRENT_TIMESTAMP",
|
||||
"Extra": "DEFAULT_GENERATED on update CURRENT_TIMESTAMP"
|
||||
},
|
||||
{
|
||||
"Field": "fonction",
|
||||
"Type": "enum('directeur','chef_service','autre')",
|
||||
"Null": "NO",
|
||||
"Key": "",
|
||||
"Default": "NULL",
|
||||
"Extra": ""
|
||||
}
|
||||
],
|
||||
"messages": [],
|
||||
"stdout": "Field\tType\tNull\tKey\tDefault\tExtra\nid\tint(11)\tNO\tPRI\tNULL\tauto_increment\nnom\tvarchar(255)\tNO\t\tNULL\t\nprenom\tvarchar(255)\tNO\t\tNULL\t\nemail\tvarchar(320)\tNO\tUNI\tNULL\t\ncodeEtablissement\tvarchar(50)\tNO\t\tNULL\t\ncreatedAt\ttimestamp\tNO\t\tCURRENT_TIMESTAMP\t\nupdatedAt\ttimestamp\tNO\t\tCURRENT_TIMESTAMP\tDEFAULT_GENERATED on update CURRENT_TIMESTAMP\nfonction\tenum('directeur','chef_service','autre')\tNO\t\tNULL\t\n",
|
||||
"stderr": "",
|
||||
"execution_time_ms": 51
|
||||
}
|
||||
13
.manus/db/db-query-1768216552298.json
Normal file
13
.manus/db/db-query-1768216552298.json
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"query": "SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'apprenants' AND COLUMN_NAME LIKE '%etablissement%';",
|
||||
"command": "mysql --batch --raw --column-names --default-character-set=utf8mb4 --host gateway02.us-east-1.prod.aws.tidbcloud.com --port 4000 --user 4CrrYuB5tme73Qo.root --database 7PAT67UmWoxv8vwp8Bbcv6 --execute SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'apprenants' AND COLUMN_NAME LIKE '%etablissement%';",
|
||||
"rows": [
|
||||
{
|
||||
"COLUMN_NAME": "codeEtablissement"
|
||||
}
|
||||
],
|
||||
"messages": [],
|
||||
"stdout": "COLUMN_NAME\ncodeEtablissement\n",
|
||||
"stderr": "",
|
||||
"execution_time_ms": 61
|
||||
}
|
||||
34
.manus/db/db-query-1768216557806.json
Normal file
34
.manus/db/db-query-1768216557806.json
Normal file
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"query": "SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'apprenants' ORDER BY ORDINAL_POSITION;",
|
||||
"command": "mysql --batch --raw --column-names --default-character-set=utf8mb4 --host gateway02.us-east-1.prod.aws.tidbcloud.com --port 4000 --user 4CrrYuB5tme73Qo.root --database 7PAT67UmWoxv8vwp8Bbcv6 --execute SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'apprenants' ORDER BY ORDINAL_POSITION;",
|
||||
"rows": [
|
||||
{
|
||||
"COLUMN_NAME": "id"
|
||||
},
|
||||
{
|
||||
"COLUMN_NAME": "nom"
|
||||
},
|
||||
{
|
||||
"COLUMN_NAME": "prenom"
|
||||
},
|
||||
{
|
||||
"COLUMN_NAME": "email"
|
||||
},
|
||||
{
|
||||
"COLUMN_NAME": "codeEtablissement"
|
||||
},
|
||||
{
|
||||
"COLUMN_NAME": "createdAt"
|
||||
},
|
||||
{
|
||||
"COLUMN_NAME": "updatedAt"
|
||||
},
|
||||
{
|
||||
"COLUMN_NAME": "fonction"
|
||||
}
|
||||
],
|
||||
"messages": [],
|
||||
"stdout": "COLUMN_NAME\nid\nnom\nprenom\nemail\ncodeEtablissement\ncreatedAt\nupdatedAt\nfonction\n",
|
||||
"stderr": "",
|
||||
"execution_time_ms": 75
|
||||
}
|
||||
82
.manus/db/db-query-1768216585283.json
Normal file
82
.manus/db/db-query-1768216585283.json
Normal file
@@ -0,0 +1,82 @@
|
||||
{
|
||||
"query": "SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'sequences' ORDER BY ORDINAL_POSITION;",
|
||||
"command": "mysql --batch --raw --column-names --default-character-set=utf8mb4 --host gateway02.us-east-1.prod.aws.tidbcloud.com --port 4000 --user 4CrrYuB5tme73Qo.root --database 7PAT67UmWoxv8vwp8Bbcv6 --execute SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'sequences' ORDER BY ORDINAL_POSITION;",
|
||||
"rows": [
|
||||
{
|
||||
"COLUMN_NAME": "TABLE_CATALOG"
|
||||
},
|
||||
{
|
||||
"COLUMN_NAME": "id"
|
||||
},
|
||||
{
|
||||
"COLUMN_NAME": "formationId"
|
||||
},
|
||||
{
|
||||
"COLUMN_NAME": "SEQUENCE_SCHEMA"
|
||||
},
|
||||
{
|
||||
"COLUMN_NAME": "nom"
|
||||
},
|
||||
{
|
||||
"COLUMN_NAME": "SEQUENCE_NAME"
|
||||
},
|
||||
{
|
||||
"COLUMN_NAME": "lieu"
|
||||
},
|
||||
{
|
||||
"COLUMN_NAME": "CACHE"
|
||||
},
|
||||
{
|
||||
"COLUMN_NAME": "capaciteMax"
|
||||
},
|
||||
{
|
||||
"COLUMN_NAME": "CACHE_VALUE"
|
||||
},
|
||||
{
|
||||
"COLUMN_NAME": "dateBlocage"
|
||||
},
|
||||
{
|
||||
"COLUMN_NAME": "CYCLE"
|
||||
},
|
||||
{
|
||||
"COLUMN_NAME": "statut"
|
||||
},
|
||||
{
|
||||
"COLUMN_NAME": "INCREMENT"
|
||||
},
|
||||
{
|
||||
"COLUMN_NAME": "createdAt"
|
||||
},
|
||||
{
|
||||
"COLUMN_NAME": "MAX_VALUE"
|
||||
},
|
||||
{
|
||||
"COLUMN_NAME": "updatedAt"
|
||||
},
|
||||
{
|
||||
"COLUMN_NAME": "MIN_VALUE"
|
||||
},
|
||||
{
|
||||
"COLUMN_NAME": "publicCible"
|
||||
},
|
||||
{
|
||||
"COLUMN_NAME": "START"
|
||||
},
|
||||
{
|
||||
"COLUMN_NAME": "formateur"
|
||||
},
|
||||
{
|
||||
"COLUMN_NAME": "COMMENT"
|
||||
},
|
||||
{
|
||||
"COLUMN_NAME": "formateurId"
|
||||
},
|
||||
{
|
||||
"COLUMN_NAME": "qrCodeToken"
|
||||
}
|
||||
],
|
||||
"messages": [],
|
||||
"stdout": "COLUMN_NAME\nTABLE_CATALOG\nid\nformationId\nSEQUENCE_SCHEMA\nnom\nSEQUENCE_NAME\nlieu\nCACHE\ncapaciteMax\nCACHE_VALUE\ndateBlocage\nCYCLE\nstatut\nINCREMENT\ncreatedAt\nMAX_VALUE\nupdatedAt\nMIN_VALUE\npublicCible\nSTART\nformateur\nCOMMENT\nformateurId\nqrCodeToken\n",
|
||||
"stderr": "",
|
||||
"execution_time_ms": 209
|
||||
}
|
||||
9
.manus/db/db-query-1768216639656.json
Normal file
9
.manus/db/db-query-1768216639656.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"query": "SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'sequences' AND COLUMN_NAME LIKE '%bloq%';",
|
||||
"command": "mysql --batch --raw --column-names --default-character-set=utf8mb4 --host gateway02.us-east-1.prod.aws.tidbcloud.com --port 4000 --user 4CrrYuB5tme73Qo.root --database 7PAT67UmWoxv8vwp8Bbcv6 --execute SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'sequences' AND COLUMN_NAME LIKE '%bloq%';",
|
||||
"rows": [],
|
||||
"messages": [],
|
||||
"stdout": "",
|
||||
"stderr": "",
|
||||
"execution_time_ms": 123
|
||||
}
|
||||
9
.manus/db/db-query-1768216661044.json
Normal file
9
.manus/db/db-query-1768216661044.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"query": "SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'apprenants' AND COLUMN_NAME LIKE '%active%';",
|
||||
"command": "mysql --batch --raw --column-names --default-character-set=utf8mb4 --host gateway02.us-east-1.prod.aws.tidbcloud.com --port 4000 --user 4CrrYuB5tme73Qo.root --database 7PAT67UmWoxv8vwp8Bbcv6 --execute SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'apprenants' AND COLUMN_NAME LIKE '%active%';",
|
||||
"rows": [],
|
||||
"messages": [],
|
||||
"stdout": "",
|
||||
"stderr": "",
|
||||
"execution_time_ms": 431
|
||||
}
|
||||
8
.manus/db/db-query-error-1768216528173.json
Normal file
8
.manus/db/db-query-error-1768216528173.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"query": "ALTER TABLE apprenants \nADD COLUMN codeEtablissement VARCHAR(50) NULL,\nADD COLUMN fonction VARCHAR(100) NULL;",
|
||||
"command": "mysql --batch --raw --column-names --default-character-set=utf8mb4 --host gateway02.us-east-1.prod.aws.tidbcloud.com --port 4000 --user 4CrrYuB5tme73Qo.root --database 7PAT67UmWoxv8vwp8Bbcv6 --execute ALTER TABLE apprenants \nADD COLUMN codeEtablissement VARCHAR(50) NULL,\nADD COLUMN fonction VARCHAR(100) NULL;",
|
||||
"returncode": 1,
|
||||
"logs": [
|
||||
"ERROR 1060 (42S21) at line 1: Duplicate column name 'codeEtablissement'"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user