From 25013e78649a8af03354ca5b7346bbdd41fa867d Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Thu, 9 May 2019 01:04:08 -0600 Subject: [PATCH] singularity strikes again! --- README.md | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index c7fb4ac..64a1d18 100644 --- a/README.md +++ b/README.md @@ -124,14 +124,10 @@ you can do so like this: var Sequelize = require('sequelize'); var databaseUrl = process.env['DATABASE_URL']; var db = new Sequelize(databaseUrl, { - define: { - hooks: { - beforeDefine: function (name, attrs) { - console.log(name); - console.log(attrs); - attrs.tableName = 'MyPrefix' + attrs.tableName; - //attrs.schema = 'public'; - } + hooks: { + beforeDefine: function (columns, model) { + model.tableName = 'MyPrefix' + model.name.plural; + //model.schema = 'public'; } } });