{"id":35038941,"url":"https://github.com/formal-php/migrations","last_synced_at":"2026-05-20T22:03:49.947Z","repository":{"id":257809959,"uuid":"864830241","full_name":"formal-php/migrations","owner":"formal-php","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-28T10:41:40.000Z","size":1449,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2025-10-20T20:15:16.916Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://formal-php.github.io/migrations/","language":"PHP","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/formal-php.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2024-09-29T09:26:22.000Z","updated_at":"2025-02-28T10:19:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"0fdd69d5-c236-4341-b5ad-c78997ed525f","html_url":"https://github.com/formal-php/migrations","commit_stats":null,"previous_names":["formal-php/migrations"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/formal-php/migrations","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/formal-php%2Fmigrations","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/formal-php%2Fmigrations/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/formal-php%2Fmigrations/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/formal-php%2Fmigrations/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/formal-php","download_url":"https://codeload.github.com/formal-php/migrations/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/formal-php%2Fmigrations/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28075840,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-27T02:00:05.897Z","response_time":58,"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":[],"created_at":"2025-12-27T08:08:59.104Z","updated_at":"2026-05-20T22:03:49.939Z","avatar_url":"https://github.com/formal-php.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# migrations\n\n[![CI](https://github.com/formal-php/migrations/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/formal-php/migrations/actions/workflows/ci.yml)\n[![codecov](https://codecov.io/gh/formal-php/migrations/branch/develop/graph/badge.svg)](https://codecov.io/gh/formal-php/migrations)\n[![Type Coverage](https://shepherd.dev/github/formal-php/migrations/coverage.svg)](https://shepherd.dev/github/formal-php/migrations)\n\nThis library is a simple one way migration system.\n\nYou can run both SQL and Commands migrations.\n\n## Installation\n\n```sh\ncomposer require formal/migrations\n```\n\n## Usage\n\n```php\nuse Formal\\Migrations\\{\n    Factory,\n    Failure,\n}\nuse Innmind\\OperatingSystem\\Factory as OS;\nuse Innmind\\Url\\{\n    Url,\n    Path,\n};\n\n$dsn = Url::of('mysql://user:pwd@127.0.0.1:3306/database');\n\nFactory::of(OS::build())\n    -\u003estoreVersionsInDatabase($dsn)\n    -\u003eunwrap()\n    -\u003esql()\n    -\u003efiles(Path::of('migrations/folder/'))\n    -\u003emigrate($dsn)\n    -\u003ematch(\n        static fn() =\u003e print('Everything has been migrated'),\n        static fn(Failure $failure) =\u003e printf(\n            'Migrations failed with the message : %s',\n            $failure-\u003eerror()-\u003egetMessage(),\n        ),\n    );\n```\n\n## Documentation\n\nFull documentation available [here](https://formal-php.github.io/migrations/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fformal-php%2Fmigrations","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fformal-php%2Fmigrations","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fformal-php%2Fmigrations/lists"}