{"id":23062459,"url":"https://github.com/aymdev/fregatabundle","last_synced_at":"2025-04-03T07:27:09.508Z","repository":{"id":57680729,"uuid":"368324715","full_name":"AymDev/FregataBundle","owner":"AymDev","description":"Symfony bundle for Fregata migration framework. Run migrations asynchronously with Messenger.","archived":false,"fork":false,"pushed_at":"2022-05-24T12:36:10.000Z","size":285,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-08T21:16:32.762Z","etag":null,"topics":[],"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/AymDev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2021-05-17T21:20:15.000Z","updated_at":"2022-05-29T01:11:40.000Z","dependencies_parsed_at":"2022-09-01T14:52:18.041Z","dependency_job_id":null,"html_url":"https://github.com/AymDev/FregataBundle","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AymDev%2FFregataBundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AymDev%2FFregataBundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AymDev%2FFregataBundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AymDev%2FFregataBundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AymDev","download_url":"https://codeload.github.com/AymDev/FregataBundle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246955175,"owners_count":20860222,"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","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":"2024-12-16T03:27:07.013Z","updated_at":"2025-04-03T07:27:09.489Z","avatar_url":"https://github.com/AymDev.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fregata Bundle\n\n**Symfony** bundle for the [Fregata](https://github.com/AymDev/Fregata) data migration framework. Provides an UI and\nexecutes migrations asynchronously using the **Messenger** component.\n\n![Testing](https://github.com/AymDev/FregataBundle/workflows/Testing/badge.svg)\n![Coding Standards](https://github.com/AymDev/FregataBundle/workflows/Coding%20Standards/badge.svg)\n![Bundle installation](https://github.com/AymDev/FregataBundle/workflows/Bundle%20installation/badge.svg)\n[![Latest Stable Version](https://poser.pugx.org/aymdev/fregata-bundle/v)](//packagist.org/packages/aymdev/fregata-bundle)\n[![License](https://poser.pugx.org/aymdev/fregata-bundle/license)](//packagist.org/packages/aymdev/fregata-bundle)\n\n**Documentation**:\n\n1. [Requirements](#requirements)\n2. [Installation](#installation)\n   1. [Doctrine entities](#doctrine-entities)\n   2. [Messenger transport](#messenger-transport)\n   3. [User interface](#user-interface)\n3. [User interface overview](#user-interface-overview)\n   1. [Main pages](#main-pages)\n   2. [Run list](#run-list)\n   3. [Run details](#run-details)\n4. [Starting a migration](#starting-a-migration)\n\n## Requirements\nThis bundle requires **PHP \u003e= 8.1** and a **Symfony 4.4** or **5** application. \nNote that as it uses a database, it will install the **Doctrine** bundle.\n\nIf you are not familiar with **Fregata**'s features, make sure to read its [documentation](https://github.com/AymDev/Fregata).\n\n## Installation\nInstall with **Composer**:\n```shell\ncomposer require aymdev/fregata-bundle\n```\n\n### Doctrine entities \nThen you will need to create the database tables for the provided entities (3 entities + a *ManyToMany* relation). You \ncan do this how you want.\n\u003e**Suggestion:** My preferred way to use database migrations is by using the \n\u003e [MakerBundle](https://symfony.com/doc/current/bundles/SymfonyMakerBundle/index.html) and its `make:migration` command \n\u003e followed by **Doctrine**'s `doctrine:migrations:migrate` command.\n\n### Messenger transport\nAs the main work of the bundle happens in *Messenger* components, you need to *route* the provided **messages** to a \n**transport** of your choice.\nExample **config/packages/messenger.yaml**:\n```yaml\nframework:\n    messenger:\n        transports:\n            # You are entirely responsible for the transport configuration\n            async: '%env(MESSENGER_TRANSPORT_DSN)%'\n\n        routing:\n            # Every message implements the following interface, nothing more is needed\n            'Fregata\\FregataBundle\\Messenger\\FregataMessageInterface': async\n```\n\n### User interface\nTo enable the user interface, import the routes by creating a **config/routes/fregata.yaml** file:\n```yaml\nfregata:\n    resource: \"@FregataBundle/Resources/config/routes.xml\"\n    prefix: /fregata\n```\n\u003eChange the `prefix` to anything you want, or remove it if you want to set the Fregata dashboard at the root of your app.\n\nYou can then reach the dashboard at `/fregata`.\n\n## User interface overview\n\n### Main pages\nThe **dashboard** lists the current migration runs, or the last one if nothing is running.\nThe **migrations** page lists the currently configured migrations with a link to a dedicated page to get a quick\noverview with the list of components and the run history of a specific migration.\nThe complete **run history** is on a separated page.\n![](./docs/images/history.png)\n\n### Run list\nThe table shown here is used in multiple pages of the user interface and contains:\n\n - the id of the migration run\n - the name of the migration with a link to the **details page**\n - the **status** tag\n - the time stats: start time, end time and duration\n - the number of components\n - a link to the **run details**\n\n### Run details\nThe same informations can be found on the **run details**:\n![](./docs/images/migration_run.png)\nA cancel button is shown in the top right corner as long as the migration is running.\nThe run is divided on 3 steps with tabs:\n\n - Before tasks\n - Migrators\n - After tasks\n\nEach tab shows a progress bar and its associated components. The migrators are sorted according to their dependencies\nfrom left to right.\n\n\n## Starting a migration\n\nYou can start a migration from the user interface by clicking the *\"New run\"* button in the menu.\nAlternatively, the `fregata:migration:execute` console command is available:\n```shell\nphp ./bin/console fregata:migration:execute\n```\nYou should then see the run on the user interface.\n\nIf you want to run a migration as in the **Fregata** framework, without Messenger, you can add the `--synchronous` option.\n\u003e**Warning**: by doing so, the migration runs in the foreground, doesn't use the database and can't show on the UI.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faymdev%2Ffregatabundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faymdev%2Ffregatabundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faymdev%2Ffregatabundle/lists"}