From 3548b2232202e072b59f1acb456f7e8fcc116dc7 Mon Sep 17 00:00:00 2001 From: Axel Navarro Date: Tue, 7 Dec 2021 17:45:20 -0300 Subject: [PATCH] typeorm: add page (#7474) --- pages/common/typeorm.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 pages/common/typeorm.md diff --git a/pages/common/typeorm.md b/pages/common/typeorm.md new file mode 100644 index 0000000000..a510c29818 --- /dev/null +++ b/pages/common/typeorm.md @@ -0,0 +1,36 @@ +# typeorm + +> A JavaScript ORM that can run on Node.js, browser, Cordova, Ionic, React Native, NativeScript, and Electron platforms. +> More information: . + +- Generate a new initial TypeORM project structure: + +`typeorm init` + +- Create an empty migration file: + +`typeorm migration:create --name {{migration_name}}` + +- Create a migration file with the SQL statements to update the schema: + +`typeorm migration:generate --name {{migration_name}}` + +- Run all pending migrations: + +`typeorm migration:run` + +- Create a new entity file in a specific directory: + +`typeorm entity:create --name {{entity}} --dir {{path/to/directory}}` + +- Display the SQL statements to be executed by `typeorm schema:sync` on the default connection: + +`typeorm schema:log` + +- Execute a specific SQL statement on the default connection: + +`typeorm query {{sql_sentence}}` + +- Display help for a subcommand: + +`typeorm {{subcommand}} --help`