Jarves\Propel\Behavior\WorkspaceBehavior::modifyTable PHP Method

modifyTable() public method

Modifies a table
public modifyTable ( )
    public function modifyTable()
    {
        /** @var \Propel\Generator\Model\Table $table */
        $table = $this->getTable();
        // add the column if not present
        if (!$table->hasColumn($this->prefix . 'id')) {
            $table->addColumn(array('name' => $this->prefix . 'id', 'type' => 'INTEGER', 'primaryKey' => 'true'));
        }
        if (!$table->hasColumn($this->prefix . 'action')) {
            $table->addColumn(array('name' => $this->prefix . 'action', 'type' => 'INTEGER'));
        }
        if (!$table->hasColumn($this->prefix . 'action_date')) {
            $table->addColumn(array('name' => $this->prefix . 'action_date', 'type' => 'INTEGER'));
        }
        if (!$table->hasColumn($this->prefix . 'action_user')) {
            $table->addColumn(array('name' => $this->prefix . 'action_user', 'type' => 'INTEGER'));
        }
        $this->addVersionTable();
    }