Skip to content

Commit 569986e

Browse files
authored
Merge pull request #210 from adhocteam/grantee-data-bugfix
Grantee import bugfix part 2
2 parents ddb12bc + 5af2d43 commit 569986e

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/models/grant.js

+12-1
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,21 @@ module.exports = (sequelize, DataTypes) => {
1717
}
1818
}
1919
Grant.init({
20+
id: {
21+
type: DataTypes.INTEGER,
22+
allowNull: false,
23+
defaultValue: null,
24+
primaryKey: true,
25+
autoIncrement: false,
26+
},
2027
number: {
2128
type: DataTypes.STRING,
2229
allowNull: false,
23-
unique: true,
30+
/*
31+
We're not setting unique true here to allow
32+
bulkCreate/updateOnDuplicate to properly match rows on just the id.
33+
unique: true,
34+
*/
2435
},
2536
status: DataTypes.STRING,
2637
startDate: DataTypes.DATE,

0 commit comments

Comments
 (0)