Skip to content

Make codebase SQLite compatible#7

Merged
marckohlbrugge merged 1 commit intomainfrom
marc/sqlite-compatibility
Jan 1, 2026
Merged

Make codebase SQLite compatible#7
marckohlbrugge merged 1 commit intomainfrom
marc/sqlite-compatibility

Conversation

@marckohlbrugge
Copy link
Owner

@marckohlbrugge marckohlbrugge commented Jan 1, 2026

Summary

  • Replace jsonb with json in migrations (works on both PostgreSQL and SQLite)
  • Replace PostgreSQL enum with string column (Rails enum handles validation in model)
  • Replace uuid with gen_random_uuid() default with string (model generates UUID)
  • Add conversion migration for existing PostgreSQL deployments (checks column types first, safe for fresh installs)

Test plan

  • Ran migrations on existing PostgreSQL database
  • Deployed to production via Kamal
  • Test fresh SQLite install (swap pg gem for sqlite3, update database.yml)

🤖 Generated with Claude Code

- Replace jsonb with json in create migrations
- Replace PostgreSQL enum with string column
- Replace uuid with gen_random_uuid() default with string (model generates UUID)
- Add conversion migration for existing PostgreSQL deployments
  (checks column types before converting, safe for fresh installs)
@marckohlbrugge marckohlbrugge merged commit fff580f into main Jan 1, 2026
5 checks passed
@marckohlbrugge marckohlbrugge deleted the marc/sqlite-compatibility branch January 1, 2026 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant