create cases table
This commit is contained in:
@@ -19,9 +19,18 @@ function defineRun(sequelize, DataTypes) {
|
||||
projectId: {
|
||||
type: DataTypes.INTEGER,
|
||||
allowNull: false,
|
||||
},
|
||||
references: {
|
||||
model: 'project',
|
||||
key: 'id'
|
||||
},
|
||||
onDelete: 'CASCADE'
|
||||
}
|
||||
});
|
||||
|
||||
Run.associate = (models) => {
|
||||
Run.belongsTo(models.Project, { foreignKey: 'projectId', onDelete: 'CASCADE' });
|
||||
};
|
||||
|
||||
return Run;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user