{"id":46300418,"url":"https://github.com/yianandcode/blueprint","last_synced_at":"2026-03-04T11:04:04.562Z","repository":{"id":335458723,"uuid":"777311643","full_name":"YianAndCode/blueprint","owner":"YianAndCode","description":"A lightweight database migration CLI tool","archived":false,"fork":false,"pushed_at":"2026-01-30T08:59:30.000Z","size":44,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-31T00:35:25.096Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/YianAndCode.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-03-25T16:01:03.000Z","updated_at":"2026-01-30T08:59:33.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/YianAndCode/blueprint","commit_stats":null,"previous_names":["yianandcode/blueprint"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/YianAndCode/blueprint","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YianAndCode%2Fblueprint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YianAndCode%2Fblueprint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YianAndCode%2Fblueprint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YianAndCode%2Fblueprint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/YianAndCode","download_url":"https://codeload.github.com/YianAndCode/blueprint/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YianAndCode%2Fblueprint/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30078425,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T08:01:56.766Z","status":"ssl_error","status_checked_at":"2026-03-04T08:00:42.919Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2026-03-04T11:04:03.640Z","updated_at":"2026-03-04T11:04:04.555Z","avatar_url":"https://github.com/YianAndCode.png","language":"Go","readme":"# Blueprint\n\n![Blueprint](Blueprint.png)\n\nDocumentation | [中文文档](README_zh.md)\n\n## Introduction\n\nBlueprint is a lightweight database migration CLI tool written in Go, inspired by [Laravel Migrations](https://laravel.com/docs/master/migrations).\n\nIf you are an independent developer or a startup team, tools like Bytebase may feel a little heavy, but Blueprint will be your powerful assistant😎\n\n## Quick start\n\n### Install\nVisit the [release page](https://github.com/YianAndCode/blueprint/releases) and download the corresponding binary file.\n\nThen move the downloaded file to any directory included in the `PATH` environment variable (e.g., `/usr/local/bin/blueprint`), and run the following command:\n\n```bash\nblueprint help\n```\n\nIf the setup is successful, you will see the help message output.\n\n### Init a repo\n\nNavigate to your project migrations directory and run the following command:\n\n```bash\nblueprint init\n```\n\nAnd this directory will be initialized as a Blueprint repository for storing `.sql` files.\n\n### Create migration\n\n```bash\nblueprint create user\n# or specify table name later:\nblueprint create\n\n# and you can use update for a update migration:\nblueprint update\n```\n\nThe `create` command wille create a pair of `.sql` files suce as `202411181653_create_user.sql` and `202411181653_create_user_rollback.sql`, and you just need to edit these files for your migration.\n\nAnd `update` command is similar to `create`, the diffrence between them is just the `.sql` filename.\n\n### Run migration\n\n```bash\nblueprint\n# or\nblueprint run\n```\n\nBlueprint will executes all `.sql` files those not executed before, and these files will have same batch number.\n\n### Rollback migration\n\n```bash\n# to rollback the last batch of migrations, run the following command:\nblueprint rollback\n# or\nblueprint rollback --batch 1\n\n# or rollback the last step of migrations:\nblueprint rollback --step 1\n```\n\nYou can specify how many step(s) you need to rollback, one step means a `.sql` file.\n\nOr you can specify how many batch(es) you need to rollback, the `batch` is introduced at `Run migration`\n\nOnly one of `--step` or `--batch` can be specified at a time, default is `--batch 1`\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyianandcode%2Fblueprint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyianandcode%2Fblueprint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyianandcode%2Fblueprint/lists"}