{"repo":"sunary/sqlize","free":true,"listed":false,"github":"https://github.com/sunary/sqlize","clone":"git clone https://github.com/sunary/sqlize.git","description":"powerful SQL toolkit; offering parsing, building, and migration capabilities.","language":"Go","stars":125,"topics":["sql-migration","arvo-schema","mysql","migration","postgresql","sqlite","mermaidjs"],"license":null,"category":"databases-storage","readme_excerpt":"SQLize English 中文 Purpose SQLize generates database migrations by comparing two schema sources: your Go structs (desired state) and your existing migrations (current state). Instead of writing migration SQL by hand, you define models in Go and SQLize produces the ALTER TABLE , CREATE TABLE , and related statements needed to bring your database up to date. What problem does it solve? - Manual migrations are error-prone — Easy to forget columns, indexes, or foreign keys when writing ALTER TABLE by hand - Schema drift — Go models and the database can get out of sync over time - Boilerplate — Repetitive work creating up/down migrations for every schema change How it works 1. Desired state — Load schema from your Go structs (via FromObjects ) 2. Current state — Load schema from your migration folder (via FromMigrationFolder ) 3. Diff — SQLize compares them and computes the changes 4. Output — Get migration SQL ( StringUp / StringDown ) or write files directly ( WriteFilesWithVersion ) Features - Multi-database : MySQL, PostgreSQL, SQLite, SQL Server - ORM-friendly : Works with struct tags ( sql , gorm ), compatible with golang-migrate/migrate - Schema export : Avro Schema (MySQL), ERD diagrams (MermaidJS) Installation Quick Start Conventions Default Behaviors - Database: mysql (use sqlize.WithPostgresql() , sqlize.WithSqlite() , etc.) - SQL syntax: Uppercase (use sqlize.WithSqlLowercase() for lowercase) - Table naming: Singular (use sqlize.WithPluralTableName() for plural) - Comme","default_branch":null,"files":null,"tree":[],"storefront":"/r/sunary","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/sunary/sqlize/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}