forge->addField([ 'id' => ['type' => 'INT', 'unsigned' => true, 'auto_increment' => true], 'backup_id' => ['type' => 'INT', 'unsigned' => true], 'restored_by' => ['type' => 'VARCHAR', 'constraint' => 100], 'source' => ['type' => 'ENUM', 'constraint' => ['local', 'remote']], 'restored_at' => ['type' => 'DATETIME'], ]); $this->forge->addKey('id', true); $this->forge->addForeignKey('backup_id', 'backups', 'id', 'CASCADE', 'CASCADE'); $this->forge->createTable('backup_restores'); } public function down() { $this->forge->dropTable('backup_restores'); } }