Upgrade sequelize and remove unique email constraints

This commit is contained in:
Jori Lallo
2017-07-12 00:28:18 -07:00
parent 3b146d9b47
commit cd584da5cf
10 changed files with 452 additions and 400 deletions

View File

@@ -1,23 +1,17 @@
// @flow
import { DataTypes, sequelize } from '../sequelize';
const Star = sequelize.define(
'star',
{
id: {
type: DataTypes.UUID,
defaultValue: DataTypes.UUIDV4,
primaryKey: true,
},
const Star = sequelize.define('star', {
id: {
type: DataTypes.UUID,
defaultValue: DataTypes.UUIDV4,
primaryKey: true,
},
{
classMethods: {
associate: models => {
Star.belongsTo(models.Document);
Star.belongsTo(models.User);
},
},
}
);
});
Star.associate = models => {
Star.belongsTo(models.Document);
Star.belongsTo(models.User);
};
export default Star;