Work, work, work~~~
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
<?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 Version20241210084313 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('DROP INDEX uniq_1f1b251ed17f50a6');
|
||||
$this->addSql('ALTER TABLE item DROP uuid');
|
||||
$this->addSql('CREATE SEQUENCE item_id_seq');
|
||||
$this->addSql('SELECT setval(\'item_id_seq\', (SELECT MAX(id) FROM item))');
|
||||
$this->addSql('ALTER TABLE item ALTER id SET DEFAULT nextval(\'item_id_seq\')');
|
||||
$this->addSql('CREATE UNIQUE INDEX UNIQ_1F1B251EDA27C6FE ON item (aonprd_id)');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('CREATE SCHEMA public');
|
||||
$this->addSql('DROP INDEX UNIQ_1F1B251EDA27C6FE');
|
||||
$this->addSql('ALTER TABLE item ADD uuid UUID NOT NULL');
|
||||
$this->addSql('ALTER TABLE item ALTER id DROP DEFAULT');
|
||||
$this->addSql('COMMENT ON COLUMN item.uuid IS \'(DC2Type:uuid)\'');
|
||||
$this->addSql('CREATE UNIQUE INDEX uniq_1f1b251ed17f50a6 ON item (uuid)');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user