Skip to content

Conversation

@TaprootFreak
Copy link
Contributor

Summary

This PR adds SQLite database support for local development while maintaining MSSQL for dev/prod environments.

Changes

  • Database Configuration: Environment-based database selection

    • ENVIRONMENT=loc → SQLite (local development)
    • ENVIRONMENT=dev|prd → MSSQL (existing production setup)
  • Dependencies: Added sqlite3 package for TypeORM SQLite support

  • Entity Updates: Updated column type definitions for cross-database compatibility

    • @Column({ length: 'MAX' }) for TEXT fields
    • @Column({ type: 'datetime' }) for timestamps
    • @Column({ type: 'float' }) for decimal numbers
  • Gitignore: Added testDB/ and SQLite database files to prevent committing local test data

Benefits

  • ✅ No external database required for local development
  • ✅ Faster onboarding for new developers
  • ✅ Simplified testing and development workflow
  • ✅ Zero impact on existing dev/prod environments

Testing

  • Existing dev/prod environments remain unchanged (MSSQL configuration preserved)
  • Local development tested with SQLite
  • All TypeORM entities compatible with both database types

Breaking Changes

None. The change is backward compatible and only affects local development when ENVIRONMENT=loc.

- Add sqlite3 dependency
- Configure environment-based database selection (SQLite for local, MSSQL for dev/prod)
- Update entity column types for SQLite compatibility
- Add testDB directory to gitignore
@TaprootFreak
Copy link
Contributor Author

Do not use Squash

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.

2 participants