'use strict';

const path = require('path');
const sequelize = require(path.resolve('src/utils/connection'));
const Sequelize = require('sequelize');

const pokemon = sequelize.define('pokemon', {
	name: {
		type: Sequelize.STRING,
		allowNull: false,
		unique: true
	},
	price: {
		type: Sequelize.FLOAT(2),
		allowNull: false
	},
	stock: {
		type: Sequelize.INTEGER,
		allowNull: true,
		defaultValue: 1
	}
});

module.exports = pokemon;
'use strict';

const path = require('path');
const sequelize = require(path.resolve('src/utils/connection'));
const Sequelize = require('sequelize');

const pokemon = sequelize.define('pokemon', {
	name: {
		type: Sequelize.STRING,
		allowNull: false,
		validate: {
            isAlpha: true
		}
	},
	price: {
		type: Sequelize.INTEGER,
		allowNull: false
	},
	stock: {
		type: Sequelize.INTEGER,
		allowNull: true,
		defaultValue: 1
	}
});

module.exports = pokemon;
--- 
+++ 
@@ -8,10 +8,12 @@
 	name: {
 		type: Sequelize.STRING,
 		allowNull: false,
-		unique: true
+		validate: {
+            isAlpha: true
+		}
 	},
 	price: {
-		type: Sequelize.FLOAT(2),
+		type: Sequelize.INTEGER,
 		allowNull: false
 	},
 	stock: {
ADJUST model to more persistence .
