{"id":18099503,"url":"https://github.com/hxtree/db-to-doctrine-entity","last_synced_at":"2026-07-15T22:31:32.010Z","repository":{"id":140650386,"uuid":"375501526","full_name":"hxtree/db-to-doctrine-entity","owner":"hxtree","description":"A simple project to generate Doctrine entities from an existing database.","archived":false,"fork":false,"pushed_at":"2021-06-09T22:13:50.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-28T08:36:05.252Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hxtree.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":"2021-06-09T22:10:43.000Z","updated_at":"2021-06-09T22:13:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"fc2d3c49-f2b2-44db-a72e-953eece03d5b","html_url":"https://github.com/hxtree/db-to-doctrine-entity","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hxtree/db-to-doctrine-entity","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hxtree%2Fdb-to-doctrine-entity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hxtree%2Fdb-to-doctrine-entity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hxtree%2Fdb-to-doctrine-entity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hxtree%2Fdb-to-doctrine-entity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hxtree","download_url":"https://codeload.github.com/hxtree/db-to-doctrine-entity/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hxtree%2Fdb-to-doctrine-entity/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35523582,"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-07-15T02:00:06.706Z","response_time":131,"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-10-31T21:09:31.818Z","updated_at":"2026-07-15T22:31:31.990Z","avatar_url":"https://github.com/hxtree.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DB To Doctrine Entity\n\nA simple project to generate Doctrine entities from an existing database.\n\n## Setup\nConfigure database connection information:\n```sql\nvim bootstrap.php\n```\n\nNext run Doctine bin file:\n```sql\nphp vendor/bin/doctrine  orm:convert-mapping -f --from-database annotation Entity/\n```\n\n## Debugging Tips:\nDoctrine may not support some table options used, such as ENUMs or bit. In which case it is important to add those table\nto exclude filter in bootstrap.php.\n```\n// exclude any tables here\n$conn-\u003egetConfiguration()-\u003esetFilterSchemaAssetsExpression('~^(?!TableName)~');\n```\n\nFind tables containing ENUM:\n\n```sql\nselect col.table_schema as database_name, col.table_name, col.ordinal_position as column_id, col.column_name, \n       col.data_type, trim(leading 'enum' from col.column_type) as enum_values \nfrom information_schema.columns col \n    join information_schema.tables tab on tab.table_schema = col.table_schema \n                                              and tab.table_name = col.table_name \n                                              and tab.table_type = 'BASE TABLE' \nwhere col.data_type in ('enum') \n  and col.table_schema not in ('information_schema', 'sys', 'performance_schema', 'mysql') \n  and col.table_schema = 'INSERT DATABASE NAME' \norder by col.table_schema, col.table_name, col.ordinal_position;\n```\n\nFind Tables containing BIT type:\n```sql\nselect col.table_schema as database_name, col.table_name, col.ordinal_position as column_id, col.column_name, \n       col.data_type, trim(leading 'bit' from col.column_type) as bit_values \nfrom information_schema.columns col \n    join information_schema.tables tab on tab.table_schema = col.table_schema \n                                              and tab.table_name = col.table_name \n                                              and tab.table_type = 'BASE TABLE' \nwhere col.data_type in ('bit') \n  and col.table_schema not in ('information_schema', 'sys', 'performance_schema', 'mysql') \n  and col.table_schema = 'INSERT DATABASE NAME' \norder by col.table_schema, col.table_name, col.ordinal_position;\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhxtree%2Fdb-to-doctrine-entity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhxtree%2Fdb-to-doctrine-entity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhxtree%2Fdb-to-doctrine-entity/lists"}