[2025-07-27T12:19:42.364Z] Executing (default): SELECT 1+1 AS result [2025-07-27T12:19:42.371Z] Connexion à la base de données établie avec succès. [2025-07-27T12:19:42.372Z] Executing (default): SHOW COLUMNS FROM users LIKE 'can_skip_matricule'; [2025-07-27T12:19:42.400Z] Executing (default): SHOW INDEX FROM users; [2025-07-27T12:19:42.403Z] Executing (default): ALTER TABLE users DROP INDEX `username_2`; [2025-07-27T12:19:42.714Z] Dropped extra index on users: username_2 [2025-07-27T12:19:42.715Z] Executing (default): SHOW INDEX FROM employers; [2025-07-27T12:19:42.731Z] Executing (default): ALTER TABLE employers DROP INDEX `matricule_2`; [2025-07-27T12:19:43.054Z] Dropped extra index on employers: matricule_2 [2025-07-27T12:19:43.055Z] Executing (default): ALTER TABLE employers DROP INDEX `employers_matricule`; [2025-07-27T12:19:43.162Z] Dropped extra index on employers: employers_matricule [2025-07-27T12:19:43.166Z] Executing (default): SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE' AND TABLE_NAME = 'groups' AND TABLE_SCHEMA = 'bmd_compagne' [2025-07-27T12:19:43.210Z] Executing (default): SHOW FULL COLUMNS FROM `groups`; [2025-07-27T12:19:43.215Z] Executing (default): SELECT CONSTRAINT_NAME as constraint_name,CONSTRAINT_NAME as constraintName,CONSTRAINT_SCHEMA as constraintSchema,CONSTRAINT_SCHEMA as constraintCatalog,TABLE_NAME as tableName,TABLE_SCHEMA as tableSchema,TABLE_SCHEMA as tableCatalog,COLUMN_NAME as columnName,REFERENCED_TABLE_SCHEMA as referencedTableSchema,REFERENCED_TABLE_SCHEMA as referencedTableCatalog,REFERENCED_TABLE_NAME as referencedTableName,REFERENCED_COLUMN_NAME as referencedColumnName FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE where TABLE_NAME = 'groups' AND CONSTRAINT_NAME!='PRIMARY' AND CONSTRAINT_SCHEMA='bmd_compagne' AND REFERENCED_TABLE_NAME IS NOT NULL; [2025-07-27T12:19:43.249Z] Executing (default): ALTER TABLE `groups` CHANGE `name` `name` VARCHAR(50) NOT NULL UNIQUE; [2025-07-27T12:19:43.597Z] Executing (default): ALTER TABLE `groups` CHANGE `created_at` `created_at` DATETIME NOT NULL; [2025-07-27T12:19:43.690Z] Executing (default): ALTER TABLE `groups` CHANGE `updated_at` `updated_at` DATETIME NOT NULL; [2025-07-27T12:19:43.874Z] Executing (default): SHOW INDEX FROM `groups` [2025-07-27T12:19:43.876Z] Executing (default): SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE' AND TABLE_NAME = 'users' AND TABLE_SCHEMA = 'bmd_compagne' [2025-07-27T12:19:43.877Z] Executing (default): SHOW FULL COLUMNS FROM `users`; [2025-07-27T12:19:43.877Z] Executing (default): SELECT CONSTRAINT_NAME as constraint_name,CONSTRAINT_NAME as constraintName,CONSTRAINT_SCHEMA as constraintSchema,CONSTRAINT_SCHEMA as constraintCatalog,TABLE_NAME as tableName,TABLE_SCHEMA as tableSchema,TABLE_SCHEMA as tableCatalog,COLUMN_NAME as columnName,REFERENCED_TABLE_SCHEMA as referencedTableSchema,REFERENCED_TABLE_SCHEMA as referencedTableCatalog,REFERENCED_TABLE_NAME as referencedTableName,REFERENCED_COLUMN_NAME as referencedColumnName FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE where TABLE_NAME = 'users' AND CONSTRAINT_NAME!='PRIMARY' AND CONSTRAINT_SCHEMA='bmd_compagne' AND REFERENCED_TABLE_NAME IS NOT NULL; [2025-07-27T12:19:43.880Z] Executing (default): ALTER TABLE `users` CHANGE `username` `username` VARCHAR(50) NOT NULL UNIQUE; [2025-07-27T12:19:44.068Z] Executing (default): ALTER TABLE `users` CHANGE `password` `password` VARCHAR(255) NOT NULL; [2025-07-27T12:19:44.214Z] Executing (default): ALTER TABLE `users` CHANGE `role` `role` ENUM('Admin', 'Agent') NOT NULL DEFAULT 'Agent'; [2025-07-27T12:19:44.436Z] Executing (default): ALTER TABLE `users` CHANGE `created_at` `created_at` DATETIME NOT NULL; [2025-07-27T12:19:44.685Z] Executing (default): ALTER TABLE `users` CHANGE `updated_at` `updated_at` DATETIME NOT NULL; [2025-07-27T12:19:44.777Z] Executing (default): ALTER TABLE `users` CHANGE `state` `state` ENUM('Adrar', 'Assaba', 'Brakna', 'Dakhlet Nouadhibou', 'Gorgol', 'Guidimakha', 'Hodh Ech Chargui', 'Hodh El Gharbi', 'Inchiri', 'Nouakchott Nord', 'Nouakchott Ouest', 'Nouakchott Sud', 'Tagant', 'Tiris Zemmour', 'Trarza') NOT NULL DEFAULT 'Nouakchott Nord'; [2025-07-27T12:19:44.830Z] Executing (default): ALTER TABLE `users` CHANGE `can_skip_matricule` `can_skip_matricule` TINYINT(1) NOT NULL DEFAULT false; [2025-07-27T12:19:44.889Z] Executing (default): SELECT CONSTRAINT_CATALOG AS constraintCatalog, CONSTRAINT_NAME AS constraintName, CONSTRAINT_SCHEMA AS constraintSchema, CONSTRAINT_TYPE AS constraintType, TABLE_NAME AS tableName, TABLE_SCHEMA AS tableSchema from INFORMATION_SCHEMA.TABLE_CONSTRAINTS WHERE table_name='users' AND constraint_name = 'users_group_id_foreign_idx' AND TABLE_SCHEMA = 'bmd_compagne'; [2025-07-27T12:19:44.892Z] Executing (default): ALTER TABLE `users` DROP FOREIGN KEY `users_group_id_foreign_idx`; [2025-07-27T12:19:44.965Z] Executing (default): ALTER TABLE `users` ADD FOREIGN KEY (`group_id`) REFERENCES `groups` (`id`) ON DELETE SET NULL ON UPDATE CASCADE; [2025-07-27T12:19:45.700Z] Executing (default): SHOW INDEX FROM `users` [2025-07-27T12:19:45.701Z] Executing (default): SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE' AND TABLE_NAME = 'employers' AND TABLE_SCHEMA = 'bmd_compagne' [2025-07-27T12:19:45.703Z] Executing (default): SHOW FULL COLUMNS FROM `employers`; [2025-07-27T12:19:45.703Z] Executing (default): SELECT CONSTRAINT_NAME as constraint_name,CONSTRAINT_NAME as constraintName,CONSTRAINT_SCHEMA as constraintSchema,CONSTRAINT_SCHEMA as constraintCatalog,TABLE_NAME as tableName,TABLE_SCHEMA as tableSchema,TABLE_SCHEMA as tableCatalog,COLUMN_NAME as columnName,REFERENCED_TABLE_SCHEMA as referencedTableSchema,REFERENCED_TABLE_SCHEMA as referencedTableCatalog,REFERENCED_TABLE_NAME as referencedTableName,REFERENCED_COLUMN_NAME as referencedColumnName FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE where TABLE_NAME = 'employers' AND CONSTRAINT_NAME!='PRIMARY' AND CONSTRAINT_SCHEMA='bmd_compagne' AND REFERENCED_TABLE_NAME IS NOT NULL; [2025-07-27T12:19:45.704Z] Executing (default): ALTER TABLE `employers` CHANGE `matricule` `matricule` VARCHAR(50) UNIQUE; [2025-07-27T12:19:46.213Z] Executing (default): ALTER TABLE `employers` CHANGE `nom_responsable` `nom_responsable` VARCHAR(100) NOT NULL; [2025-07-27T12:19:46.307Z] Executing (default): ALTER TABLE `employers` CHANGE `numero_telephone` `numero_telephone` VARCHAR(20) NOT NULL; [2025-07-27T12:19:46.424Z] Executing (default): ALTER TABLE `employers` CHANGE `latitude` `latitude` DECIMAL(10,8) NOT NULL; [2025-07-27T12:19:46.522Z] Executing (default): ALTER TABLE `employers` CHANGE `longitude` `longitude` DECIMAL(11,8) NOT NULL; [2025-07-27T12:19:46.635Z] Executing (default): SELECT CONSTRAINT_CATALOG AS constraintCatalog, CONSTRAINT_NAME AS constraintName, CONSTRAINT_SCHEMA AS constraintSchema, CONSTRAINT_TYPE AS constraintType, TABLE_NAME AS tableName, TABLE_SCHEMA AS tableSchema from INFORMATION_SCHEMA.TABLE_CONSTRAINTS WHERE table_name='employers' AND constraint_name = 'employers_ibfk_1' AND TABLE_SCHEMA = 'bmd_compagne'; [2025-07-27T12:19:46.636Z] Executing (default): ALTER TABLE `employers` DROP FOREIGN KEY `employers_ibfk_1`; [2025-07-27T12:19:46.797Z] Executing (default): SELECT CONSTRAINT_CATALOG AS constraintCatalog, CONSTRAINT_NAME AS constraintName, CONSTRAINT_SCHEMA AS constraintSchema, CONSTRAINT_TYPE AS constraintType, TABLE_NAME AS tableName, TABLE_SCHEMA AS tableSchema from INFORMATION_SCHEMA.TABLE_CONSTRAINTS WHERE table_name='employers' AND constraint_name = 'employers_ibfk_2' AND TABLE_SCHEMA = 'bmd_compagne'; [2025-07-27T12:19:46.798Z] Executing (default): ALTER TABLE `employers` DROP FOREIGN KEY `employers_ibfk_2`; [2025-07-27T12:19:46.982Z] Executing (default): ALTER TABLE `employers` ADD FOREIGN KEY (`agent_id`) REFERENCES `users` (`id`) ON DELETE SET NULL ON UPDATE CASCADE; [2025-07-27T12:19:47.655Z] Executing (default): ALTER TABLE `employers` CHANGE `created_at` `created_at` DATETIME NOT NULL; [2025-07-27T12:19:47.700Z] Executing (default): ALTER TABLE `employers` CHANGE `updated_at` `updated_at` DATETIME NOT NULL; [2025-07-27T12:19:47.742Z] Executing (default): ALTER TABLE `employers` CHANGE `employeur_nom` `employeur_nom` VARCHAR(100); [2025-07-27T12:19:47.785Z] Executing (default): ALTER TABLE `employers` CHANGE `employeur_type` `employeur_type` VARCHAR(50); [2025-07-27T12:19:47.827Z] Executing (default): ALTER TABLE `employers` CHANGE `ville` `ville` VARCHAR(50) DEFAULT 'Nouakchott'; [2025-07-27T12:19:47.919Z] Executing (default): ALTER TABLE `employers` CHANGE `deleted` `deleted` TINYINT(1) NOT NULL DEFAULT false; [2025-07-27T12:19:48.161Z] Executing (default): ALTER TABLE `employers` ADD FOREIGN KEY (`deleted_by`) REFERENCES `users` (`id`) ON DELETE SET NULL ON UPDATE CASCADE; [2025-07-27T12:19:48.641Z] Executing (default): ALTER TABLE `employers` CHANGE `secteur` `secteur` ENUM('Public', 'Privé') NOT NULL; [2025-07-27T12:19:48.676Z] Executing (default): ALTER TABLE `employers` CHANGE `commerce_register` `commerce_register` VARCHAR(100) DEFAULT NULL; [2025-07-27T12:19:48.727Z] Executing (default): SHOW INDEX FROM `employers` [2025-07-27T12:19:48.730Z] Executing (default): ALTER TABLE `employers` ADD UNIQUE INDEX `employers_matricule` (`matricule`) [2025-07-27T12:19:48.964Z] Base de données synchronisée. [2025-07-27T12:19:48.970Z] Executing (default): SELECT `id`, `name`, `created_at` AS `createdAt`, `updated_at` AS `updatedAt` FROM `groups` AS `Group` WHERE `Group`.`name` = 'users'; [2025-07-27T12:19:48.973Z] Executing (default): SELECT `id`, `name`, `created_at` AS `createdAt`, `updated_at` AS `updatedAt` FROM `groups` AS `Group` WHERE `Group`.`name` = 'admins'; [2025-07-27T12:19:48.981Z] Executing (default): UPDATE `users` SET `group_id`=?,`updated_at`=? WHERE `group_id` IS NULL [2025-07-27T12:19:48.985Z] Executing (default): SELECT `id`, `username`, `password`, `role`, `state`, `can_skip_matricule`, `group_id` AS `groupId`, `created_at` AS `createdAt`, `updated_at` AS `updatedAt` FROM `users` AS `User` WHERE `User`.`username` = 'lemana'; [2025-07-27T12:19:48.986Z] User 'lemana' already exists in 'admins' group. [2025-07-27T12:19:48.990Z] Serveur démarré sur le port 5000 [2025-07-27T12:19:48.990Z] Environnement: development [2025-07-27T12:40:02.765Z] Executing (default): SELECT 1+1 AS result [2025-07-27T12:40:02.768Z] Connexion à la base de données établie avec succès. [2025-07-27T12:40:02.769Z] Executing (default): SHOW COLUMNS FROM users LIKE 'can_skip_matricule'; [2025-07-27T12:40:02.771Z] Executing (default): SHOW INDEX FROM users; [2025-07-27T12:40:02.774Z] Executing (default): ALTER TABLE users DROP INDEX `username_2`; [2025-07-27T12:40:02.900Z] Dropped extra index on users: username_2 [2025-07-27T12:40:02.900Z] Executing (default): SHOW INDEX FROM employers; [2025-07-27T12:40:02.902Z] Executing (default): ALTER TABLE employers DROP INDEX `matricule_2`; [2025-07-27T12:40:03.011Z] Dropped extra index on employers: matricule_2 [2025-07-27T12:40:03.012Z] Executing (default): ALTER TABLE employers DROP INDEX `employers_matricule`; [2025-07-27T12:40:03.162Z] Dropped extra index on employers: employers_matricule [2025-07-27T12:40:03.165Z] Executing (default): SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE' AND TABLE_NAME = 'groups' AND TABLE_SCHEMA = 'bmd_compagne' [2025-07-27T12:40:03.168Z] Executing (default): SHOW FULL COLUMNS FROM `groups`; [2025-07-27T12:40:03.171Z] Executing (default): SELECT CONSTRAINT_NAME as constraint_name,CONSTRAINT_NAME as constraintName,CONSTRAINT_SCHEMA as constraintSchema,CONSTRAINT_SCHEMA as constraintCatalog,TABLE_NAME as tableName,TABLE_SCHEMA as tableSchema,TABLE_SCHEMA as tableCatalog,COLUMN_NAME as columnName,REFERENCED_TABLE_SCHEMA as referencedTableSchema,REFERENCED_TABLE_SCHEMA as referencedTableCatalog,REFERENCED_TABLE_NAME as referencedTableName,REFERENCED_COLUMN_NAME as referencedColumnName FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE where TABLE_NAME = 'groups' AND CONSTRAINT_NAME!='PRIMARY' AND CONSTRAINT_SCHEMA='bmd_compagne' AND REFERENCED_TABLE_NAME IS NOT NULL; [2025-07-27T12:40:03.174Z] Executing (default): ALTER TABLE `groups` CHANGE `name` `name` VARCHAR(50) NOT NULL UNIQUE; [2025-07-27T12:40:03.404Z] Executing (default): ALTER TABLE `groups` CHANGE `created_at` `created_at` DATETIME NOT NULL; [2025-07-27T12:40:03.470Z] Executing (default): ALTER TABLE `groups` CHANGE `updated_at` `updated_at` DATETIME NOT NULL; [2025-07-27T12:40:03.521Z] Executing (default): SHOW INDEX FROM `groups` [2025-07-27T12:40:03.523Z] Executing (default): SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE' AND TABLE_NAME = 'users' AND TABLE_SCHEMA = 'bmd_compagne' [2025-07-27T12:40:03.525Z] Executing (default): SHOW FULL COLUMNS FROM `users`; [2025-07-27T12:40:03.525Z] Executing (default): SELECT CONSTRAINT_NAME as constraint_name,CONSTRAINT_NAME as constraintName,CONSTRAINT_SCHEMA as constraintSchema,CONSTRAINT_SCHEMA as constraintCatalog,TABLE_NAME as tableName,TABLE_SCHEMA as tableSchema,TABLE_SCHEMA as tableCatalog,COLUMN_NAME as columnName,REFERENCED_TABLE_SCHEMA as referencedTableSchema,REFERENCED_TABLE_SCHEMA as referencedTableCatalog,REFERENCED_TABLE_NAME as referencedTableName,REFERENCED_COLUMN_NAME as referencedColumnName FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE where TABLE_NAME = 'users' AND CONSTRAINT_NAME!='PRIMARY' AND CONSTRAINT_SCHEMA='bmd_compagne' AND REFERENCED_TABLE_NAME IS NOT NULL; [2025-07-27T12:40:03.528Z] Executing (default): ALTER TABLE `users` CHANGE `username` `username` VARCHAR(50) NOT NULL UNIQUE; [2025-07-27T12:40:03.675Z] Executing (default): ALTER TABLE `users` CHANGE `password` `password` VARCHAR(255) NOT NULL; [2025-07-27T12:40:03.740Z] Executing (default): ALTER TABLE `users` CHANGE `role` `role` ENUM('Admin', 'Agent') NOT NULL DEFAULT 'Agent'; [2025-07-27T12:40:03.833Z] Executing (default): ALTER TABLE `users` CHANGE `created_at` `created_at` DATETIME NOT NULL; [2025-07-27T12:40:03.883Z] Executing (default): ALTER TABLE `users` CHANGE `updated_at` `updated_at` DATETIME NOT NULL; [2025-07-27T12:40:03.942Z] Executing (default): ALTER TABLE `users` CHANGE `state` `state` ENUM('Adrar', 'Assaba', 'Brakna', 'Dakhlet Nouadhibou', 'Gorgol', 'Guidimakha', 'Hodh Ech Chargui', 'Hodh El Gharbi', 'Inchiri', 'Nouakchott Nord', 'Nouakchott Ouest', 'Nouakchott Sud', 'Tagant', 'Tiris Zemmour', 'Trarza') NOT NULL DEFAULT 'Nouakchott Nord'; [2025-07-27T12:40:04.001Z] Executing (default): ALTER TABLE `users` CHANGE `can_skip_matricule` `can_skip_matricule` TINYINT(1) NOT NULL DEFAULT false; [2025-07-27T12:40:04.060Z] Executing (default): SELECT CONSTRAINT_CATALOG AS constraintCatalog, CONSTRAINT_NAME AS constraintName, CONSTRAINT_SCHEMA AS constraintSchema, CONSTRAINT_TYPE AS constraintType, TABLE_NAME AS tableName, TABLE_SCHEMA AS tableSchema from INFORMATION_SCHEMA.TABLE_CONSTRAINTS WHERE table_name='users' AND constraint_name = 'users_ibfk_1' AND TABLE_SCHEMA = 'bmd_compagne'; [2025-07-27T12:40:04.062Z] Executing (default): ALTER TABLE `users` DROP FOREIGN KEY `users_ibfk_1`; [2025-07-27T12:40:04.137Z] Executing (default): ALTER TABLE `users` ADD FOREIGN KEY (`group_id`) REFERENCES `groups` (`id`) ON DELETE SET NULL ON UPDATE CASCADE; [2025-07-27T12:40:04.487Z] Executing (default): SHOW INDEX FROM `users` [2025-07-27T12:40:04.488Z] Executing (default): SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE' AND TABLE_NAME = 'employers' AND TABLE_SCHEMA = 'bmd_compagne' [2025-07-27T12:40:04.489Z] Executing (default): SHOW FULL COLUMNS FROM `employers`; [2025-07-27T12:40:04.489Z] Executing (default): SELECT CONSTRAINT_NAME as constraint_name,CONSTRAINT_NAME as constraintName,CONSTRAINT_SCHEMA as constraintSchema,CONSTRAINT_SCHEMA as constraintCatalog,TABLE_NAME as tableName,TABLE_SCHEMA as tableSchema,TABLE_SCHEMA as tableCatalog,COLUMN_NAME as columnName,REFERENCED_TABLE_SCHEMA as referencedTableSchema,REFERENCED_TABLE_SCHEMA as referencedTableCatalog,REFERENCED_TABLE_NAME as referencedTableName,REFERENCED_COLUMN_NAME as referencedColumnName FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE where TABLE_NAME = 'employers' AND CONSTRAINT_NAME!='PRIMARY' AND CONSTRAINT_SCHEMA='bmd_compagne' AND REFERENCED_TABLE_NAME IS NOT NULL; [2025-07-27T12:40:04.491Z] Executing (default): ALTER TABLE `employers` CHANGE `matricule` `matricule` VARCHAR(50) UNIQUE; [2025-07-27T12:40:04.570Z] Executing (default): ALTER TABLE `employers` CHANGE `nom_responsable` `nom_responsable` VARCHAR(100) NOT NULL; [2025-07-27T12:40:04.631Z] Executing (default): ALTER TABLE `employers` CHANGE `numero_telephone` `numero_telephone` VARCHAR(20) NOT NULL; [2025-07-27T12:40:04.725Z] Executing (default): ALTER TABLE `employers` CHANGE `latitude` `latitude` DECIMAL(10,8) NOT NULL; [2025-07-27T12:40:04.771Z] Executing (default): ALTER TABLE `employers` CHANGE `longitude` `longitude` DECIMAL(11,8) NOT NULL; [2025-07-27T12:40:04.805Z] Executing (default): SELECT CONSTRAINT_CATALOG AS constraintCatalog, CONSTRAINT_NAME AS constraintName, CONSTRAINT_SCHEMA AS constraintSchema, CONSTRAINT_TYPE AS constraintType, TABLE_NAME AS tableName, TABLE_SCHEMA AS tableSchema from INFORMATION_SCHEMA.TABLE_CONSTRAINTS WHERE table_name='employers' AND constraint_name = 'employers_ibfk_1' AND TABLE_SCHEMA = 'bmd_compagne'; [2025-07-27T12:40:04.807Z] Executing (default): ALTER TABLE `employers` DROP FOREIGN KEY `employers_ibfk_1`; [2025-07-27T12:40:04.859Z] Executing (default): SELECT CONSTRAINT_CATALOG AS constraintCatalog, CONSTRAINT_NAME AS constraintName, CONSTRAINT_SCHEMA AS constraintSchema, CONSTRAINT_TYPE AS constraintType, TABLE_NAME AS tableName, TABLE_SCHEMA AS tableSchema from INFORMATION_SCHEMA.TABLE_CONSTRAINTS WHERE table_name='employers' AND constraint_name = 'employers_ibfk_2' AND TABLE_SCHEMA = 'bmd_compagne'; [2025-07-27T12:40:04.860Z] Executing (default): ALTER TABLE `employers` DROP FOREIGN KEY `employers_ibfk_2`; [2025-07-27T12:40:04.962Z] Executing (default): ALTER TABLE `employers` ADD FOREIGN KEY (`agent_id`) REFERENCES `users` (`id`) ON DELETE SET NULL ON UPDATE CASCADE; [2025-07-27T12:40:05.443Z] Executing (default): ALTER TABLE `employers` CHANGE `created_at` `created_at` DATETIME NOT NULL; [2025-07-27T12:40:05.517Z] Executing (default): ALTER TABLE `employers` CHANGE `updated_at` `updated_at` DATETIME NOT NULL; [2025-07-27T12:40:05.568Z] Executing (default): ALTER TABLE `employers` CHANGE `employeur_nom` `employeur_nom` VARCHAR(100); [2025-07-27T12:40:05.598Z] Executing (default): ALTER TABLE `employers` CHANGE `employeur_type` `employeur_type` VARCHAR(50); [2025-07-27T12:40:05.686Z] Executing (default): ALTER TABLE `employers` CHANGE `ville` `ville` VARCHAR(50) DEFAULT 'Nouakchott'; [2025-07-27T12:40:05.760Z] Executing (default): ALTER TABLE `employers` CHANGE `deleted` `deleted` TINYINT(1) NOT NULL DEFAULT false; [2025-07-27T12:40:05.821Z] Executing (default): ALTER TABLE `employers` ADD FOREIGN KEY (`deleted_by`) REFERENCES `users` (`id`) ON DELETE SET NULL ON UPDATE CASCADE; [2025-07-27T12:40:06.169Z] Executing (default): ALTER TABLE `employers` CHANGE `secteur` `secteur` ENUM('Public', 'Privé') NOT NULL; [2025-07-27T12:40:06.207Z] Executing (default): ALTER TABLE `employers` CHANGE `commerce_register` `commerce_register` VARCHAR(100) DEFAULT NULL; [2025-07-27T12:40:06.267Z] Executing (default): SHOW INDEX FROM `employers` [2025-07-27T12:40:06.269Z] Executing (default): ALTER TABLE `employers` ADD UNIQUE INDEX `employers_matricule` (`matricule`) [2025-07-27T12:40:06.421Z] Base de données synchronisée. [2025-07-27T12:40:06.430Z] Executing (default): SELECT `id`, `name`, `created_at` AS `createdAt`, `updated_at` AS `updatedAt` FROM `groups` AS `Group` WHERE `Group`.`name` = 'users'; [2025-07-27T12:40:06.433Z] Executing (default): SELECT `id`, `name`, `created_at` AS `createdAt`, `updated_at` AS `updatedAt` FROM `groups` AS `Group` WHERE `Group`.`name` = 'admins'; [2025-07-27T12:40:06.441Z] Executing (default): UPDATE `users` SET `group_id`=?,`updated_at`=? WHERE `group_id` IS NULL [2025-07-27T12:40:06.444Z] Executing (default): SELECT `id`, `username`, `password`, `role`, `state`, `can_skip_matricule`, `group_id` AS `groupId`, `created_at` AS `createdAt`, `updated_at` AS `updatedAt` FROM `users` AS `User` WHERE `User`.`username` = 'lemana'; [2025-07-27T12:40:06.446Z] User 'lemana' already exists in 'admins' group. [2025-07-27T12:40:06.453Z] Serveur démarré sur le port 5000 [2025-07-27T12:40:06.453Z] Environnement: development [2025-07-27T12:51:26.429Z] Executing (default): SELECT 1+1 AS result [2025-07-27T12:51:26.432Z] Connexion à la base de données établie avec succès. [2025-07-27T12:51:26.432Z] Executing (default): SHOW COLUMNS FROM users LIKE 'can_skip_matricule'; [2025-07-27T12:51:26.435Z] Executing (default): SHOW INDEX FROM users; [2025-07-27T12:51:26.438Z] Executing (default): ALTER TABLE users DROP INDEX `username_2`; [2025-07-27T12:51:26.574Z] Dropped extra index on users: username_2 [2025-07-27T12:51:26.575Z] Executing (default): SHOW INDEX FROM employers; [2025-07-27T12:51:26.577Z] Executing (default): ALTER TABLE employers DROP INDEX `matricule_2`; [2025-07-27T12:51:26.669Z] Dropped extra index on employers: matricule_2 [2025-07-27T12:51:26.669Z] Executing (default): ALTER TABLE employers DROP INDEX `employers_matricule`; [2025-07-27T12:51:26.760Z] Dropped extra index on employers: employers_matricule [2025-07-27T12:51:26.763Z] Executing (default): SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE' AND TABLE_NAME = 'groups' AND TABLE_SCHEMA = 'bmd_compagne' [2025-07-27T12:51:26.766Z] Executing (default): SHOW FULL COLUMNS FROM `groups`; [2025-07-27T12:51:26.769Z] Executing (default): SELECT CONSTRAINT_NAME as constraint_name,CONSTRAINT_NAME as constraintName,CONSTRAINT_SCHEMA as constraintSchema,CONSTRAINT_SCHEMA as constraintCatalog,TABLE_NAME as tableName,TABLE_SCHEMA as tableSchema,TABLE_SCHEMA as tableCatalog,COLUMN_NAME as columnName,REFERENCED_TABLE_SCHEMA as referencedTableSchema,REFERENCED_TABLE_SCHEMA as referencedTableCatalog,REFERENCED_TABLE_NAME as referencedTableName,REFERENCED_COLUMN_NAME as referencedColumnName FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE where TABLE_NAME = 'groups' AND CONSTRAINT_NAME!='PRIMARY' AND CONSTRAINT_SCHEMA='bmd_compagne' AND REFERENCED_TABLE_NAME IS NOT NULL; [2025-07-27T12:51:26.771Z] Executing (default): ALTER TABLE `groups` CHANGE `name` `name` VARCHAR(50) NOT NULL UNIQUE; [2025-07-27T12:51:26.903Z] Executing (default): ALTER TABLE `groups` CHANGE `created_at` `created_at` DATETIME NOT NULL; [2025-07-27T12:51:26.951Z] Executing (default): ALTER TABLE `groups` CHANGE `updated_at` `updated_at` DATETIME NOT NULL; [2025-07-27T12:51:26.993Z] Executing (default): SHOW INDEX FROM `groups` [2025-07-27T12:51:26.995Z] Executing (default): SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE' AND TABLE_NAME = 'users' AND TABLE_SCHEMA = 'bmd_compagne' [2025-07-27T12:51:26.997Z] Executing (default): SHOW FULL COLUMNS FROM `users`; [2025-07-27T12:51:26.997Z] Executing (default): SELECT CONSTRAINT_NAME as constraint_name,CONSTRAINT_NAME as constraintName,CONSTRAINT_SCHEMA as constraintSchema,CONSTRAINT_SCHEMA as constraintCatalog,TABLE_NAME as tableName,TABLE_SCHEMA as tableSchema,TABLE_SCHEMA as tableCatalog,COLUMN_NAME as columnName,REFERENCED_TABLE_SCHEMA as referencedTableSchema,REFERENCED_TABLE_SCHEMA as referencedTableCatalog,REFERENCED_TABLE_NAME as referencedTableName,REFERENCED_COLUMN_NAME as referencedColumnName FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE where TABLE_NAME = 'users' AND CONSTRAINT_NAME!='PRIMARY' AND CONSTRAINT_SCHEMA='bmd_compagne' AND REFERENCED_TABLE_NAME IS NOT NULL; [2025-07-27T12:51:26.999Z] Executing (default): ALTER TABLE `users` CHANGE `username` `username` VARCHAR(50) NOT NULL UNIQUE; [2025-07-27T12:51:27.136Z] Executing (default): ALTER TABLE `users` CHANGE `password` `password` VARCHAR(255) NOT NULL; [2025-07-27T12:51:27.220Z] Executing (default): ALTER TABLE `users` CHANGE `role` `role` ENUM('Admin', 'Agent') NOT NULL DEFAULT 'Agent'; [2025-07-27T12:51:27.270Z] Executing (default): ALTER TABLE `users` CHANGE `created_at` `created_at` DATETIME NOT NULL; [2025-07-27T12:51:27.313Z] Executing (default): ALTER TABLE `users` CHANGE `updated_at` `updated_at` DATETIME NOT NULL; [2025-07-27T12:51:27.356Z] Executing (default): ALTER TABLE `users` CHANGE `state` `state` ENUM('Adrar', 'Assaba', 'Brakna', 'Dakhlet Nouadhibou', 'Gorgol', 'Guidimakha', 'Hodh Ech Chargui', 'Hodh El Gharbi', 'Inchiri', 'Nouakchott Nord', 'Nouakchott Ouest', 'Nouakchott Sud', 'Tagant', 'Tiris Zemmour', 'Trarza') NOT NULL DEFAULT 'Nouakchott Nord'; [2025-07-27T12:51:27.398Z] Executing (default): ALTER TABLE `users` CHANGE `can_skip_matricule` `can_skip_matricule` TINYINT(1) NOT NULL DEFAULT false; [2025-07-27T12:51:27.440Z] Executing (default): SELECT CONSTRAINT_CATALOG AS constraintCatalog, CONSTRAINT_NAME AS constraintName, CONSTRAINT_SCHEMA AS constraintSchema, CONSTRAINT_TYPE AS constraintType, TABLE_NAME AS tableName, TABLE_SCHEMA AS tableSchema from INFORMATION_SCHEMA.TABLE_CONSTRAINTS WHERE table_name='users' AND constraint_name = 'users_ibfk_1' AND TABLE_SCHEMA = 'bmd_compagne'; [2025-07-27T12:51:27.442Z] Executing (default): ALTER TABLE `users` DROP FOREIGN KEY `users_ibfk_1`; [2025-07-27T12:51:27.500Z] Executing (default): ALTER TABLE `users` ADD FOREIGN KEY (`group_id`) REFERENCES `groups` (`id`) ON DELETE SET NULL ON UPDATE CASCADE; [2025-07-27T12:51:27.861Z] Executing (default): SHOW INDEX FROM `users` [2025-07-27T12:51:27.862Z] Executing (default): SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE' AND TABLE_NAME = 'employers' AND TABLE_SCHEMA = 'bmd_compagne' [2025-07-27T12:51:27.863Z] Executing (default): SHOW FULL COLUMNS FROM `employers`; [2025-07-27T12:51:27.863Z] Executing (default): SELECT CONSTRAINT_NAME as constraint_name,CONSTRAINT_NAME as constraintName,CONSTRAINT_SCHEMA as constraintSchema,CONSTRAINT_SCHEMA as constraintCatalog,TABLE_NAME as tableName,TABLE_SCHEMA as tableSchema,TABLE_SCHEMA as tableCatalog,COLUMN_NAME as columnName,REFERENCED_TABLE_SCHEMA as referencedTableSchema,REFERENCED_TABLE_SCHEMA as referencedTableCatalog,REFERENCED_TABLE_NAME as referencedTableName,REFERENCED_COLUMN_NAME as referencedColumnName FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE where TABLE_NAME = 'employers' AND CONSTRAINT_NAME!='PRIMARY' AND CONSTRAINT_SCHEMA='bmd_compagne' AND REFERENCED_TABLE_NAME IS NOT NULL; [2025-07-27T12:51:27.865Z] Executing (default): ALTER TABLE `employers` CHANGE `matricule` `matricule` VARCHAR(50) UNIQUE; [2025-07-27T12:51:28.025Z] Executing (default): ALTER TABLE `employers` CHANGE `nom_responsable` `nom_responsable` VARCHAR(100) NOT NULL; [2025-07-27T12:51:28.077Z] Executing (default): ALTER TABLE `employers` CHANGE `numero_telephone` `numero_telephone` VARCHAR(20) NOT NULL; [2025-07-27T12:51:28.102Z] Executing (default): ALTER TABLE `employers` CHANGE `latitude` `latitude` DECIMAL(10,8) NOT NULL; [2025-07-27T12:51:28.136Z] Executing (default): ALTER TABLE `employers` CHANGE `longitude` `longitude` DECIMAL(11,8) NOT NULL; [2025-07-27T12:51:28.171Z] Executing (default): SELECT CONSTRAINT_CATALOG AS constraintCatalog, CONSTRAINT_NAME AS constraintName, CONSTRAINT_SCHEMA AS constraintSchema, CONSTRAINT_TYPE AS constraintType, TABLE_NAME AS tableName, TABLE_SCHEMA AS tableSchema from INFORMATION_SCHEMA.TABLE_CONSTRAINTS WHERE table_name='employers' AND constraint_name = 'employers_ibfk_1' AND TABLE_SCHEMA = 'bmd_compagne'; [2025-07-27T12:51:28.172Z] Executing (default): ALTER TABLE `employers` DROP FOREIGN KEY `employers_ibfk_1`; [2025-07-27T12:51:28.219Z] Executing (default): SELECT CONSTRAINT_CATALOG AS constraintCatalog, CONSTRAINT_NAME AS constraintName, CONSTRAINT_SCHEMA AS constraintSchema, CONSTRAINT_TYPE AS constraintType, TABLE_NAME AS tableName, TABLE_SCHEMA AS tableSchema from INFORMATION_SCHEMA.TABLE_CONSTRAINTS WHERE table_name='employers' AND constraint_name = 'employers_ibfk_2' AND TABLE_SCHEMA = 'bmd_compagne'; [2025-07-27T12:51:28.221Z] Executing (default): ALTER TABLE `employers` DROP FOREIGN KEY `employers_ibfk_2`; [2025-07-27T12:51:28.292Z] Executing (default): ALTER TABLE `employers` ADD FOREIGN KEY (`agent_id`) REFERENCES `users` (`id`) ON DELETE SET NULL ON UPDATE CASCADE; [2025-07-27T12:51:28.620Z] Executing (default): ALTER TABLE `employers` CHANGE `created_at` `created_at` DATETIME NOT NULL; [2025-07-27T12:51:28.658Z] Executing (default): ALTER TABLE `employers` CHANGE `updated_at` `updated_at` DATETIME NOT NULL; [2025-07-27T12:51:28.692Z] Executing (default): ALTER TABLE `employers` CHANGE `employeur_nom` `employeur_nom` VARCHAR(100); [2025-07-27T12:51:28.743Z] Executing (default): ALTER TABLE `employers` CHANGE `employeur_type` `employeur_type` VARCHAR(50); [2025-07-27T12:51:28.793Z] Executing (default): ALTER TABLE `employers` CHANGE `ville` `ville` VARCHAR(50) DEFAULT 'Nouakchott'; [2025-07-27T12:51:28.818Z] Executing (default): ALTER TABLE `employers` CHANGE `deleted` `deleted` TINYINT(1) NOT NULL DEFAULT false; [2025-07-27T12:51:28.844Z] Executing (default): ALTER TABLE `employers` ADD FOREIGN KEY (`deleted_by`) REFERENCES `users` (`id`) ON DELETE SET NULL ON UPDATE CASCADE; [2025-07-27T12:51:29.129Z] Executing (default): ALTER TABLE `employers` CHANGE `secteur` `secteur` ENUM('Public', 'Privé') NOT NULL; [2025-07-27T12:51:29.165Z] Executing (default): ALTER TABLE `employers` CHANGE `commerce_register` `commerce_register` VARCHAR(100) DEFAULT NULL; [2025-07-27T12:51:29.190Z] Executing (default): SHOW INDEX FROM `employers` [2025-07-27T12:51:29.193Z] Executing (default): ALTER TABLE `employers` ADD UNIQUE INDEX `employers_matricule` (`matricule`) [2025-07-27T12:51:29.321Z] Base de données synchronisée. [2025-07-27T12:51:29.326Z] Executing (default): SELECT `id`, `name`, `created_at` AS `createdAt`, `updated_at` AS `updatedAt` FROM `groups` AS `Group` WHERE `Group`.`name` = 'users'; [2025-07-27T12:51:29.329Z] Executing (default): SELECT `id`, `name`, `created_at` AS `createdAt`, `updated_at` AS `updatedAt` FROM `groups` AS `Group` WHERE `Group`.`name` = 'admins'; [2025-07-27T12:51:29.336Z] Executing (default): UPDATE `users` SET `group_id`=?,`updated_at`=? WHERE `group_id` IS NULL [2025-07-27T12:51:29.339Z] Executing (default): SELECT `id`, `username`, `password`, `role`, `state`, `can_skip_matricule`, `group_id` AS `groupId`, `created_at` AS `createdAt`, `updated_at` AS `updatedAt` FROM `users` AS `User` WHERE `User`.`username` = 'lemana'; [2025-07-27T12:51:29.341Z] User 'lemana' already exists in 'admins' group. [2025-07-27T12:51:29.348Z] Serveur démarré sur le port 5000 [2025-07-27T12:51:29.348Z] Environnement: development