0.0.2 • Published 6 years ago

@everreal/sequelize-fake-migrations v0.0.2

Weekly downloads
-
License
ISC
Repository
gitlab
Last release
6 years ago

@everreal/sequelize-fake-migrations

Module to fake migrations for sequelize, in case that the migrations did not exist on your local database.

Use case:

  • new developer joins team
  • tries to run an existing project with sequelize migrations
  • it will try to run all migrations on top of the already updated models and it will fail in most cases

Usage example:

require('ts-node/register');
const path = require('path');
const config = require('config');
const Sequelize = require('sequelize');
const fakeMigrations = require('@everreal/sequelize-fake-migrations').fakeMigrations;

const dbConfig = config.get('database');
const sequelize = new Sequelize(dbConfig);

fakeMigrations({
  sequelize,
  tableName: 'SequelizeMeta',
  migrationsDirectory: path.resolve(__dirname, 'src', 'migrations'),
}).then(() => console.log(`All good! :) - You can now start the server.`))
  .catch((err) => console.error(`Error faking migrations`, err));
0.0.2

6 years ago

0.0.1

6 years ago