forge->addField([ 'id' => [ 'type' => 'INT', 'constraint' => 11, 'unsigned' => true, 'auto_increment' => true, ], 'alias' => [ 'type' => 'VARCHAR', 'constraint' => 255, ], 'cliente_id' => [ 'type' => 'INT', 'constraint' => 10, 'unsigned' => true, 'null' => true, ], 'isPod' => [ 'type' => 'TINYINT', 'constraint' => 1, 'default' => 0, ], 'input_isColor' => [ 'type' => 'TINYINT', 'constraint' => 1, 'default' => 0, ], 'input_isHq' => [ 'type' => 'TINYINT', 'constraint' => 1, 'default' => 0, ], 'output_isColor' => [ 'type' => 'TINYINT', 'constraint' => 1, 'default' => 0, ], 'output_isHq' => [ 'type' => 'TINYINT', 'constraint' => 1, 'default' => 0, ], 'created_at' => [ 'type' => 'DATETIME', 'null' => true, ], 'updated_at' => [ 'type' => 'DATETIME', 'null' => true, ], 'deleted_at' => [ 'type' => 'DATETIME', 'null' => true, ], ]); $this->forge->addKey('id', true); $this->forge->addForeignKey('cliente_id', 'clientes', 'id', 'CASCADE', 'SET NULL'); $this->forge->createTable('selector_calidad_impresion'); } public function down() { $this->forge->dropTable('selector_calidad_impresion'); } }