Skip to content
Snippets Groups Projects
Commit bf2d1865 authored by Jonathan Foucher's avatar Jonathan Foucher
Browse files

migration fix for truncating column data.

parent 19ca406a
No related branches found
No related tags found
Loading
Pipeline #86226 passed
......@@ -31,7 +31,7 @@ final class Version20241024150227 extends AbstractMigration
$this->addSql('CREATE INDEX IDX_5982E8EDED5CA9E6 ON registry_proof (service_id)');
$this->addSql('ALTER TABLE tool_proof DROP PRIMARY KEY');
$this->addSql('ALTER TABLE tool_proof ADD PRIMARY KEY (proof_id, tool_id)');
$this->addSql('ALTER TABLE registry_tool ADD service_id CHAR(36) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', CHANGE archival_comment archival_comment VARCHAR(255) DEFAULT NULL, CHANGE encrypted_comment encrypted_comment VARCHAR(255) DEFAULT NULL, CHANGE access_control_comment access_control_comment VARCHAR(255) DEFAULT NULL, CHANGE updating_comment updating_comment VARCHAR(255) DEFAULT NULL, CHANGE backup_comment backup_comment VARCHAR(255) DEFAULT NULL, CHANGE deletion_comment deletion_comment VARCHAR(255) DEFAULT NULL, CHANGE tracking_comment tracking_comment VARCHAR(255) DEFAULT NULL, CHANGE has_comment_comment has_comment_comment VARCHAR(255) DEFAULT NULL, CHANGE other_comment other_comment VARCHAR(255) DEFAULT NULL');
$this->addSql('ALTER TABLE registry_tool ADD service_id CHAR(36) DEFAULT NULL COMMENT \'(DC2Type:uuid)\'');
$this->addSql('ALTER TABLE registry_tool ADD CONSTRAINT FK_3C2A7CF2ED5CA9E6 FOREIGN KEY (service_id) REFERENCES registry_service (id) ON DELETE SET NULL');
$this->addSql('CREATE INDEX IDX_3C2A7CF2ED5CA9E6 ON registry_tool (service_id)');
}
......@@ -48,6 +48,6 @@ final class Version20241024150227 extends AbstractMigration
$this->addSql('ALTER TABLE registry_proof DROP service_id');
$this->addSql('ALTER TABLE registry_tool DROP FOREIGN KEY FK_3C2A7CF2ED5CA9E6');
$this->addSql('DROP INDEX IDX_3C2A7CF2ED5CA9E6 ON registry_tool');
$this->addSql('ALTER TABLE registry_tool DROP service_id, CHANGE archival_comment archival_comment VARCHAR(500) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE encrypted_comment encrypted_comment VARCHAR(500) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE access_control_comment access_control_comment VARCHAR(500) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE updating_comment updating_comment VARCHAR(500) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE backup_comment backup_comment VARCHAR(500) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE deletion_comment deletion_comment VARCHAR(500) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE tracking_comment tracking_comment VARCHAR(500) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE has_comment_comment has_comment_comment VARCHAR(500) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE other_comment other_comment VARCHAR(500) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`');
$this->addSql('ALTER TABLE registry_tool DROP service_id');
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment