tablas casi cercanas a espacios finales

This commit is contained in:
Lemuel Marquez
2021-04-26 14:49:39 -05:00
parent e6b7b7d0b7
commit 93f0f0b64c
8 changed files with 23 additions and 15 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ Carrera.init(
autoIncrement: true,
},
carrera: {
type: DataTypes.STRING(15),
type: DataTypes.STRING(40),
allowNull: false,
},
},
+2 -2
View File
@@ -14,11 +14,11 @@ Carrito.init(
autoIncrement: true,
},
carrito: {
type: DataTypes.STRING(15),
type: DataTypes.STRING(4),
allowNull: false,
},
sobrenombre: {
type: DataTypes.STRING(15),
type: DataTypes.STRING(4),
allowNull: false,
},
activo: {
+5 -2
View File
@@ -23,19 +23,22 @@ Equipo.init(
allowNull: false,
},
sobrenombre: {
type: DataTypes.STRING(15),
type: DataTypes.STRING(4),
allowNull: false,
},
activo: {
type: DataTypes.BOOLEAN,
allowNull: false,
defaultValue: false,
},
},
{
sequelize,
modelName: 'Equipo',
tableName: 'equipo',
// activar unicamente updateat
timestamps: true,
createdAt: false,
updatedAt: true,
}
);
+1 -1
View File
@@ -12,7 +12,7 @@ Modulo.init(
autoIncrement: true,
},
modulo: {
type: DataTypes.STRING(15),
type: DataTypes.STRING(20),
allowNull: false,
},
},
+3 -3
View File
@@ -13,18 +13,18 @@ Operador.init(
autoIncrement: true,
},
operador: {
type: DataTypes.STRING(100),
type: DataTypes.STRING(20),
allowNull: false,
unique: true,
},
password: {
type: DataTypes.STRING(60),
allowNull: true,
defaultValue: null,
allowNull: false,
},
activo: {
type: DataTypes.BOOLEAN,
allowNull: false,
defaultValue: true,
},
},
{
+8 -3
View File
@@ -24,18 +24,22 @@ Prestamo.init(
},
horaEntrega: {
type: DataTypes.DATE,
allowNull: false,
allowNull: true,
defaultValue: null,
},
activo: {
type: DataTypes.BOOLEAN,
allowNull: false,
defaultValue: false,
},
},
{
sequelize,
modelName: 'Prestamo',
tableName: 'Prestamo',
// activar createdat
timestamps: true,
createdAt: true,
updatedAt: false,
}
);
@@ -51,7 +55,8 @@ Prestamo.belongsTo(Operador, {
foreignKey: {
name: 'idOperadorRegreso',
type: DataTypes.INTEGER,
allowNull: false,
allowNull: true,
defaultValue: null,
},
});
+1 -1
View File
@@ -12,7 +12,7 @@ Status.init(
autoIncrement: true,
},
status: {
type: DataTypes.STRING(15),
type: DataTypes.STRING(20),
allowNull: false,
},
},
+2 -2
View File
@@ -14,7 +14,7 @@ Usuario.init(
autoIncrement: true,
},
usuario: {
type: DataTypes.STRING(100),
type: DataTypes.STRING(10),
allowNull: false,
unique: true,
},
@@ -27,7 +27,7 @@ Usuario.init(
allowNull: false,
},
telefono: {
type: DataTypes.STRING(70),
type: DataTypes.STRING(15),
allowNull: false,
},
multa: {