update
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
// packages/backend/src/migrations.ts
|
||||
import { Database } from 'sqlite3';
|
||||
// import { getDb } from './database'; // 可能不再需要直接从这里获取 db
|
||||
|
||||
|
||||
/**
|
||||
* 运行数据库迁移。
|
||||
@@ -11,14 +10,8 @@ import { Database } from 'sqlite3';
|
||||
export const runMigrations = (db: Database): Promise<void> => {
|
||||
return new Promise<void>((resolve) => {
|
||||
console.log('[Migrations] 检查数据库迁移(当前无操作)。');
|
||||
// 在这里添加未来的迁移逻辑,例如:
|
||||
// db.serialize(() => {
|
||||
// db.run("ALTER TABLE users ADD COLUMN last_login INTEGER;", (err) => { ... });
|
||||
// // 更多迁移步骤...
|
||||
// });
|
||||
resolve(); // 立即解决,因为没有迁移要运行
|
||||
resolve();
|
||||
});
|
||||
};
|
||||
|
||||
// 可以保留一个默认导出或根据需要移除
|
||||
// export default runMigrations;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user