diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2017-04-07 17:55:03 +0200 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2017-04-07 17:55:03 +0200 |
| commit | d4380da66020f2a3d496715d14b637a868c81614 (patch) | |
| tree | c2d20f90139c7fbb10c1855b3e79e4d525c9a992 /models/asset.js | |
| parent | 3493a5bff6d622ccb8f1eba1c72bd939a418c1c5 (diff) | |
| download | orm-d4380da66020f2a3d496715d14b637a868c81614.tar.gz orm-d4380da66020f2a3d496715d14b637a868c81614.zip | |
reimport after breaking changes
Diffstat (limited to 'models/asset.js')
| -rw-r--r-- | models/asset.js | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/models/asset.js b/models/asset.js index 71bacab..291dfb7 100644 --- a/models/asset.js +++ b/models/asset.js @@ -8,37 +8,43 @@ module.exports = function(sequelize, DataTypes) { primaryKey: true, autoIncrement: true }, - match_api_id: { - type: DataTypes.STRING(191), + api_id: { + type: DataTypes.CHAR(36), + allowNull: false, + unique: true + }, + shard_id: { + type: DataTypes.STRING(5), allowNull: false }, - api_id: { - type: DataTypes.STRING(191), + match_api_id: { + type: DataTypes.CHAR(36), allowNull: false }, name: { - type: DataTypes.STRING(191), + type: DataTypes.STRING(16), allowNull: false }, url: { type: DataTypes.STRING(191), - allowNull: true + allowNull: false }, content_type: { - type: DataTypes.STRING(191), - allowNull: true + type: DataTypes.STRING(32), + allowNull: false }, created_at: { type: DataTypes.TIME, - allowNull: false + allowNull: false, + defaultValue: sequelize.fn('NOW') }, description: { type: DataTypes.STRING(191), - allowNull: true + allowNull: false }, filename: { - type: DataTypes.STRING(191), - allowNull: true + type: DataTypes.STRING(32), + allowNull: false } }, { tableName: 'asset', |
