added new useredit page
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
|
||||
final class CreateUserPermissionTemplate extends AbstractMigration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
if ($this->getEnvironment() == "thetool") {
|
||||
if (!$this->hasTable('UserPermissionTemplate')) {
|
||||
$table = $this->table('UserPermissionTemplate', ['id' => false, 'primary_key' => ['id']]);
|
||||
$table->addColumn('id', 'integer', ['identity' => true, 'signed' => false])
|
||||
->addColumn('name', 'string', ['limit' => 255, 'null' => false])
|
||||
->addColumn('permissions', 'text', ['null' => false])
|
||||
->addColumn('create', 'integer', ['null' => false])
|
||||
->addColumn('createBy', 'integer', ['null' => false])
|
||||
->addIndex(['name'], ['unique' => true])
|
||||
->create();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
if ($this->getEnvironment() == "thetool") {
|
||||
if ($this->hasTable('UserPermissionTemplate')) {
|
||||
$this->table('UserPermissionTemplate')->drop()->save();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user