{"id":13396679,"url":"https://github.com/bmlt-enabled/lettuce","last_synced_at":"2026-06-25T17:30:56.860Z","repository":{"id":70772421,"uuid":"126571374","full_name":"bmlt-enabled/lettuce","owner":"bmlt-enabled","description":"Can lettuce merge one BMLT root into another.","archived":false,"fork":false,"pushed_at":"2024-12-16T17:41:24.000Z","size":36,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-12-04T06:34:43.674Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/bmlt-enabled.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2018-03-24T06:09:45.000Z","updated_at":"2024-12-16T17:41:29.000Z","dependencies_parsed_at":"2023-05-11T22:30:51.301Z","dependency_job_id":null,"html_url":"https://github.com/bmlt-enabled/lettuce","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bmlt-enabled/lettuce","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmlt-enabled%2Flettuce","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmlt-enabled%2Flettuce/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmlt-enabled%2Flettuce/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmlt-enabled%2Flettuce/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bmlt-enabled","download_url":"https://codeload.github.com/bmlt-enabled/lettuce/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmlt-enabled%2Flettuce/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34786225,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-25T02:00:05.521Z","response_time":101,"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":"2024-07-30T18:00:59.929Z","updated_at":"2026-06-25T17:30:56.839Z","avatar_url":"https://github.com/bmlt-enabled.png","language":"PHP","funding_links":[],"categories":["BMLT (Basic Meeting List Toolbox)"],"sub_categories":[],"readme":"# lettuce\n\n### Important Information\n\n1. Think about your desired service body tree.  If collapsing into a zone, make those changes ahead of time on the target.\n2. Always take backups.\n3. There might some additional actions to take of, look at the console messages.\n4. If you have some custom fields, you will need to add them in the target database first before exporting the dump.\n5. Once you are done with your exported merged results, open the .sql file and rename `na_` to something else.  This will allow you to have side-by-side migration capabilities.   You can then modify the `auto-config.inc.php` file setting `$dbPrefix` and swap in the new prefix when you are ready.  If you need to rollback you can then switch to the older one.\n\nMore about the database prefix: this is saved in the `$dbPrefix` variable defined in your `auto-config.inc.php` file.  The default is `na`.  If you are managing a zonal or other server that may have repeated merges, it's handy to use something like `sezf1`, `sezf2`, and so on.\n\nTo rename the prefix, you can do a search and replace in the .sql file, but be sure you are only using the prefix for table names and in keys, and not in some other part of the data. Best to include the `_` in the search/replace, e.g. `wszf5_`, to help with this. Alternatively, you can use sql commands like `ALTER TABLE wszf5_comdef_changes RENAME TO wszf6_comdef_changes;` to rename each of the tables. If you do that, you'll still need to replace a dozen occurrences of the prefix in table keys in the .sql file.\n\nTODO: replace the `$target_table_prefix` variable in `functions.php` with `$target_table_old_prefix` and `$target_table_new_prefix` to take care of this automatically.\n____\n\n### How to use Lettuce\n\n1. To get this going, stand up the database docker container and sample BMLT server for testing by running:\n\n`docker-compose up`\n\n2. Take a mysql dump from your source and target mysql dbs.\n\n3. Import the two dumps as two separate DBs on the docker container.\n\n4. Take a snapshot of the container, in case you need to restart this.\n\n`docker commit [container-id] [image:tag]`\n\n5. Fill in the variables in `functions.php`.\n\n6. Run `php bootstrap.php`, this will generate clean.php which will run each time you re-run `run.php`, in case you need to start over.\n\n7. Run `php run.php`.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbmlt-enabled%2Flettuce","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbmlt-enabled%2Flettuce","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbmlt-enabled%2Flettuce/lists"}