<?php
use Migrations\AbstractMigration;

class AddTypeToReindexFlags extends AbstractMigration
{
    /**
     * Change Method.
     *
     * More information on this method is available here:
     * http://docs.phinx.org/en/latest/migrations.html#the-change-method
     * @return void
     */
    public function change()
    {
        $table = $this->table('reindex_flags');
        $table->addColumn('type', 'enum', [
            'values' => ['change', 'removal'],
            'null' => false,
        ]);
        $table->update();
    }
}

Add 'type' column to ReindexFlags
Add 'type' column to ReindexFlags

We need this column to distinguish changes (inserts and updates) from
deletions. Changed sentences will be included in the delta index,
deleted sentences will be included in the kill-list.

See #2226 for additional information.
