mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-10 23:59:45 +08:00
- Introduced a new SQL migration script to create the `__new_message` table with updated schema, including foreign key constraints and check constraints for `role` and `status`. - Migrated existing data from the old `message` table to the new structure and renamed the table to `message`. - Added indexes for improved query performance on `parent_id`, `topic_id`, and `trace_id`. - Updated metadata to reflect the new migration version and breakpoints for debugging. |
||
|---|---|---|
| .. | ||
| sqlite-drizzle | ||
| README.md | ||
| sqlite-drizzle.config.ts | ||
THIS DIRECTORY IS NOT FOR RUNTIME USE
v2 Data Refactoring Notice
Before the official release of the alpha version, the database structure may change at any time. To maintain simplicity, the database migration files will be periodically reinitialized, which may cause the application to fail. If this occurs, please delete the cherrystudio.sqlite file located in the user data directory.
- Using
libsqlas thesqlite3driver, anddrizzleas the ORM and database migration tool - Table schemas are defined in
src\main\data\db\schemas migrations/sqlite-drizzlecontains auto-generated migration data. Please DO NOT modify it.- If table structure changes, we should run migrations.
- To generate migrations, use the command
yarn run db:migrations:generate