-
Notifications
You must be signed in to change notification settings - Fork 0
/
Setup.php
43 lines (36 loc) · 1 KB
/
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
38
39
40
41
42
43
<?php
namespace Truonglv\UserGroupWidget;
use XF\Db\Schema\Create;
use XF\AddOn\AbstractSetup;
use XF\AddOn\StepRunnerInstallTrait;
use XF\AddOn\StepRunnerUpgradeTrait;
use XF\AddOn\StepRunnerUninstallTrait;
use Truonglv\UserGroupWidget\DevHelper\SetupTrait;
class Setup extends AbstractSetup
{
use SetupTrait;
use StepRunnerInstallTrait;
use StepRunnerUpgradeTrait;
use StepRunnerUninstallTrait;
public function installStep1(): void
{
$this->doCreateTables($this->getTables());
}
public function uninstallStep1(): void
{
$this->doDropTables($this->getTables());
}
public function upgrade2000200Step1(): void
{
$this->doCreateTables($this->getTables1());
}
public function getTables1(): array
{
return [
'xf_ugw_user' => function (Create $table) {
$table->addColumn('user_id', 'int')->primaryKey();
$table->addColumn('profile_url', 'varchar', 255);
},
];
}
}