public function installStep1()
{
$sm = $this->schemaManager();
foreach ($this->getTables() as $tableName => $callback)
{
$sm->createTable($tableName, $callback);
$sm->alterTable($tableName, $callback);
}
}
public function upgrade2000000Step1()
{
$this->installStep1();
}
public function uninstallStep1()
{
$sm = $this->schemaManager();
foreach ($this->getTables() as $tableName => $callback)
{
$sm->dropTable($tableName);
}
}
protected function getTables()
{
$tables = [];
$tables['xf_sv_unc_cron'] = function ($table) {
/** @var Create|Alter $table */
$this->addOrChangeColumn($table, 'user_id', 'int');
$this->addOrChangeColumn($table, 'date', 'int');
$this->addOrChangeColumn($table, 'old_custom_title', 'varchar', 50)->setDefault('');
$this->addOrChangeColumn($table, 'new_custom_title', 'varchar', 50)->setDefault('');
$table->addPrimaryKey('user_id');
};
return $tables;
}