{"repo":"alexisvisco/amigo","free":true,"listed":false,"github":"https://github.com/alexisvisco/amigo","clone":"git clone https://github.com/alexisvisco/amigo.git","description":"A database migration tool in Go language, supporting go and sql. 0 dependencies.","language":"Go","stars":33,"topics":["golang","golang-library","migrations","postgresql","sql","go-migration"],"license":null,"category":"databases-storage","readme_excerpt":"Amigo - Go SQL Migration Tool A simple, powerful SQL migration tool for Go with support for both SQL and Go migrations. Amigo provides a clean API for managing database migrations with built-in CLI support and programmatic access. Write migrations in SQL or Go, control transactions, and get real-time feedback during execution. Features - SQL and Go migrations - Write migrations in SQL files or Go code - Embedded migrations - SQL files are embedded in binary via embed.FS for portability - Transaction control - Fine-grained control over transaction behavior - Multiple database support - PostgreSQL, SQLite, ClickHouse drivers included - CLI tool - Built-in CLI for managing migrations - Programmatic API - Use migrations directly in your Go code - Standard library only - No external dependencies Installation Quick Start 1. Setup your project structure Create the following structure: 2. Create your migration CLI Create cmd/migrate/main.go : Create migrations/migrations.go : Note : SQL migrations are embedded using embed.FS , making your migration binary portable with no external SQL files needed. 3. Generate your first migration This creates migrations/20240101120000 create users table.sql : And automatically updates migrations/migrations.go : The //go:embed .sql directive embeds all SQL files into the binary, and SQLFileToMigration takes the embedded filesystem as its first argument. 4. Run migrations 5. (Optional) Build the migration binary CLI Commands generate - Create a new mi","default_branch":null,"files":null,"tree":[],"storefront":"/r/alexisvisco","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/alexisvisco/amigo/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."}