{"id":36583795,"url":"https://github.com/astrolink/pluto","last_synced_at":"2026-01-12T08:00:16.601Z","repository":{"id":62973678,"uuid":"508891784","full_name":"astrolink/pluto","owner":"astrolink","description":"♇ This tool will help you better control a non-versioned database project.","archived":false,"fork":false,"pushed_at":"2025-12-04T17:46:55.000Z","size":2589,"stargazers_count":4,"open_issues_count":4,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-01-12T05:45:55.757Z","etag":null,"topics":["database","go","golang","migrations","utils"],"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/astrolink.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","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":"2022-06-30T01:12:24.000Z","updated_at":"2025-12-04T17:46:59.000Z","dependencies_parsed_at":"2023-12-20T09:06:10.471Z","dependency_job_id":"8513e4c7-9e88-4ae9-9d52-8092caaea1e3","html_url":"https://github.com/astrolink/pluto","commit_stats":{"total_commits":201,"total_committers":4,"mean_commits":50.25,"dds":0.04975124378109452,"last_synced_commit":"94ece67c61e2666aa5d3d7cf7f53f19ac284fa94"},"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"purl":"pkg:github/astrolink/pluto","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astrolink%2Fpluto","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astrolink%2Fpluto/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astrolink%2Fpluto/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astrolink%2Fpluto/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/astrolink","download_url":"https://codeload.github.com/astrolink/pluto/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astrolink%2Fpluto/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28336957,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T06:09:07.588Z","status":"ssl_error","status_checked_at":"2026-01-12T06:05:18.301Z","response_time":98,"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":["database","go","golang","migrations","utils"],"created_at":"2026-01-12T08:00:13.500Z","updated_at":"2026-01-12T08:00:16.510Z","avatar_url":"https://github.com/astrolink.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n   \u003cimg src=\"https://raw.githubusercontent.com/astrolink/pluto/main/docs/images/astrolink-gopher-compress.png\" /\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n   \u003cb\u003ePluto\u003c/b\u003e ♇ This tool will help you better control a non-versioned database project.\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\n   \u003ca href=\"https://github.com/astrolink/pluto/releases\"\u003e\n      \u003cimg alt=\"Releases\" src=\"https://img.shields.io/github/release/astrolink/pluto.svg?style=flat-square\u0026include_prereleases\" /\u003e\n   \u003c/a\u003e\n\n   \u003ca href=\"https://github.com/astrolink/pluto/releases\"\u003e\n      \u003cimg alt=\"All Releases\" src=\"https://img.shields.io/github/downloads/astrolink/pluto/total.svg?style=flat-square\" /\u003e\n   \u003c/a\u003e\n\n   \u003ca href=\"https://github.com/astrolink/pluto/commits\"\u003e\n      \u003cimg alt=\"Last commit\" src=\"https://img.shields.io/github/last-commit/astrolink/pluto.svg?style=flat-square\" /\u003e\n   \u003c/a\u003e\n\n   \u003cimg src=\"https://img.shields.io/github/go-mod/go-version/astrolink/pluto?style=flat-square\"\u003e\n\n   \u003ca href=\"https://goreportcard.com/report/github.com/astrolink/pluto\"\u003e\n      \u003cimg alt=\"Go Report\" src=\"https://goreportcard.com/badge/github.com/astrolink/pluto\" /\u003e\n   \u003c/a\u003e\n\n  \u003ca href=\"https://github.com/astrolink/pluto/actions?query=workflow%3A%22Go+Build%22++branch%3Amain\"\u003e\n    \u003cimg alt=\"Go Build\" src=\"https://github.com/astrolink/pluto/actions/workflows/go-build.yml/badge.svg\"\u003e\n  \u003c/a\u003e\n\n   \u003cbr /\u003e\n\u003c/p\u003e\n\nEnglish | [Português](docs/README_PT_BR.md)\n\n## 📖 Introduction:\n\nPluto is a dwarf planet and it represents transformation, change and reform.\nAnd our pluto helps the project that doesn't have database versioning to organize itself and be able to count on this very important resource these days.\n\nThanks [Laravel](https://github.com/laravel/laravel) our migrations project was inspired by how it handles this.\n\n## 🚀 Features:\n\n- Supports several types of databases: MySQL and PostgreSQL(Implemented);\n- The executable file is less than 20mb in size;\n- Supports Linux and Mac OS;\n- Multi Projects, you can have several projects connecting to the same database, and sharing migrations;\n- Uses XML as input language, being less bureaucratic and accepting very large sql statements\n\n## 🧰 How to install\n\nDownload the latest installation package\n\n### Install on OSX\n\n```bash\ncurl -L -o pluto https://github.com/astrolink/pluto/releases/download/v0.1.19/pluto-osx\nsudo chmod +x pluto\nsudo mv pluto /usr/local/bin/pluto\n```\n\nor\n\n### Install on Linux\n\n```bash\ncurl -L -o pluto https://github.com/astrolink/pluto/releases/download/v0.1.19/pluto-linux\nsudo chmod +x pluto\nsudo mv pluto /usr/local/bin/pluto\n```\n\n#### Check install\n\nTo check pluto is properly installed use\n\n```bash\npluto version\n```\n\n## 🏃 Using\n\n**_You must be at the root of the project_**\n\n```bash\npluto init\n```\n\nIt will create a file called pluto.yml and the migrations folder with an example\n\nWhat the file created by pluto will look like:\n\n```yml\nmysql:\n  host: \"127.0.0.1\"\n  port: 3306\n  database: \"api\"\n  username: \"root\"\n  password: \"secret\"\n\nlog: \"mysql\"\nsource: \"api\" // What is the data source for that migration\n```\n\nChecks if the connection file has been set up correctly\n\n```sh\npluto test\n```\n\nAfter that we can run pluto\n\n```sh\npluto run\n```\n\nWith the pluto.yml file configured with the database data\nWhen running run, all migrations that have not yet run will be executed\n\n```sh\npluto rollback step=-1\n```\n\nIf it is necessary to go back some step, you can run the rollback and the opposite instruction will be run.\n\n```sh\npluto make create_users_table\n```\n\nTo create a new migration run the make command with the name that the migration will have\nit is suggested to keep the naming standard.\n\n```sh\npluto restart\n```\n\nReset the pluto table in the database be careful when running\n\n### How to use\n\n\u003cp align=\"center\"\u003e\n\n   \u003ca href=\"https://github.com/astrolink/pluto\"\u003e\n      \u003cimg alt=\"Releases\" src=\"https://raw.githubusercontent.com/astrolink/pluto/main/docs/images/how-to-use-pluto.gif\" /\u003e\n   \u003c/a\u003e\n\u003c/p\u003e\n\n## 💻 Migration file\n\n**The migration file has four fields**\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n\u003cpluto\u003e\n    \u003cdatabase\u003e\n        mysql\n    \u003c/database\u003e\n    \u003crun\u003e\n        CREATE TABLE users (name VARCHAR(20),email VARCHAR(20),created_at DATE);\n    \u003c/run\u003e\n    \u003crollback\u003e\n        DROP TABLE users;\n    \u003c/rollback\u003e\n    \u003cauthor\u003e\n        John Doe - john.doe@example.com\n    \u003c/author\u003e\n    \u003cdescription\u003e\n        PLUTO - User table created\n    \u003c/description\u003e\n\u003c/pluto\u003e\n```\n\nThe XML file must be around the pluto structure this field and all others are mandatory.\n\n**Database**: is which connection it will use from pluto.yml (Possible mysql and postgre)\n\n**Run**: SQL statement that will be run for the next step\n\n**Rollback**: SQL statement that will be run on rollback\n\n**Author**: Who created the SQL statement (Optional)\n\n**Description**: Description of what is done in that migration will be saved in the database\n\n### Dealing with large volumes\n\nIf you have a massive volume of data, try using `CDATA` tag to organize and scape your query string. Like this:\n\n```xml\n\u003c![CDATA[ \u003cinsert_query_here\u003e ]]\u003e\n```\n\n## 📚 Documentation (in progress)\n\nFull documentation is available on the website: https://astrolink.github.io/pluto\n\n## 🖥️ Database\n\nA **pluto_logs** table will be created in the database where you can check what was or was not run and what is the origin of that migration\n\n## 🔥 How to use pluto inside another project in Go\n\nFirst download the project as a package\n\n```bash\ngo get -v github.com/astrolink/pluto@v0.1.19\ngo mod vendor\n```\n\nIf you want to run the migrations from a point, use\n\n```go\npackage main\n\nimport (\n\t\"github.com/astrolink/pluto/general/pluto\"\n)\n\nfunc main() {\n\tpluto.RunMigrations()\n}\n```\n\nIf you want to run the rollback\n\n```go\npackage main\n\nimport (\n\t\"github.com/astrolink/pluto/general/pluto\"\n)\n\nfunc main() {\n\tpluto.RunRollback()\n}\n```\n\nThat way you can launch go from within your project and package it together.\n\nRemembering that even in this mode you need to have the migrations folder and the pluto.yaml file\n\n## 🏠 How to test location\n\nFork or download the source code\n\nUse Golang 1.19+\n\nand run the following commands\n\n```bash\ngo mod tidy\n\n// osx\ngo build -x\nfile pluto\nmv pluto pluto-osx\n\n// linux\nGOOS=linux GOARCH=amd64 go build -x\nfile pluto\nmv pluto pluto-linux\n\n// install on OSX to test\nmv pluto pluto-osx /usr/local/bin/pluto\n```\n\n## ⚡ How to generate a new release\n\nThe project uses git flow, so do the following:\n\n```bash\ngit flow release start v0.1.x\ngit flow release finish 'v0.1.x'\ngit push origin v0.1.x\n```\n\n## 🖊️ To Do\n\n- [ ] PostgreSQL\n- [ ] Improve error handling\n- [ ] 100% code coverage with testing\n- [ ] More useful health check commands\n\n## 🏗️ Contributing (in progress)\n\nThank you for your interest in contributing! Please refer to [CONTRIBUTING.md](CONTRIBUTING.md)\n\n## 👋 Contributors\n\nMany thanks to everyone who helped:\n\n[![Contributors](http://contributors.nn.ci/api?repo=astrolink/pluto)](https://github.com/astrolink/pluto/graphs/contributors)\n\n## 📄 License\n\nThe source code in `pluto` is available under the [MIT License](/LICENSE.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastrolink%2Fpluto","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fastrolink%2Fpluto","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastrolink%2Fpluto/lists"}