mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
temporary stored object fixes
This commit is contained in:
@@ -16,15 +16,15 @@ final class Version20210928182542 extends AbstractMigration
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE chill_doc.stored_object ADD uuid UUID NOT NULL');
|
||||
$this->addSql('CREATE EXTENSION IF NOT EXISTS "uuid-ossp"');
|
||||
$this->addSql('ALTER TABLE chill_doc.stored_object ADD uuid UUID DEFAULT NULL');
|
||||
$this->addSql('UPDATE chill_doc.stored_object SET uuid=uuid_generate_v4()');
|
||||
$this->addSql('ALTER TABLE chill_doc.stored_object ALTER uuid SET NOT NULL');
|
||||
$this->addSql('CREATE UNIQUE INDEX UNIQ_49604E36D17F50A6 ON chill_doc.stored_object (uuid)');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('DROP INDEX UNIQ_49604E36D17F50A6');
|
||||
$this->addSql('ALTER TABLE chill_doc.stored_object DROP uuid');
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user