Remove database schema updates and migrations; simplify entrypoint script and related commands

This commit is contained in:
Arunavo Ray
2025-05-19 09:02:39 +05:30
parent 8a9acd4bf7
commit e1faea72d5
5 changed files with 5 additions and 163 deletions

View File

@@ -1,27 +0,0 @@
import { client } from "@/lib/db";
/**
* Migration script to add the mirrored_location column to the repositories table
*/
export async function addMirroredLocationColumn() {
try {
console.log("Starting migration: Adding mirrored_location column to repositories table");
// Check if the column already exists
const tableInfo = await client.execute(`PRAGMA table_info(repositories)`);
const columnExists = tableInfo.rows.some((row: any) => row.name === "mirrored_location");
if (columnExists) {
console.log("Column mirrored_location already exists, skipping migration");
return;
}
// Add the mirrored_location column
await client.execute(`ALTER TABLE repositories ADD COLUMN mirrored_location TEXT DEFAULT ''`);
console.log("Migration completed successfully: mirrored_location column added");
} catch (error) {
console.error("Migration failed:", error);
throw error;
}
}