Improve ACP forum management UI
This commit is contained in:
27
api/migrations/Version20251224154500.php
Normal file
27
api/migrations/Version20251224154500.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
final class Version20251224154500 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return 'Add forum position for per-parent ordering.';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
$this->addSql('ALTER TABLE forum ADD position INT NOT NULL');
|
||||
$this->addSql('UPDATE forum SET position = id');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
$this->addSql('ALTER TABLE forum DROP position');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user