summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2017-04-10 16:47:39 +0200
committerschneefux <schneefux+commit@schneefux.xyz>2017-04-10 16:47:39 +0200
commit22afb45c9f9b13b13b5899fc5d66e98259260267 (patch)
tree15b2f97caafe60d3c265696af96ad0cfb371f8b5
parentb3ba4b3da3bf2d1e7b75ca3d0e68ae7fe08acef4 (diff)
downloadorm-22afb45c9f9b13b13b5899fc5d66e98259260267.tar.gz
orm-22afb45c9f9b13b13b5899fc5d66e98259260267.zip
import schema
-rw-r--r--models/asset.js3
-rw-r--r--models/match.js3
-rw-r--r--models/participant.js3
-rw-r--r--models/player_point.js17
4 files changed, 13 insertions, 13 deletions
diff --git a/models/asset.js b/models/asset.js
index ae939a0..a10c2da 100644
--- a/models/asset.js
+++ b/models/asset.js
@@ -35,7 +35,8 @@ module.exports = function(sequelize, DataTypes) {
},
created_at: {
type: DataTypes.TIME,
- allowNull: false
+ allowNull: false,
+ defaultValue: sequelize.literal('CURRENT_TIMESTAMP')
},
description: {
type: DataTypes.STRING(191),
diff --git a/models/match.js b/models/match.js
index 0b9f6d9..7efd63b 100644
--- a/models/match.js
+++ b/models/match.js
@@ -19,7 +19,8 @@ module.exports = function(sequelize, DataTypes) {
},
created_at: {
type: DataTypes.TIME,
- allowNull: false
+ allowNull: false,
+ defaultValue: sequelize.literal('CURRENT_TIMESTAMP')
},
duration: {
type: DataTypes.INTEGER(5).UNSIGNED,
diff --git a/models/participant.js b/models/participant.js
index 22381fc..c4be804 100644
--- a/models/participant.js
+++ b/models/participant.js
@@ -51,7 +51,8 @@ module.exports = function(sequelize, DataTypes) {
},
created_at: {
type: DataTypes.TIME,
- allowNull: false
+ allowNull: false,
+ defaultValue: sequelize.literal('CURRENT_TIMESTAMP')
},
actor: {
type: DataTypes.STRING(16),
diff --git a/models/player_point.js b/models/player_point.js
index 31cb085..160be5a 100644
--- a/models/player_point.js
+++ b/models/player_point.js
@@ -12,10 +12,6 @@ module.exports = function(sequelize, DataTypes) {
type: DataTypes.BIGINT,
allowNull: false
},
- pick_rate: {
- type: "DOUBLE(8,2)",
- allowNull: true
- },
played: {
type: DataTypes.INTEGER(11),
allowNull: true
@@ -28,14 +24,14 @@ module.exports = function(sequelize, DataTypes) {
type: DataTypes.INTEGER(11),
allowNull: true
},
- win_rate: {
- type: "DOUBLE(8,2)",
- allowNull: true
- },
series_id: {
type: DataTypes.BIGINT,
allowNull: false
},
+ role_id: {
+ type: DataTypes.BIGINT,
+ allowNull: false
+ },
filter_id: {
type: DataTypes.BIGINT,
allowNull: false
@@ -50,11 +46,12 @@ module.exports = function(sequelize, DataTypes) {
},
updated_at: {
type: DataTypes.DATE,
- allowNull: true
+ allowNull: false
},
created_at: {
type: DataTypes.TIME,
- allowNull: true
+ allowNull: false,
+ defaultValue: sequelize.literal('CURRENT_TIMESTAMP')
},
kills: {
type: DataTypes.INTEGER(5).UNSIGNED,