Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sequelize-cli

Package Overview
Dependencies
Maintainers
4
Versions
91
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sequelize-cli

The Sequelize CLI

  • 6.6.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
555K
decreased by-1.58%
Maintainers
4
Weekly downloads
 
Created

What is sequelize-cli?

The sequelize-cli package is a command-line interface for Sequelize, a popular Node.js ORM (Object-Relational Mapper). It provides a set of commands to help manage your database schema, migrations, and seed data, making it easier to work with databases in a Node.js environment.

What are sequelize-cli's main functionalities?

Generating Models

This command generates a new model named 'User' with the specified attributes. It creates a model file and a corresponding migration file.

npx sequelize-cli model:generate --name User --attributes firstName:string,lastName:string,email:string

Running Migrations

This command runs all pending migrations, updating the database schema to match the latest state defined in your migration files.

npx sequelize-cli db:migrate

Creating Seed Data

This command generates a new seed file named 'demo-user'. Seed files are used to populate the database with initial data.

npx sequelize-cli seed:generate --name demo-user

Undoing Migrations

This command undoes the last executed migration, reverting the database schema to its previous state.

npx sequelize-cli db:migrate:undo

Running Seeders

This command runs all seed files, populating the database with the data defined in the seed files.

npx sequelize-cli db:seed:all

Other packages similar to sequelize-cli

Keywords

FAQs

Package last updated on 03 Nov 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc