forge->addField([ 'id' => [ 'type' => 'INT', 'unsigned' => true, 'auto_increment' => true ], 'filename' => ['type' => 'VARCHAR', 'constraint' => 255], 'type' => ['type' => 'ENUM', 'constraint' => ['manual', 'cron']], 'path_local' => ['type' => 'VARCHAR', 'constraint' => 255, 'null' => true], 'path_remote' => ['type' => 'VARCHAR', 'constraint' => 255, 'null' => true], 'size' => ['type' => 'INT', 'unsigned' => true, 'null' => true], 'status' => ['type' => 'ENUM', 'constraint' => ['pendiente', 'subido', 'error'], 'default' => 'pendiente'], 'created_at' => ['type' => 'DATETIME', 'null' => false], 'updated_at' => ['type' => 'DATETIME', 'null' => true], ]); $this->forge->addKey('id', true); $this->forge->createTable('backups'); } public function down() { $this->forge->dropTable('backups'); } }