First commit
This commit is contained in:
32
Setup.php
Normal file
32
Setup.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?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']);
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user