summaryrefslogtreecommitdiff
path: root/models/item_participant.js
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2017-04-15 16:58:31 +0200
committerschneefux <schneefux+commit@schneefux.xyz>2017-04-15 16:58:31 +0200
commitcb1a855f34bd12464a4e80cc03c096a323a02818 (patch)
tree23edd5dcf02425418a4c72b2b969ab5476409f8c /models/item_participant.js
parentb074ae7a1f57345b535a9d21a59789b0af7b8ede (diff)
downloadorm-cb1a855f34bd12464a4e80cc03c096a323a02818.tar.gz
orm-cb1a855f34bd12464a4e80cc03c096a323a02818.zip
db: participant_item_use needs a primary key
Diffstat (limited to 'models/item_participant.js')
-rw-r--r--models/item_participant.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/models/item_participant.js b/models/item_participant.js
index 94d2061..ca8ef15 100644
--- a/models/item_participant.js
+++ b/models/item_participant.js
@@ -3,8 +3,10 @@
module.exports = function(sequelize, DataTypes) {
return sequelize.define('item_participant', {
id: {
- type: DataTypes.INTEGER(5).UNSIGNED,
- allowNull: false
+ type: DataTypes.INTEGER(10).UNSIGNED,
+ allowNull: false,
+ primaryKey: true,
+ autoIncrement: true
},
participant_api_id: {
type: DataTypes.CHAR(36),
@@ -14,6 +16,10 @@ module.exports = function(sequelize, DataTypes) {
type: DataTypes.STRING(191),
allowNull: false
},
+ number: {
+ type: DataTypes.INTEGER(5).UNSIGNED,
+ allowNull: false
+ },
action: {
type: DataTypes.ENUM('grant','sell','use','final'),
allowNull: false