Skip to content

Commit

Permalink
Fix forms data type
Browse files Browse the repository at this point in the history
  • Loading branch information
versx committed Jan 24, 2022
1 parent 3260f87 commit 4685af0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
5 changes: 2 additions & 3 deletions src/models/pokemon.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,8 @@ Pokemon.init({
*/
},
forms: {
type: DataTypes.TEXT,
allowNull: true,
defaultValue: null,
type: DataTypes.JSON,
allowNull: false,
get() {
var data = this.getDataValue('forms');
return parseJsonColumn(data);
Expand Down
5 changes: 2 additions & 3 deletions src/models/pvp.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,8 @@ PVP.init({
},
},
forms: {
type: DataTypes.TEXT,
allowNull: true,
defaultValue: null,
type: DataTypes.JSON,
allowNull: false,
get() {
var data = this.getDataValue('forms');
return parseJsonColumn(data);
Expand Down
5 changes: 2 additions & 3 deletions src/models/raid.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,8 @@ Raid.init({
*/
},
forms: {
type: DataTypes.TEXT,
allowNull: true,
defaultValue: null,
type: DataTypes.JSON,
allowNull: false,
get() {
var data = this.getDataValue('forms');
return parseJsonColumn(data);
Expand Down

0 comments on commit 4685af0

Please sign in to comment.