{"id":20955473,"url":"https://github.com/combodo/mysql-faked-dump","last_synced_at":"2026-04-29T02:02:50.714Z","repository":{"id":110137251,"uuid":"152430003","full_name":"Combodo/mysql-faked-dump","owner":"Combodo","description":null,"archived":false,"fork":false,"pushed_at":"2020-03-31T07:15:57.000Z","size":47,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-12-31T18:08:12.697Z","etag":null,"topics":["combodo-tools"],"latest_commit_sha":null,"homepage":null,"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/Combodo.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-10-10T13:40:44.000Z","updated_at":"2020-03-10T11:03:37.000Z","dependencies_parsed_at":"2023-03-13T13:58:06.597Z","dependency_job_id":null,"html_url":"https://github.com/Combodo/mysql-faked-dump","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Combodo/mysql-faked-dump","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Combodo%2Fmysql-faked-dump","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Combodo%2Fmysql-faked-dump/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Combodo%2Fmysql-faked-dump/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Combodo%2Fmysql-faked-dump/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Combodo","download_url":"https://codeload.github.com/Combodo/mysql-faked-dump/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Combodo%2Fmysql-faked-dump/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32407176,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T19:38:08.556Z","status":"online","status_checked_at":"2026-04-29T02:00:06.602Z","response_time":110,"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":["combodo-tools"],"created_at":"2024-11-19T01:19:24.803Z","updated_at":"2026-04-29T02:02:50.673Z","avatar_url":"https://github.com/Combodo.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mysql faked dump *ALPHA*\nCreate censored dump with a finger snap!\n\n:no_entry_sign: *This tool is an alpha version and should not be used.*\n\n## prerequisites\nIn order to install the dependencies, you need `composer`, and as this tool relies on symfony 4, you'll need at least `php 7.1`.\n\n## installation\n\n```bash\ncomposer install\n```\n\n## usage\n\nJust call `bin/console mysql-faked:dump` with one parameter: the path to a valid config file.\nIt will output the dump on the stdout.\nThe dump progress is output on the stderr.\n\nyou can store the dump by redirecting stdout to a file:\n```bash\nbin/console mysql-faked:dump path/to/file.yaml \u003e ~/Desktop/dump.sql\n```\n\nor directly execute it : \n```bash\nbin/console mysql-faked:dump path/to/file.yaml | mysql --host=remote_host -C db_name\n```\n\nthis command accept two options :\n - skip-drop-table\n - skip-create-table\n \n\n## configuration\nThe configuration is written in yaml, it has three main entries.\n\n##### example: \n```yaml\ndata_source:\n  dsn: 'mysql:dbname=foo;host=localhost;port=3600'\n  user: 'root'\n  password: ~\n  options: []\noptions:\n  exclude_missing_tables: false\ntables:\n  fos_user:\n    preserve_filter:\n      preserve: \"email like '%@combodo.com' or id=1\"\n      reverse: \"(email not like '%@combodo.com' or email is null) and id!=1\"\n    columns:\n      email:\n        faker: unique.email\n        alias: [email_canonical]\n      last_name:\n        faker: lastName\n      company:\n        faker: company\n      password:\n        empty: true\n  oauth_*:\n    pattern: \"oauth_.*\"\n    exclude: true\n```\n\n##### data_source: \nThis part describes how to connect to mysql.\nsee  [PDO::__construct] in order to see how to configure it more deeply\n\n##### options: \nfor now only one option exists:\n\n - `exclude_missing_tables`: whether non mapped table should be dumped or ignored. \n\n\n##### tables\nThis entry lets you configure special cases:\n - ignore tables: `exclude: true`\n - special values for columns\n   - empty value: `empty: true`\n   - fake value : `faker: company`\n - preserve some rows from being faked `preserve_filter` \n   - in this case, you need to provide both the `preserve` and the `reverse` filter. They will be applied as SQL WHERE clauses.\n \n\nNB : fake values are generated by using the [Faker] library, so you can use every formatter provided, or even write your own.\nBehind the scene, [Symfony's property accessor] is used, so you can easily create complex calls (ie for calling `$faker-\u003eunique-\u003eemail()` just type `unique.email` in order to obtain guaranteed unique email)\n\n   \n###### pattern  \nIf you want to map many tables within one configuration entry, use an impossible to match table name  (ie: `oauth_*`) and configure a pattern (ie `pattern: \"oauth_.*\"`).\n \n###### alias \nFaker will give you a different result on each call, so if you want many columns to share the same value, configure an alias (ie: `alias: [table2, table3]`).   \n\n\n[PDO::__construct]: http://php.net/manual/fr/pdo.construct.php\n[Faker]: https://github.com/fzaninotto/Faker#formatters\n[Symfony's property accessor]: https://symfony.com/doc/current/components/property_access.html#reading-from-objects\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcombodo%2Fmysql-faked-dump","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcombodo%2Fmysql-faked-dump","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcombodo%2Fmysql-faked-dump/lists"}