Skip to content

Instantly share code, notes, and snippets.

Avatar
📖
Learning

Brad Decker brad-decker

📖
Learning
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am brad-decker on github.
  • I am bhdecker (https://keybase.io/bhdecker) on keybase.
  • I have a public key ASC44TjSHNjBb7tbbuCwdiX-LTwNyokV5elGSGliQsE27Qo

To claim this, I am signing this object:

@brad-decker
brad-decker / update-constraint.js
Last active Aug 10, 2016
Sequelize Postgres Migration update constraint helper for changing the value of onUpdate and onDelete.
View update-constraint.js
const constraintOpts = {
onDelete: 'NO ACTION',
onUpdate: 'NO ACTION'
};
/**
* updateConstraint
* @param {QueryInterface} queryInterface - sequelize queryInterface proviced in up/down methods of migrations
* @param {SequelizeModel} model - base sequelize model where the foreign key exists
* @param {String} fkey - foreign key field name (ex: userId)
View keybase.md

Keybase proof

I hereby claim:

  • I am brad-decker on github.
  • I am braddecker (https://keybase.io/braddecker) on keybase.
  • I have a public key whose fingerprint is CD0B F908 246F E540 8E6B 7947 61EA 1AA6 450C 1773

To claim this, I am signing this object: