Skip to main content

Monthly Update - 2025-09

ยท One min read

This month's updates bring important MySQL schema management improvements, including automatic foreign key generation and alter column fixes.

Changesโ€‹

teaql-spring-boot-starterโ€‹

๐Ÿš€ Add MySQL FK generation when ensuring tablesโ€‹

TeaQL now automatically generates foreign key constraints when ensuring database tables. When ensureTables runs, MySQL repositories will detect entity relationships defined in the domain model and create the corresponding FOREIGN KEY constraints in the database schema.

+ MysqlRepository: added FK generation logic to ensureTables()
+ Automatically creates FK constraints based on domain model relationships

This means you no longer need to manually manage foreign key relationships in your MySQL database โ€” TeaQL handles it for you based on your model definitions.

๐Ÿš€ Fix MySQL ALTER issueโ€‹

Fixed an issue with the MySQL ALTER TABLE statement generation. The alter column logic was incorrectly constructing DDL statements, which could cause schema migration failures.

+ MysqlRepository: corrected ALTER TABLE column modification logic
+ Resolved edge cases in column type changes and nullability updates
Technical Details

The ensureTables process now follows this order:

  1. Create missing tables
  2. Add missing columns
  3. Generate foreign keys (new)
  4. Fix column type mismatches

This ensures FK constraints reference columns that already exist.