
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
@mikeatjulaya/serverless-sequelize-migrations
Advanced tools
A Serverless plugin to manage sequelize migrations
Features:
npm install --save serverless-sequelize-migrations
plugins:
- serverless-sequelize-migrations
You can check whether the plugin is ready to be used through the terminal. To do so, type the following command on the CLI:
serverless
the console should display SequelizeMigrations as one of the available plugins in your Serverless project.
For the plugin to work correctly, you have to set the database information as environment variables on the service provider section as follows:
provider:
environment:
DB_DIALECT: 'database_dialect' /* one of 'mysql' | 'mariadb' | 'postgres' | 'mssql' */
DB_NAME: 'database_name'
DB_USERNAME: 'database_username'
DB_PASSWORD: 'database_password'
DB_HOST: 'database_host'
DB_PORT: 'database_port'
or by using DB_CONNECTION_URL
provider:
environment:
DB_CONNECTION_URL: database_dialect://database_username:database_password@database_host:database_port/database_name`
Replace the variables with the information of your own database.
Obs: This plugin does not have support to create the database itself.
As per Sequelize docs, you'll have to manually install the driver for your database of choice:
# One of the following:
$ npm install --save pg pg-hstore # Postgres
$ npm install --save mysql2 # MySQL
$ npm install --save mariadb # MariaDB
$ npm install --save tedious # Microsoft SQL Server
To see the available commands of the plugin, run sls migrations
on the terminal. The following should appear:
Plugin: SequelizeMigrations
migrations .................... Sequelize migrations management for Serverless
migrations create ............. Create a migration file
migrations up ................. Execute all pending migrations
migrations down ............... Rolls back one or more migrations
migrations reset .............. Rolls back all migrations
migrations list ............... Shows a list of migrations
--path / -p ........................ Specify the migrations path (default is './migrations')
--verbose / -v ..................... Shows sequelize logs
For any of these commands, you can specify two parameters:
--path
to inform the path of migrations on your project.--verbose
to show sequelize execution logs during the operations.In order to see the options of each command individually, you can run sls migrations <command> --help
on the terminal.
The commands (those that have some option) and it's options are presented below:
--name / -n (required) ... Specify the name of the migration to be created
--rollback / -r .......... Rolls back applied migrations in case of error (default is false)
--dbDialect ........................ Specify the database dialect (one of: 'mysql', 'mariadb', 'postgres', 'mssql')
--dbHost ........................... Specify the database host
--dbPort ........................... Specify the database port
--dbName ........................... Specify the database name
--dbUsername ....................... Specify the database username
--dbPassword ....................... Specify the database password
--times / -t ............. Specify how many times to roll back (default is 1)
--name / -n .............. Specify the name of the migration to be rolled back (e.g. "--name create-users.js")
--dbDialect ........................ Specify the database dialect (one of: 'mysql', 'mariadb', 'postgres', 'mssql')
--dbHost ........................... Specify the database host
--dbPort ........................... Specify the database port
--dbName ........................... Specify the database name
--dbUsername ....................... Specify the database username
--dbPassword ....................... Specify the database password
--status / -s ............ Specify the status of migrations to be listed (--status pending [default] or --status executed)
--dbDialect ........................ Specify the database dialect (one of: 'mysql', 'mariadb', 'postgres', 'mssql')
--dbHost ........................... Specify the database host
--dbPort ........................... Specify the database port
--dbName ........................... Specify the database name
--dbUsername ....................... Specify the database username
--dbPassword ....................... Specify the database password
You can also define a migrations path variable on the custom section of your project service file.
custom:
migrationsPath: './custom/migrations/path'
Important: if you inform the --path option through the CLI, this configuration will be ignored.
This plugin was first based on Nevon's serverless-pg-migrations.
MIT
FAQs
A Serverless plugin to manage sequelize migrations
We found that @mikeatjulaya/serverless-sequelize-migrations demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.