refactor: migrate to PostgreSQL + Sequelize

This commit is contained in:
NGPixel
2017-07-22 23:56:46 -04:00
parent 8da98ce75a
commit d76f6182b2
40 changed files with 1044 additions and 745 deletions

View File

@@ -0,0 +1,10 @@
'use strict'
/**
* Associate DB Model relations
*/
module.exports = db => {
db.User.belongsToMany(db.Group, { through: 'UserGroups' })
db.Group.hasMany(db.Right, { as: 'GroupRights' })
db.File.belongsTo(db.Folder)
}