All Projects → flexxnn → Sequelize Auto Migrations

flexxnn / Sequelize Auto Migrations

Licence: mit
Migration generator && runner for sequelize

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Sequelize Auto Migrations

Sequelize
An easy-to-use and promise-based multi SQL dialects ORM tool for Node.js
Stars: ✭ 25,422 (+10810.73%)
Mutual labels:  sql, mysql, postgresql, sqlite, sequelize
Sql
MySQL & PostgreSQL pipe
Stars: ✭ 81 (-65.24%)
Mutual labels:  cli, sql, mysql, postgresql
Heidisql
A lightweight client for managing MariaDB, MySQL, SQL Server, PostgreSQL and SQLite, written in Delphi
Stars: ✭ 2,864 (+1129.18%)
Mutual labels:  sql, mysql, postgresql, sqlite
Linq2db
Linq to database provider.
Stars: ✭ 2,211 (+848.93%)
Mutual labels:  sql, mysql, postgresql, sqlite
Nut
Advanced, Powerful and easy to use ORM for Qt
Stars: ✭ 181 (-22.32%)
Mutual labels:  sql, mysql, postgresql, sqlite
Eosio sql plugin
EOSIO sql database plugin
Stars: ✭ 21 (-90.99%)
Mutual labels:  sql, mysql, postgresql, sqlite
Electrocrud
Database CRUD Application Built on Electron | MySQL, Postgres, SQLite
Stars: ✭ 1,267 (+443.78%)
Mutual labels:  sql, mysql, postgresql, sqlite
Sqlancer
Detecting Logic Bugs in DBMS
Stars: ✭ 672 (+188.41%)
Mutual labels:  sql, mysql, postgresql, sqlite
Sql Kit
*️⃣ Build SQL queries in Swift. Extensible, protocol-based design that supports DQL, DML, and DDL.
Stars: ✭ 115 (-50.64%)
Mutual labels:  sql, mysql, postgresql, sqlite
Kangaroo
SQL client and admin tool for popular databases
Stars: ✭ 127 (-45.49%)
Mutual labels:  sql, mysql, postgresql, sqlite
Octosql
OctoSQL is a query tool that allows you to join, analyse and transform data from multiple databases and file formats using SQL.
Stars: ✭ 2,579 (+1006.87%)
Mutual labels:  cli, sql, mysql, postgresql
Smartsql
SmartSql = MyBatis in C# + .NET Core+ Cache(Memory | Redis) + R/W Splitting + PropertyChangedTrack +Dynamic Repository + InvokeSync + Diagnostics
Stars: ✭ 775 (+232.62%)
Mutual labels:  sql, mysql, postgresql, sqlite
Vscode Sqltools
Database management for VSCode
Stars: ✭ 741 (+218.03%)
Mutual labels:  sql, mysql, postgresql, sqlite
Goqu
SQL builder and query library for golang
Stars: ✭ 984 (+322.32%)
Mutual labels:  sql, mysql, postgresql, sqlite
Rom Sql
SQL support for rom-rb
Stars: ✭ 169 (-27.47%)
Mutual labels:  sql, mysql, postgresql, sqlite
Xeus Sql
xeus-sql is a Jupyter kernel for general SQL implementations.
Stars: ✭ 85 (-63.52%)
Mutual labels:  sql, mysql, postgresql, sqlite
Trdsql
CLI tool that can execute SQL queries on CSV, LTSV, JSON and TBLN. Can output to various formats.
Stars: ✭ 593 (+154.51%)
Mutual labels:  cli, sql, mysql, postgresql
Beekeeper Studio
Modern and easy to use SQL client for MySQL, Postgres, SQLite, SQL Server, and more. Linux, MacOS, and Windows.
Stars: ✭ 8,053 (+3356.22%)
Mutual labels:  sql, mysql, postgresql, sqlite
Qtl
A friendly and lightweight C++ database library for MySQL, PostgreSQL, SQLite and ODBC.
Stars: ✭ 92 (-60.52%)
Mutual labels:  sql, mysql, postgresql, sqlite
Manage Fastapi
🚀 CLI tool for FastAPI. Generating new FastAPI projects & boilerplates made easy.
Stars: ✭ 163 (-30.04%)
Mutual labels:  cli, mysql, postgresql, sqlite

sequelize-auto-migrations

Migration generator && runner for sequelize

This package provide two tools:

  • makemigration - tool for create new migrations
  • runmigration - tool for apply created by first tool migrations

Install

npm install sequelize-auto-migrations

Usage

  • Init sequelize, with sequelize-cli, using sequelize init
  • Create your models
  • Create initial migration - run:

makemigration --name <migration name>

  • Change models and run it again, model difference will be saved to the next migration

To preview new migration, without any changes, you can run:

makemigration --preview

makemigration tool creates _current.json file in migrations dir, that is used to calculate difference to the next migration. Do not remove it!

To create and then execute migration, use: makemigration --name <name> -x

Executing migrations

  • There is simple command to perform all created migrations (from selected revision):

runmigration

  • To select a revision, use --rev <x>
  • If migration fails, you can continue, use --pos <x>
  • To prevent execution next migrations, use --one

For more information, use makemigration --help, runmigration --help

TODO:

  • Migration action sorting procedure need some fixes. When many foreign keys in tables, there is a bug with action order. Now, please check it manually (--preview option)
  • Need to check (and maybe fix) field types: BLOB, RANGE, ARRAY, GEOMETRY, GEOGRAPHY
  • Downgrade is not supported, add it
  • This module tested with postgresql (I use it with my projects). Test with mysql and sqlite.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].