-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSetup.php
37 lines (32 loc) · 864 Bytes
/
Setup.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
/**
* License key: %LICENSEKEY%
* Product: %PRODUCT% -- %VERSION%
* Downloaded at: %TIME%
*/
namespace TC\PPO;
use XF\AddOn\AbstractSetup;
use XF\AddOn\StepRunnerInstallTrait;
use XF\AddOn\StepRunnerUninstallTrait;
use XF\AddOn\StepRunnerUpgradeTrait;
use XF\Db\Schema\Alter;
class Setup extends AbstractSetup
{
use StepRunnerInstallTrait;
use StepRunnerUpgradeTrait;
use StepRunnerUninstallTrait;
public function installStep1()
{
$this->schemaManager()->alterTable('xf_payment_profile', function (Alter $table)
{
$table->addColumn('display_order', 'int')->setDefault(0);
});
}
public function uninstallStep1()
{
$this->schemaManager()->alterTable('xf_payment_profile', function (Alter $table)
{
$table->dropColumns('display_order');
});
}
}