A Go SQL toolkit that generates database migrations by comparing Go structs with existing migration files.
SQLize is a Go library that generates database migrations by comparing Go structs with existing migration files. It solves schema drift and manual migration errors by automatically producing the SQL needed to align your database with your Go models.
Go developers building applications with relational databases who want to automate and streamline database schema migrations.
Developers choose SQLize for its ability to eliminate manual SQL writing, support multiple databases, and integrate seamlessly with Go structs and ORM tags, reducing boilerplate and errors.
powerful SQL toolkit; offering parsing, building, and migration capabilities.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Diffs Go structs against migration files to automatically produce ALTER TABLE and CREATE TABLE SQL, reducing manual errors and boilerplate as shown in the Quick Start example.
Works with MySQL, PostgreSQL, SQLite, and SQL Server, offering flexibility across common relational databases without vendor lock-in.
Supports struct tags like 'sql' and 'gorm' and integrates with golang-migrate/migrate, easing adoption in existing Go projects with ORM conventions.
Exports Avro Schema for MySQL and ERD diagrams via MermaidJS, useful for documentation and data pipeline integration beyond migrations.
Embedded structs cannot be pointers and require specific tags like 'sql:"embedded"', limiting flexibility in Go model design as noted in the README.
MySQL data types are implicitly changed (e.g., INT to int(11)), which may not align with all project standards or database configurations, potentially causing schema drift.
Focuses solely on schema changes; lacks built-in features for data migrations or complex SQL transformations, requiring manual intervention for such tasks.