feat: 添加路径收藏功能

This commit is contained in:
Baobhan Sith
2025-05-23 18:47:04 +08:00
parent f8282fe9c0
commit ae60e0c398
15 changed files with 1269 additions and 7 deletions
@@ -265,6 +265,24 @@ const definedMigrations: Migration[] = [
timestamp INTEGER NOT NULL DEFAULT (strftime('%s', 'now'))
);
`
},
{
id: 8,
name: 'Create favorite_paths table',
check: async (db: Database): Promise<boolean> => {
const tableAlreadyExists = await tableExists(db, 'favorite_paths');
return !tableAlreadyExists; // Only run if the table does NOT exist
},
sql: `
CREATE TABLE IF NOT EXISTS favorite_paths (
id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT NULL,
path TEXT NOT NULL,
last_used_at INTEGER NULL;
created_at INTEGER NOT NULL DEFAULT (strftime('%s', 'now')),
updated_at INTEGER NOT NULL DEFAULT (strftime('%s', 'now'))
);
`
}
];