mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
Arreglado bug en archivo de migrate del catalogo
This commit is contained in:
@ -11,69 +11,78 @@ class CreateCatalogoLibros extends Migration
|
|||||||
$this->db->query('SET foreign_key_checks = 0');
|
$this->db->query('SET foreign_key_checks = 0');
|
||||||
|
|
||||||
$this->forge->addField([
|
$this->forge->addField([
|
||||||
'id' => ['type' => 'INT', 'constraint' => 10, 'unsigned' => true, 'auto_increment' => true],
|
'id' => ['type' => 'INT', 'constraint' => 10, 'unsigned' => true, 'auto_increment' => true],
|
||||||
'cliente_id' => ['type' => 'INT', 'constraint' => 10, 'unsigned' => true, 'null' => true],
|
'cliente_id' => ['type' => 'INT', 'constraint' => 10, 'unsigned' => true, 'null' => true],
|
||||||
'proveedor_id' => ['type' => 'INT', 'constraint' => 10, 'unsigned' => true, 'null' => true],
|
'proveedor_id' => ['type' => 'INT', 'constraint' => 10, 'unsigned' => true, 'null' => true],
|
||||||
'user_created_id' => ['type' => 'INT', 'constraint' => 10, 'unsigned' => true, 'default' => 1],
|
'user_created_id' => ['type' => 'INT', 'constraint' => 10, 'unsigned' => true, 'default' => 1],
|
||||||
'user_update_id' => ['type' => 'INT', 'constraint' => 10, 'unsigned' => true, 'default' => 1],
|
'user_update_id' => ['type' => 'INT', 'constraint' => 10, 'unsigned' => true, 'default' => 1],
|
||||||
'cubierta_archivo' => ['type' => 'VARCHAR', 'constraint' => 255, 'null' => true],
|
'cubierta_archivo' => ['type' => 'VARCHAR', 'constraint' => 255, 'null' => true],
|
||||||
'cubierta_url' => ['type' => 'VARCHAR', 'constraint' => 500, 'null' => true],
|
'cubierta_url' => ['type' => 'VARCHAR', 'constraint' => 500, 'null' => true],
|
||||||
'ancho' => ['type' => 'DOUBLE', 'constraint' => '8,2'],
|
'ancho' => ['type' => 'DOUBLE', 'constraint' => '8,2'],
|
||||||
'alto' => ['type' => 'DOUBLE', 'constraint' => '8,2'],
|
'alto' => ['type' => 'DOUBLE', 'constraint' => '8,2'],
|
||||||
'peso' => ['type' => 'DOUBLE', 'constraint' => '8,2', 'null' => true],
|
'peso' => ['type' => 'DOUBLE', 'constraint' => '8,2', 'null' => true],
|
||||||
'titulo' => ['type' => 'VARCHAR', 'constraint' => 300],
|
'titulo' => ['type' => 'VARCHAR', 'constraint' => 300],
|
||||||
'autor' => ['type' => 'VARCHAR', 'constraint' => 255, 'null' => true],
|
'autor' => ['type' => 'VARCHAR', 'constraint' => 255, 'null' => true],
|
||||||
'autor_entidad' => ['type' => 'VARCHAR', 'constraint' => 255, 'null' => true],
|
'autor_entidad' => ['type' => 'VARCHAR', 'constraint' => 255, 'null' => true],
|
||||||
'traductor' => ['type' => 'VARCHAR', 'constraint' => 255, 'null' => true],
|
'traductor' => ['type' => 'VARCHAR', 'constraint' => 255, 'null' => true],
|
||||||
'ilustrador' => ['type' => 'VARCHAR', 'constraint' => 255, 'null' => true],
|
'ilustrador' => ['type' => 'VARCHAR', 'constraint' => 255, 'null' => true],
|
||||||
'idioma' => ['type' => 'VARCHAR', 'constraint' => 3, 'default' => 'spa'],
|
'idioma' => ['type' => 'VARCHAR', 'constraint' => 3, 'default' => 'spa'],
|
||||||
'num_edic' => ['type' => 'INT', 'default' => 1, 'null' => true],
|
'num_edic' => ['type' => 'INT', 'default' => 1, 'null' => true],
|
||||||
'fecha_disponibilidad' => ['type' => 'DATE', 'null' => true],
|
'fecha_disponibilidad' => ['type' => 'DATE', 'null' => true],
|
||||||
'fecha_public' => ['type' => 'DATE', 'null' => true],
|
'fecha_public' => ['type' => 'DATE', 'null' => true],
|
||||||
'num_fotos' => ['type' => 'INT', 'default' => 0],
|
'num_fotos' => ['type' => 'INT', 'default' => 0],
|
||||||
'num_ilustr' => ['type' => 'INT', 'default' => 0],
|
'num_ilustr' => ['type' => 'INT', 'default' => 0],
|
||||||
'num_ilustr_color' => ['type' => 'INT', 'default' => 0],
|
'num_ilustr_color' => ['type' => 'INT', 'default' => 0],
|
||||||
'num_ilustr_bn' => ['type' => 'INT', 'default' => 0],
|
'num_ilustr_bn' => ['type' => 'INT', 'default' => 0],
|
||||||
'coleccion' => ['type' => 'VARCHAR', 'constraint' => 255, 'null' => true],
|
'coleccion' => ['type' => 'VARCHAR', 'constraint' => 255, 'null' => true],
|
||||||
'isk' => ['type' => 'VARCHAR', 'constraint' => 64, 'null' => true],
|
'isk' => ['type' => 'VARCHAR', 'constraint' => 64, 'null' => true],
|
||||||
'isbn' => ['type' => 'VARCHAR', 'constraint' => 255, 'null' => true],
|
'isbn' => ['type' => 'VARCHAR', 'constraint' => 255, 'null' => true],
|
||||||
'ean' => ['type' => 'VARCHAR', 'constraint' => 255, 'null' => true],
|
'ean' => ['type' => 'VARCHAR', 'constraint' => 255, 'null' => true],
|
||||||
'editorial' => ['type' => 'VARCHAR', 'constraint' => 255, 'null' => true],
|
'editorial' => ['type' => 'VARCHAR', 'constraint' => 255, 'null' => true],
|
||||||
'resumen' => ['type' => 'TEXT', 'null' => true],
|
'resumen' => ['type' => 'TEXT', 'null' => true],
|
||||||
'resumen_breve' => ['type' => 'TEXT', 'null' => true],
|
'resumen_breve' => ['type' => 'TEXT', 'null' => true],
|
||||||
'sello' => ['type' => 'VARCHAR', 'constraint' => 255, 'null' => true],
|
'sello' => ['type' => 'VARCHAR', 'constraint' => 255, 'null' => true],
|
||||||
'paginas' => ['type' => 'INT'],
|
'paginas' => ['type' => 'INT'],
|
||||||
'tipo_impresion' => ['type' => 'ENUM', 'constraint' => ['negro','negrohq','color','colorhq'], 'null' => true],
|
'tipo_impresion' => ['type' => 'ENUM', 'constraint' => ['negro', 'negrohq', 'color', 'colorhq'], 'null' => true],
|
||||||
'comentarios' => ['type' => 'TEXT', 'null' => true],
|
'comentarios' => ['type' => 'TEXT', 'null' => true],
|
||||||
'negro_paginas' => ['type' => 'INT', 'null' => true],
|
'negro_paginas' => ['type' => 'INT', 'null' => true],
|
||||||
'negro_papel_id' => ['type' => 'INT', 'constraint' => 10, 'unsigned' => true, 'null' => true],
|
'negro_papel_id' => ['type' => 'INT', 'constraint' => 10, 'unsigned' => true, 'null' => true],
|
||||||
'negro_gramaje' => ['type' => 'DOUBLE', 'null' => true],
|
'negro_gramaje' => ['type' => 'DOUBLE', 'null' => true],
|
||||||
'negro_pod_papel_id' => ['type' => 'INT', 'constraint' => 10, 'unsigned' => true, 'null' => true],
|
'negro_pod_papel_id' => ['type' => 'INT', 'constraint' => 10, 'unsigned' => true, 'null' => true],
|
||||||
'negro_pod_gramaje' => ['type' => 'DOUBLE', 'null' => true],
|
'negro_pod_gramaje' => ['type' => 'DOUBLE', 'null' => true],
|
||||||
'color_paginas' => ['type' => 'INT', 'null' => true],
|
'color_paginas' => ['type' => 'INT', 'null' => true],
|
||||||
'color_papel_id' => ['type' => 'INT', 'constraint' => 10, 'unsigned' => true, 'null' => true],
|
'color_papel_id' => ['type' => 'INT', 'constraint' => 10, 'unsigned' => true, 'null' => true],
|
||||||
'color_gramaje' => ['type' => 'DOUBLE', 'null' => true],
|
'color_gramaje' => ['type' => 'DOUBLE', 'null' => true],
|
||||||
'color_pod_papel_id' => ['type' => 'INT', 'constraint' => 10, 'unsigned' => true, 'null' => true],
|
'color_pod_papel_id' => ['type' => 'INT', 'constraint' => 10, 'unsigned' => true, 'null' => true],
|
||||||
'color_pod_gramaje' => ['type' => 'DOUBLE', 'null' => true],
|
'color_pod_gramaje' => ['type' => 'DOUBLE', 'null' => true],
|
||||||
'cubierta_paginas' => ['type' => 'INT', 'null' => true],
|
'cubierta_paginas' => ['type' => 'INT', 'null' => true],
|
||||||
'cubierta_papel_id' => ['type' => 'INT', 'constraint' => 10, 'unsigned' => true, 'null' => true],
|
'cubierta_papel_id' => ['type' => 'INT', 'constraint' => 10, 'unsigned' => true, 'null' => true],
|
||||||
'cubierta_gramaje' => ['type' => 'DOUBLE', 'null' => true],
|
'cubierta_gramaje' => ['type' => 'DOUBLE', 'null' => true],
|
||||||
'cubierta_acabado_id' => ['type' => 'INT', 'constraint' => 10, 'unsigned' => true, 'null' => true],
|
'cubierta_acabado_id' => ['type' => 'INT', 'constraint' => 10, 'unsigned' => true, 'null' => true],
|
||||||
'cubierta_ancho_solapas' => ['type' => 'DOUBLE', 'constraint' => '8,2', 'default' => 0.00, 'unsigned' => true],
|
'cubierta_ancho_solapas' => ['type' => 'DOUBLE', 'constraint' => '8,2', 'default' => 0.00, 'unsigned' => true],
|
||||||
'cubierta_pod_papel_id' => ['type' => 'INT', 'constraint' => 10, 'unsigned' => true, 'null' => true],
|
'cubierta_pod_papel_id' => ['type' => 'INT', 'constraint' => 10, 'unsigned' => true, 'null' => true],
|
||||||
'cubierta_pod_gramaje' => ['type' => 'DOUBLE', 'null' => true],
|
'cubierta_pod_gramaje' => ['type' => 'DOUBLE', 'null' => true],
|
||||||
'sobrecubierta_paginas' => ['type' => 'INT', 'null' => true],
|
'sobrecubierta_paginas' => ['type' => 'INT', 'null' => true],
|
||||||
'sobrecubierta_papel_id' => ['type' => 'INT', 'constraint' => 10, 'unsigned' => true, 'null' => true],
|
'sobrecubierta_papel_id' => ['type' => 'INT', 'constraint' => 10, 'unsigned' => true, 'null' => true],
|
||||||
'sobrecubierta_gramaje' => ['type' => 'DOUBLE', 'null' => true],
|
'sobrecubierta_gramaje' => ['type' => 'DOUBLE', 'null' => true],
|
||||||
'sobrecubierta_acabado_id' => ['type' => 'INT', 'constraint' => 10, 'unsigned' => true, 'null' => true],
|
'sobrecubierta_acabado_id' => ['type' => 'INT', 'constraint' => 10, 'unsigned' => true, 'null' => true],
|
||||||
'sobrecubierta_ancho_solapas' => ['type' => 'DOUBLE', 'constraint' => '8,2', 'default' => 0.00, 'unsigned' => true],
|
'sobrecubierta_ancho_solapas' => ['type' => 'DOUBLE', 'constraint' => '8,2', 'default' => 0.00, 'unsigned' => true],
|
||||||
'sobrecubierta_pod_papel_id' => ['type' => 'INT', 'constraint' => 10, 'unsigned' => true, 'null' => true],
|
'sobrecubierta_pod_papel_id' => ['type' => 'INT', 'constraint' => 10, 'unsigned' => true, 'null' => true],
|
||||||
'sobrecubierta_pod_gramaje' => ['type' => 'DOUBLE', 'null' => true],
|
'sobrecubierta_pod_gramaje' => ['type' => 'DOUBLE', 'null' => true],
|
||||||
'encuadernacion_id' => ['type' => 'INT', 'constraint' => 10, 'unsigned' => true, 'null' => true],
|
'encuadernacion_id' => ['type' => 'INT', 'constraint' => 10, 'unsigned' => true, 'null' => true],
|
||||||
'ubicacion' => ['type' => 'VARCHAR', 'constraint' => 255, 'null' => true],
|
'ubicacion' => ['type' => 'VARCHAR', 'constraint' => 255, 'null' => true],
|
||||||
'created_at' => ['type' => 'TIMESTAMP', 'default' => 'CURRENT_TIMESTAMP'],
|
'created_at' => [
|
||||||
'updated_at' => ['type' => 'TIMESTAMP', 'null' => true],
|
'type' => 'TIMESTAMP',
|
||||||
'deleted_at' => ['type' => 'TIMESTAMP', 'null' => true],
|
'default' => new \CodeIgniter\Database\RawSql('CURRENT_TIMESTAMP'),
|
||||||
|
],
|
||||||
|
'updated_at' => [
|
||||||
|
'type' => 'TIMESTAMP',
|
||||||
|
'null' => true,
|
||||||
|
],
|
||||||
|
'deleted_at' => [
|
||||||
|
'type' => 'TIMESTAMP',
|
||||||
|
'null' => true,
|
||||||
|
],
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$this->forge->addKey('id', true);
|
$this->forge->addKey('id', true);
|
||||||
|
|||||||
Reference in New Issue
Block a user