{"id":18376430,"url":"https://github.com/cycle/schema-migrations-generator","last_synced_at":"2025-10-06T00:50:38.138Z","repository":{"id":37611852,"uuid":"394912260","full_name":"cycle/schema-migrations-generator","owner":"cycle","description":"Migrations generator","archived":false,"fork":false,"pushed_at":"2024-12-23T11:28:50.000Z","size":121,"stargazers_count":3,"open_issues_count":2,"forks_count":4,"subscribers_count":3,"default_branch":"2.x","last_synced_at":"2025-09-23T11:54:47.393Z","etag":null,"topics":["database-migrations","hacktoberfest"],"latest_commit_sha":null,"homepage":null,"language":"PHP","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/cycle.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2021-08-11T08:04:33.000Z","updated_at":"2025-05-27T05:46:53.000Z","dependencies_parsed_at":"2023-11-02T10:30:05.047Z","dependency_job_id":null,"html_url":"https://github.com/cycle/schema-migrations-generator","commit_stats":{"total_commits":62,"total_committers":9,"mean_commits":6.888888888888889,"dds":0.5806451612903225,"last_synced_commit":"92781750378c6e95ff4083d068292385292771c9"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/cycle/schema-migrations-generator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cycle%2Fschema-migrations-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cycle%2Fschema-migrations-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cycle%2Fschema-migrations-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cycle%2Fschema-migrations-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cycle","download_url":"https://codeload.github.com/cycle/schema-migrations-generator/tar.gz/refs/heads/2.x","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cycle%2Fschema-migrations-generator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278542676,"owners_count":26004061,"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-10-05T02:00:06.059Z","response_time":54,"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-migrations","hacktoberfest"],"created_at":"2024-11-06T00:23:18.361Z","updated_at":"2025-10-06T00:50:38.121Z","avatar_url":"https://github.com/cycle.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cycle ORM - Migration Generator\n\n[![Latest Stable Version](https://poser.pugx.org/cycle/schema-migrations-generator/version)](https://packagist.org/packages/cycle/schema-migrations-generator)\n[![Build Status](https://github.com/cycle/schema-migrations-generator/workflows/build/badge.svg)](https://github.com/cycle/schema-migrations-generator/actions)\n[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/cycle/schema-migrations-generator/badges/quality-score.png?b=2.x)](https://scrutinizer-ci.com/g/cycle/schema-migrations-generator/?branch=2.x)\n[![Codecov](https://codecov.io/gh/cycle/schema-migrations-generator/graph/badge.svg)](https://codecov.io/gh/cycle/schema-migrations-generator)\n\nBy migration generator package you can automatically generate a set of migration files for Cycle ORM during schema\ncompilation. In this case, you have the freedom to alter such migrations manually before running them.\n\n## Installation\n\n```bash\ncomposer require cycle/schema-migrations-generator\n```\n\n## Configuration\n\n```php\nuse Cycle\\Migrations;\nuse Cycle\\Schema\\Registry;\nuse Cycle\\Schema\\Definition\\Entity;\nuse Cycle\\Database;\nuse Cycle\\Database\\Config;\nuse Cycle\\Schema\\Generator\\Migrations\\GenerateMigrations;\n\n$dbal = new Database\\DatabaseManager(new Config\\DatabaseConfig([\n    'default' =\u003e 'default',\n    'databases' =\u003e [\n        'default' =\u003e [\n            'connection' =\u003e 'sqlite'\n        ]\n    ],\n    'connections' =\u003e [\n        'sqlite' =\u003e new Config\\SQLiteDriverConfig(\n            connection: new Config\\SQLite\\MemoryConnectionConfig(),\n            queryCache: true,\n        ),\n    ]\n]));\n\n$migrator = new Migrations\\Migrator(\n    $config, \n    $dbal, \n    new Migrations\\FileRepository($config)\n);\n\n$registry = new Registry($dbal);\n$registry-\u003eregister(....);\n\n$generator = new GenerateMigrations(\n    $migrator-\u003egetRepository(), \n    $migrator-\u003egetConfig()\n);\n```\n\n## Running\n\nMigration generator creates set of migrations needed to sync database schema with desired state. Each database will\nreceive its own migration.\n\n```php\n$generator-\u003erun($registry);\n```\n\n## License:\n\nThe MIT License (MIT). Please see [`LICENSE`](./LICENSE) for more information. Maintained\nby [Spiral Scout](https://spiralscout.com).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcycle%2Fschema-migrations-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcycle%2Fschema-migrations-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcycle%2Fschema-migrations-generator/lists"}