cherry-studio/migrations
fullex 1b9d8fe24a feat(database): add user data schemas for topic, message, group, and tag
- Add topicTable schema with group organization and pinning support
  - Add messageTable schema with tree structure (adjacency list pattern)
  - Add groupTable schema for organizing entities by type
  - Add tagTable and entityTagTable schemas for tagging system
  - Add FTS5 full-text search support for message content
  - Update preferenceTable to use composite primary key (scope, key)
  - Regenerate initial migration with all tables

  Changes Summary

  | Type        | Files                                                               |
  |-------------|---------------------------------------------------------------------|
  | New schemas | topic.ts, message.ts, group.ts, tag.ts, entityTag.ts, messageFts.ts |
  | Modified    | preference.ts (index → composite PK)                                |
  | Migration   | Renamed 0000_solid_lord_hawal.sql → 0000_init.sql with all tables   |

  This is part of the data refactoring project - adding core user data table schemas.
2025-12-24 23:19:25 +08:00
..
sqlite-drizzle feat(database): add user data schemas for topic, message, group, and tag 2025-12-24 23:19:25 +08:00
README.md chore: format 2025-09-06 18:32:33 +08:00
sqlite-drizzle.config.ts mv dir to data 2025-08-09 14:30:24 +08:00

THIS DIRECTORY IS NOT FOR RUNTIME USE

  • Using libsql as the sqlite3 driver, and drizzle as the ORM and database migration tool
  • migrations/sqlite-drizzle contains 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 migrations:generate