added new useredit page

This commit is contained in:
2025-09-09 12:40:34 +02:00
parent 6fd3f3c6c0
commit 8abf7444f3
8 changed files with 936 additions and 1 deletions

View File

@@ -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();
}
}
}
}