-
Notifications
You must be signed in to change notification settings - Fork 256
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<?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 Version20230903101007 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 external_contest_source ADD last_httpcode SMALLINT UNSIGNED DEFAULT NULL COMMENT \'Last HTTP code received by event feed reader\''); | ||
$this->addSql('ALTER TABLE language DROP compiler_command, DROP runner_command, DROP compiler_command_args, DROP runner_command_args'); | ||
$this->addSql('ALTER TABLE queuetask DROP FOREIGN KEY FK_45E85FF85D5FEA72'); | ||
$this->addSql('ALTER TABLE queuetask CHANGE judgingid judgingid INT UNSIGNED DEFAULT NULL COMMENT \'Judging ID\''); | ||
$this->addSql('DROP INDEX jobid ON queuetask'); | ||
$this->addSql('CREATE INDEX judgingid ON queuetask (judgingid)'); | ||
$this->addSql('ALTER TABLE queuetask ADD CONSTRAINT FK_45E85FF85D5FEA72 FOREIGN KEY (judgingid) REFERENCES judging (judgingid) ON DELETE CASCADE'); | ||
$this->addSql('ALTER TABLE submission CHANGE import_error import_error VARCHAR(255) DEFAULT NULL COMMENT \'The error message for submissions which got an error during shadow importing.\''); | ||
} | ||
|
||
public function down(Schema $schema): void | ||
{ | ||
// this down() migration is auto-generated, please modify it to your needs | ||
$this->addSql('ALTER TABLE language ADD compiler_command VARCHAR(255) DEFAULT NULL COMMENT \'Compiler command\', ADD runner_command VARCHAR(255) DEFAULT NULL COMMENT \'Runner command\', ADD compiler_command_args VARCHAR(255) DEFAULT NULL COMMENT \'Compiler command arguments\', ADD runner_command_args VARCHAR(255) DEFAULT NULL COMMENT \'Runner command arguments\''); | ||
$this->addSql('ALTER TABLE queuetask DROP FOREIGN KEY FK_45E85FF85D5FEA72'); | ||
$this->addSql('ALTER TABLE queuetask CHANGE judgingid judgingid INT UNSIGNED DEFAULT NULL COMMENT \'All queuetasks with the same jobid belong together.\''); | ||
$this->addSql('DROP INDEX judgingid ON queuetask'); | ||
$this->addSql('CREATE INDEX jobid ON queuetask (judgingid)'); | ||
$this->addSql('ALTER TABLE queuetask ADD CONSTRAINT FK_45E85FF85D5FEA72 FOREIGN KEY (judgingid) REFERENCES judging (judgingid) ON DELETE CASCADE'); | ||
$this->addSql('ALTER TABLE external_contest_source DROP last_httpcode'); | ||
$this->addSql('ALTER TABLE submission CHANGE import_error import_error VARCHAR(255) DEFAULT NULL COMMENT \'If this submission was imported during shadowing but had an error while doing so, the error message.\''); | ||
} | ||
|
||
public function isTransactional(): bool | ||
{ | ||
return false; | ||
} | ||
} |