Commit Graph

7 Commits

Author SHA1 Message Date
fullex
61e80f2e7f feat(database): enhance message and topic schemas with new fields
- Added `siblingsGroupId` to `message` schema for better message organization.
- Introduced `activeNodeId` in `topic` schema to manage message tree structure.
- Updated `assistantMeta` and `modelMeta` fields to use specific types for improved type safety.
- Included `isNameManuallyEdited` and `sortOrder` in `topic` schema for enhanced topic management.
- Added a new entry in the migration journal for version tracking.
2025-12-26 19:21:42 +08:00
fullex
18df6085d7 refactor(dataApi): streamline Data API schema and type definitions
- Removed outdated API model and schema files to simplify the structure.
- Consolidated API types and schemas for better organization and clarity.
- Updated import paths across the codebase to reflect the new structure.
- Enhanced documentation in related README files to guide usage of the new API schema organization.
2025-12-26 12:52:32 +08:00
fullex
8292958c0d feat(database): message.stats and related message type definitions
- Changed migration command from `yarn run migrations:generate` to `yarn run db:migrations:generate` for consistency across the project.
- Updated related documentation in `CLAUDE.md`, `migrations/README.md`, and `src/main/data/README.md` to reflect the new command.
- Added a notice in `migrations/README.md` regarding potential database structure changes before the alpha release.
2025-12-25 21:52:07 +08:00
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
9105e0f5c1 db init 2025-05-26 08:30:22 +08:00