feat: mark documents global

This commit is contained in:
Björn Fromme
2024-01-28 14:09:02 +01:00
parent bd3b3688c5
commit 79a4a8fef5
8 changed files with 105 additions and 15 deletions
+36
View File
@@ -0,0 +1,36 @@
<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20240128125138 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE upload ADD global TINYINT(1) NOT NULL');
}
public function postUp(Schema $schema): void
{
$this->connection->executeQuery('UPDATE upload SET global=0');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE upload DROP global');
}
}