Commit Graph

6 Commits

Author SHA1 Message Date
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
fullex
d321cd23ef chore: format 2025-09-06 18:32:33 +08:00
fullex
92eb5aed7f refactor(migration): rename data migration files and update migration logic
This commit renames the data migration files for clarity, changing `dataMigrate.html` to `dataRefactorMigrate.html` and updating the corresponding service imports. It also enhances the migration logic by implementing a new `app_state` table structure and removing deprecated migration files, streamlining the overall migration process.
2025-08-09 22:37:20 +08:00
fullex
21e40db086 mv dir to data 2025-08-09 14:30:24 +08:00
fullex
a748162e67 chore: update yarn.lock and refactor database schema
- Added `get-tsconfig` dependency version 4.10.1 to yarn.lock.
- Updated schema path in sqlite-drizzle.config.ts from './src/main/db/schema/*' to './src/main/db/schemas/*'.
- Removed unused files: columnHelpers.ts, preference.ts, seed/index.ts, and seed/preferenceSeed.ts to clean up the codebase.
2025-05-27 12:09:08 +08:00
fullex
9105e0f5c1 db init 2025-05-26 08:30:22 +08:00