{"id":22868147,"url":"https://github.com/liftitapp/typeorm-model-generator-liftit","last_synced_at":"2025-03-31T10:49:56.416Z","repository":{"id":87210371,"uuid":"161507566","full_name":"Liftitapp/typeorm-model-generator-liftit","owner":"Liftitapp","description":null,"archived":false,"fork":false,"pushed_at":"2018-12-19T19:36:29.000Z","size":1071,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-18T04:36:49.852Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/Liftitapp.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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-12-12T15:28:23.000Z","updated_at":"2018-12-19T19:36:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"af60d5eb-2306-4eb6-ac45-8203bc631634","html_url":"https://github.com/Liftitapp/typeorm-model-generator-liftit","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Liftitapp%2Ftypeorm-model-generator-liftit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Liftitapp%2Ftypeorm-model-generator-liftit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Liftitapp%2Ftypeorm-model-generator-liftit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Liftitapp%2Ftypeorm-model-generator-liftit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Liftitapp","download_url":"https://codeload.github.com/Liftitapp/typeorm-model-generator-liftit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246458022,"owners_count":20780675,"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-13T12:31:49.450Z","updated_at":"2025-03-31T10:49:56.408Z","avatar_url":"https://github.com/Liftitapp.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @liftitapp/typeorm-model-generator-liftit\n\nGenerates models for TypeORM from existing databases.\nSuported db engines:\n* Microsoft SQL Server\n* PostgreSQL\n* MySQL\n* MariaDB\n* Oracle Database\n* SQLite\n\n\n## Installation\n### Global module\nTo install module globally simply type `npm i -g @liftitapp/typeorm-model-generator-liftit` in your console.\n### Npx way\nThanks to npx you can use npm modules without polluting global installs. So nothing to do here :)\n\u003eTo use `npx` you need to use npm at version at least 5.2.0. Try updating your npm by `npm i -g npm`\n### Database drivers\nAll database drivers except oracle are installed by default. To use typeorm-model-generator with oracle databese you need to install driver with `npm i oracledb` and configure [oracle install client](http://www.oracle.com/technetwork/database/database-technologies/instant-client/overview/index.html) on your machine.\n\n## Usage\n\n```shell\nUsage: typeorm-model-generator -h \u003chost\u003e -d \u003cdatabase\u003e -p [port] -u \u003cuser\u003e -x\n[password] -e [engine]\n\nOptions:\n  --help                 Show help                                     [boolean]\n  --version              Show version number                           [boolean]\n  -h, --host             IP adress/Hostname for database server\n                                                          [default: \"127.0.0.1\"]\n  -d, --database         Database name(or path for sqlite)            [required]\n  -u, --user             Username for database server\n  -x, --pass             Password for database server              [default: \"\"]\n  -p, --port             Port number for database server\n  -e, --engine           Database engine\n          [choices: \"mssql\", \"postgres\", \"mysql\", \"mariadb\", \"oracle\", \"sqlite\"]\n                                                              [default: \"mssql\"]\n  -o, --output           Where to place generated models\n                            [default: \"Z:\\Repos\\typeorm-model-generator\\output\"]\n  -s, --schema           Schema name to create model from. Only for mssql and\n                         postgres\n  --ssl                                               [boolean] [default: false]\n  --noConfig             Doesn't create tsconfig.json and ormconfig.json\n                                                      [boolean] [default: false]\n  --cf, --case-file      Convert file names to specified case\n                 [choices: \"pascal\", \"param\", \"camel\", \"none\"] [default: \"none\"]\n  --ce, --case-entity    Convert class names to specified case\n                          [choices: \"pascal\", \"camel\", \"none\"] [default: \"none\"]\n  --cp, --case-property  Convert property names to specified case\n                          [choices: \"pascal\", \"camel\", \"none\"] [default: \"none\"]\n  --lazy                 Generate lazy relations      [boolean] [default: false]\n  --namingStrategy       Use custom naming strategy\n  --relationIds          Generate RelationId fields   [boolean] [default: false]\n  --generateConstructor  Generate constructor allowing partial initialization\n                                                      [boolean] [default: false]\n```\n### Examples\n\n* Creating model from local MSSQL database\n   * Global module\n      ```\n      typeorm-model-generator -h localhost -d tempdb -u sa -x !Passw0rd -e mssql -o .\n      ````\n   * Npx Way\n      ```\n      npx typeorm-model-generator -h localhost -d tempdb -u sa -x !Passw0rd -e mssql -o .\n      ````\n* Creating model from local Postgres database, public schema with ssl connection\n   * Global module\n      ```\n      typeorm-model-generator -h localhost -d postgres -u postgres -x !Passw0rd -e postgres -o . -s public --ssl\n      ````\n   * Npx Way\n      ```\n      npx typeorm-model-generator -h localhost -d postgres -u postgres -x !Passw0rd -e postgres -o . -s public --ssl\n      ````\n* Creating model from SQLite database\n   * Global module\n      ```\n      typeorm-model-generator -d \"Z:\\sqlite.db\" -e sqlite -o .\n      ````\n   * Npx Way\n      ```\n      npx typeorm-model-generator -d \"Z:\\sqlite.db\" -e sqlite -o .\n      ````\n## Naming strategy\nIf you want to generate custom names for properties in generated entities you need to use custom naming strategy. You need to create your own version of NamingStrategy and pass it as command parameter.\n\n```typeorm-model-generator -d typeorm_mg --namingStrategy=./NamingStrategy -e sqlite -db /tmp/sqliteto.db```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliftitapp%2Ftypeorm-model-generator-liftit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fliftitapp%2Ftypeorm-model-generator-liftit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliftitapp%2Ftypeorm-model-generator-liftit/lists"}