|
|
|
|
|
|
|
|
]); |
|
|
]); |
|
|
$table->setPrimaryKey(['id']); |
|
|
$table->setPrimaryKey(['id']); |
|
|
$table->addIndex(['class'], 'job_class_index'); |
|
|
$table->addIndex(['class'], 'job_class_index'); |
|
|
} else { |
|
|
|
|
|
$table = $schema->getTable('jobs'); |
|
|
|
|
|
$table->changeColumn('execution_duration', [ |
|
|
|
|
|
'notnull' => true, |
|
|
|
|
|
'default' => 0, |
|
|
|
|
|
]); |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (!$schema->hasTable('users')) { |
|
|
if (!$schema->hasTable('users')) { |
|
|
|
|
|
|
|
|
'default' => '', |
|
|
'default' => '', |
|
|
]); |
|
|
]); |
|
|
$table->addColumn('type', 'smallint', [ |
|
|
$table->addColumn('type', 'smallint', [ |
|
|
'notnull' => true, |
|
|
|
|
|
|
|
|
'notnull' => false, |
|
|
'length' => 2, |
|
|
'length' => 2, |
|
|
'default' => 0, |
|
|
'default' => 0, |
|
|
'unsigned' => true, |
|
|
'unsigned' => true, |
|
|
]); |
|
|
]); |
|
|
$table->addColumn('remember', 'smallint', [ |
|
|
$table->addColumn('remember', 'smallint', [ |
|
|
'notnull' => true, |
|
|
|
|
|
|
|
|
'notnull' => false, |
|
|
'length' => 1, |
|
|
'length' => 1, |
|
|
'default' => 0, |
|
|
'default' => 0, |
|
|
'unsigned' => true, |
|
|
'unsigned' => true, |
|
|
]); |
|
|
]); |
|
|
$table->addColumn('last_activity', 'integer', [ |
|
|
$table->addColumn('last_activity', 'integer', [ |
|
|
'notnull' => true, |
|
|
|
|
|
|
|
|
'notnull' => false, |
|
|
'length' => 4, |
|
|
'length' => 4, |
|
|
'default' => 0, |
|
|
'default' => 0, |
|
|
'unsigned' => true, |
|
|
'unsigned' => true, |
|
|
]); |
|
|
]); |
|
|
$table->addColumn('last_check', 'integer', [ |
|
|
$table->addColumn('last_check', 'integer', [ |
|
|
'notnull' => true, |
|
|
|
|
|
|
|
|
'notnull' => false, |
|
|
'length' => 4, |
|
|
'length' => 4, |
|
|
'default' => 0, |
|
|
'default' => 0, |
|
|
'unsigned' => true, |
|
|
'unsigned' => true, |