{"id":21965580,"url":"https://github.com/h44z/lightmigrate","last_synced_at":"2026-04-06T08:02:05.229Z","repository":{"id":57650345,"uuid":"447648491","full_name":"h44z/lightmigrate","owner":"h44z","description":"Lightweight database migragtion library for Golang","archived":false,"fork":false,"pushed_at":"2022-09-22T21:19:52.000Z","size":27,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-22T21:35:41.195Z","etag":null,"topics":["database","golang","library","migration"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/h44z.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-01-13T15:21:42.000Z","updated_at":"2022-01-14T15:17:33.000Z","dependencies_parsed_at":"2022-09-10T19:22:41.944Z","dependency_job_id":null,"html_url":"https://github.com/h44z/lightmigrate","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/h44z/lightmigrate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/h44z%2Flightmigrate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/h44z%2Flightmigrate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/h44z%2Flightmigrate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/h44z%2Flightmigrate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/h44z","download_url":"https://codeload.github.com/h44z/lightmigrate/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/h44z%2Flightmigrate/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31464114,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-05T21:22:52.476Z","status":"online","status_checked_at":"2026-04-06T02:00:07.287Z","response_time":112,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["database","golang","library","migration"],"created_at":"2024-11-29T12:48:30.871Z","updated_at":"2026-04-06T08:02:05.210Z","avatar_url":"https://github.com/h44z.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LightMigrate - a lightweight database migration library\n\n[![codecov](https://codecov.io/gh/h44z/lightmigrate/branch/master/graph/badge.svg?token=MMAOVBLL2U)](https://codecov.io/gh/h44z/lightmigrate)\n[![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](https://opensource.org/licenses/MIT)\n[![GoDoc](https://pkg.go.dev/badge/github.com/h44z/lightmigrate)](https://pkg.go.dev/github.com/h44z/lightmigrate)\n![GitHub last commit](https://img.shields.io/github/last-commit/h44z/lightmigrate)\n[![Go Report Card](https://goreportcard.com/badge/github.com/h44z/lightmigrate)](https://goreportcard.com/report/github.com/h44z/lightmigrate)\n![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/h44z/lightmigrate)\n![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/h44z/lightmigrate)\n[![GitHub Release](https://img.shields.io/github/release/h44z/lightmigrate.svg)](https://github.com/h44z/lightmigrate/releases)\n\nThis library is heavily inspired by [golang-migrate](https://github.com/golang-migrate/migrate).\n\nIt currently lacks support for many database drivers and the CLI feature, this is still WIP. \n\nBut it is completely restructured to minimize the dependency footprint.\n\n## Currently Supported databases\n - [MongoDB](https://github.com/h44z/lightmigrate-mongodb) \n - [MySQL / MariaDB](https://github.com/h44z/lightmigrate-mysql) \n - [sqlite3](https://github.com/h44z/lightmigrate-sqlite) \n\n## Usage example:\n\n```go\nfsys := os.DirFS(\"/app/data\") // Migration File Source Root (/app/data/migration-files)\n\nsource, err := NewFsSource(fsys, \"migration-files\")\nif err != nil {\n    t.Fatalf(\"unable to setup source: %v\", err)\n}\ndefer source.Close()\n\ndriver, err := test.NewMockDriver() // Database Driver (for example mongodb.NewDriver() or mysql.NewDriver())\nif err != nil {\n    t.Fatalf(\"unable to setup driver: %v\", err)\n}\ndefer driver.Close()\n\nmigrator, err := NewMigrator(source, driver, WithVerboseLogging(true)) // The migrator instance\nif err != nil {\n    t.Fatalf(\"unable to setup migrator: %v\", err)\n}\n\nerr = migrator.Migrate(3) // Migrate to schema version 3\nif err != nil {\n    t.Fatalf(\"migration error: %v\", err)\n}\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fh44z%2Flightmigrate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fh44z%2Flightmigrate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fh44z%2Flightmigrate/lists"}