refactor: update database setup and remove skills migration API
- Changed migration commands in DATABASE_SETUP.md to use `pnpm run sync-skills` and `pnpm run sync-teams`. - Removed the skills migration API endpoint in route.ts, streamlining the migration process. - Updated MIGRATION_UUID.md to reflect changes in migration steps and removed the old skills migration script. - Added new sync scripts for skills and teams in package.json. - Cleaned up init.sql by removing old teams data insertion and adjusted comments for clarity.
This commit is contained in:
@@ -24,7 +24,7 @@ export class ApiClient {
|
||||
): Promise<UserEvaluation | null> {
|
||||
try {
|
||||
let url = `${this.baseUrl}/api/evaluations`;
|
||||
|
||||
|
||||
// Mode compatibilité avec profile en paramètres
|
||||
if (profile) {
|
||||
const params = new URLSearchParams({
|
||||
@@ -383,33 +383,6 @@ export class ApiClient {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Migre les skills depuis JSON vers PostgreSQL
|
||||
*/
|
||||
async migrateSkills(): Promise<{
|
||||
success: boolean;
|
||||
stats?: any;
|
||||
error?: string;
|
||||
}> {
|
||||
try {
|
||||
const response = await fetch(`${this.baseUrl}/api/skills/migrate`, {
|
||||
method: "POST",
|
||||
});
|
||||
|
||||
if (!response.ok) {
|
||||
throw new Error("Erreur lors de la migration des skills");
|
||||
}
|
||||
|
||||
return await response.json();
|
||||
} catch (error) {
|
||||
console.error("Erreur lors de la migration des skills:", error);
|
||||
return {
|
||||
success: false,
|
||||
error: error instanceof Error ? error.message : "Unknown error",
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Crée une nouvelle catégorie de skill
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user