{"id":20313921,"url":"https://github.com/craftcms/plugin-port-helper","last_synced_at":"2026-05-14T05:35:35.828Z","repository":{"id":66282963,"uuid":"92513306","full_name":"craftcms/plugin-port-helper","owner":"craftcms","description":"Plugin port helper for porting plugins from Craft 2 to Craft 3.","archived":false,"fork":false,"pushed_at":"2021-07-23T18:51:33.000Z","size":9,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-04T08:44:11.568Z","etag":null,"topics":["craft3","craftcms"],"latest_commit_sha":null,"homepage":"","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/craftcms.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":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-05-26T13:29:14.000Z","updated_at":"2023-10-22T23:55:46.000Z","dependencies_parsed_at":"2023-03-13T20:30:09.718Z","dependency_job_id":null,"html_url":"https://github.com/craftcms/plugin-port-helper","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/craftcms/plugin-port-helper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/craftcms%2Fplugin-port-helper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/craftcms%2Fplugin-port-helper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/craftcms%2Fplugin-port-helper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/craftcms%2Fplugin-port-helper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/craftcms","download_url":"https://codeload.github.com/craftcms/plugin-port-helper/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/craftcms%2Fplugin-port-helper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33012548,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"online","status_checked_at":"2026-05-14T02:00:06.663Z","response_time":57,"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":["craft3","craftcms"],"created_at":"2024-11-14T18:13:29.378Z","updated_at":"2026-05-14T05:35:35.823Z","avatar_url":"https://github.com/craftcms.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Plugin port helper\n------------------\n\nThis script helps porting plugins from Craft 2 to Craft 3 by generating the [Install migration](https://github.com/craftcms/docs/blob/master/en/plugin-migrations.md#install-migrations).\nThe script will generate all the code needed to create the tables, indexes and foreign keys as well as the code needed to remove them.\n\n## How to use this script\n\nRun it from commandline via the php interpreter against a Craft 2 project, that has the database tables created that you want to generate the migrations for. For example\n`php pluginPortHelper.php --tablePrefix=myplugin_ --namespace=craft\\\\myplugin --projectPath=/path/to/project \u003e migrations.php`\n\n### There are a few parameters you can set:\n- `tablePrefix` – Prefix to use to filter tables by. If you leave out the table prefix used by Craft in the project, the script will add it automatically.\n- `namespace` – Namespace that the plugin will use in Craft 3.\n- `projectPath` – Valid path to the craft folder in a Craft installation. Optional, if it's the current working directory.\n- `convertLocales` – If present, the helper will attempt to convert all of Craft 2 locale references in table schemas to Craft 3 Sites. This includes field names, indexes and foreign keys.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcraftcms%2Fplugin-port-helper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcraftcms%2Fplugin-port-helper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcraftcms%2Fplugin-port-helper/lists"}