32 lines
753 B
PHP
32 lines
753 B
PHP
<?php
|
|
|
|
namespace RomhackPlaza\Master;
|
|
|
|
use XF\AddOn\AbstractSetup;
|
|
use XF\AddOn\StepRunnerInstallTrait;
|
|
use XF\AddOn\StepRunnerUninstallTrait;
|
|
use XF\AddOn\StepRunnerUpgradeTrait;
|
|
|
|
class Setup extends AbstractSetup
|
|
{
|
|
use StepRunnerInstallTrait;
|
|
use StepRunnerUpgradeTrait;
|
|
use StepRunnerUninstallTrait;
|
|
|
|
/**
|
|
* Create Database xf_user new fields.
|
|
*/
|
|
public function installStep1(): void
|
|
{
|
|
$this->schemaManager()->alterTable('xf_user', function (\XF\Db\Schema\Alter $table) {
|
|
$table->addColumn('rhpz_entry_count', 'int')->setDefault(0);
|
|
});
|
|
}
|
|
|
|
public function uninstallStep1(): void
|
|
{
|
|
$this->schemaManager()->alterTable('xf_user', function($table) {
|
|
$table->dropColumns(['rhpz_entry_count']);
|
|
});
|
|
}
|
|
} |