managarten/apps/context/apps/mobile/migrations/remove_title_field.sql
Till-JS bb0e0cf5cb 🚚 feat(context): integrate context app into monorepo
Restructure the context app (formerly basetext) to follow the monorepo
pattern with proper workspace configuration.

Changes:
- Move app files to apps/context/apps/mobile/
- Rename package to @context/mobile
- Update bundle ID to com.manacore.context
- Create pnpm-workspace.yaml for project workspace
- Add dev scripts to root package.json
- Update CLAUDE.md with project documentation

The app structure is prepared for future web/backend additions.

Note: Existing TypeScript errors in the original codebase are preserved.
These should be fixed in a follow-up PR.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 15:09:04 +01:00

13 lines
766 B
SQL

-- SQL script to modify the documents table by removing the title field
-- Since we'll be extracting titles from the content field, we no longer need a separate title field
-- First, remove the NOT NULL constraint from the title field
ALTER TABLE documents ALTER COLUMN title DROP NOT NULL;
-- Then add a comment to indicate that titles should be extracted from content
COMMENT ON TABLE documents IS 'Document titles are extracted from the content field (first H1 heading or first line)';
-- Note: We're not actually dropping the column yet to maintain backward compatibility
-- This allows for a gradual transition where the application can work with both models
-- Once the application is fully updated, you can run:
-- ALTER TABLE documents DROP COLUMN title;