Installations
npm install sequelize-cli-typescript
Releases
Unable to fetch releases
Developer
douglas-treadwell
Developer Guide
Module System
Unable to determine the module system for this package.
Min. Node Version
>=4.0.0
Typescript Support
No
Node Version
8.9.1
NPM Version
5.5.1
Statistics
48 Stars
619 Commits
21 Forks
3 Watching
2 Branches
1 Contributors
Updated on 06 Feb 2024
Languages
JavaScript (97.43%)
TypeScript (2.57%)
Total Downloads
Cumulative downloads
Total Downloads
953,830
Last day
38.2%
438
Compared to previous day
Last week
13%
1,679
Compared to previous week
Last month
-13.7%
7,019
Compared to previous month
Last year
-33.7%
179,087
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
sequelize/cli
The Sequelize Command Line Interface (CLI) for TypeScript
Table of Contents
Installation
Globally
Install CLI globally with
1$ npm install -g sequelize-cli-typescript
Now you can run CLI using following command anywhere
1$ sequelize
Locally
Install CLI locally to your node_modules
folder with
1$ npm install --save sequelize-cli-typescript
You should be able to run CLI with
1$ node_modules/.bin/sequelize
Differences from Sequelize-Cli (non-TypeScript)
With sequelize-cli, the model:generate
command would produce JavaScript files in two folders:
/models and /migrations, or other folders as specified in your .sequelizerc file. The db:migrate
command would then exe ute these JavaScript files to update your database.
With sequelize-cli-typescript, model:generate
produces TypeScript files in the same two folders
(or again, as specified in your .sequelizerc file). But before you can run db:migrate
you must
compile your migrations. (The step of compiling your migrations is left to you.)
You could compile your migrations along with your other code, or as part of a separate script. After you have compiled
your migrations, then you can run db:migrate
.
It's usually the case that the compiled JavaScript code will be put in a different directory than
the source TypeScript code, so whereas sequelize-cli had one migrations-path
setting,
sequelize-cli-typescript has two: migrations-source-path
and migrations-compiled-path
, which
default to /migrations and /migrations/compiled respectively.
Usage
Sequelize CLI [Node: 6.11.2, CLI: 3.0.0, ORM: 4.8.0]
Commands:
db:migrate Run pending migrations
db:migrate:schema:timestamps:add Update migration table to have timestamps
db:migrate:status List the status of all migrations
db:migrate:undo Reverts a migration
db:migrate:undo:all Revert all migrations ran
db:seed Run specified seeder
db:seed:undo Deletes data from the database
db:seed:all Run every seeder
db:seed:undo:all Deletes data from the database
db:create Create database specified by configuration
db:drop Drop database specified by configuration
init Initializes project
init:config Initializes configuration
init:migrations Initializes migrations
init:models Initializes models
init:seeders Initializes seeders
migration:generate Generates a new migration file [aliases: migration:create]
model:generate Generates a model and its migration [aliases: model:create]
seed:generate Generates a new seed file [aliases: seed:create]
Options:
--version Show version number [boolean]
--help Show help [boolean]
Contributing
Sequelize CLI is always looking for contributions. You can help us with fixing bugs, reporting bugs or improving documentation.
Please read contributing documentation
Sequelize Support
CLI v3 fully supports Sequelize v3. Support for Sequelize v4 is still experimental.
Full support for Sequelize v4 is coming soon with Sequelize CLI v4
Documentation
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
Found 1/29 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 2 are checked with a SAST tool
Score
3
/10
Last Scanned on 2024-11-25
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More