You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This follows the legacy spec in:
https://icpc.io/problem-package-format/spec/legacy.html#graders
We might decided at a later point whether we want to support this or
just the new (currently draft) spec, but basic constructs of the change
should be the same.
Not yet implemented:
- any form of testing
- anything on the team interface
- shadowing
Part of #2518
// this up() migration is auto-generated, please modify it to your needs
23
+
$this->addSql('CREATE TABLE testcase_group (testcase_group_id INT UNSIGNED AUTO_INCREMENT NOT NULL COMMENT \'Testcase group ID\', name VARCHAR(255) NOT NULL COMMENT \'Name of the testcase group\', accept_score VARCHAR(255) DEFAULT NULL COMMENT \'Score if this group is accepted\', range_lower_bound VARCHAR(255) DEFAULT NULL COMMENT \'Lower bound of the score range\', range_upper_bound VARCHAR(255) DEFAULT NULL COMMENT \'Upper bound of the score range\', aggregation_type VARCHAR(255) DEFAULT \'sum\' NOT NULL COMMENT \'How to aggregate scores for this group\', ignore_sample TINYINT(1) DEFAULT 0 NOT NULL COMMENT \'Ignore the sample testcases when aggregating scores\', PRIMARY KEY(testcase_group_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'Testcase group metadata\'');
24
+
$this->addSql('ALTER TABLE testcase ADD testcase_group_id INT UNSIGNED DEFAULT NULL COMMENT \'Testcase group ID\'');
25
+
$this->addSql('ALTER TABLE testcase ADD CONSTRAINT FK_4C1E5C391FF421A3 FOREIGN KEY (testcase_group_id) REFERENCES testcase_group (testcase_group_id) ON DELETE SET NULL');
26
+
$this->addSql('CREATE INDEX IDX_4C1E5C391FF421A3 ON testcase (testcase_group_id)');
27
+
$this->addSql('ALTER TABLE judging_run ADD score NUMERIC(32, 9) DEFAULT \'0.000000000\' NOT NULL COMMENT \'Optional score for this run, e.g. for partial scoring\'');
28
+
$this->addSql('ALTER TABLE judging ADD score NUMERIC(32, 9) DEFAULT \'0.000000000\' NOT NULL COMMENT \'Optional score for this run, e.g. for partial scoring\'');
29
+
$this->addSql('ALTER TABLE testcase_group ADD parent_id INT UNSIGNED DEFAULT NULL COMMENT \'Testcase group ID\'');
30
+
$this->addSql('ALTER TABLE testcase_group ADD CONSTRAINT FK_F02888FE727ACA70 FOREIGN KEY (parent_id) REFERENCES testcase_group (testcase_group_id) ON DELETE SET NULL');
31
+
$this->addSql('CREATE INDEX IDX_F02888FE727ACA70 ON testcase_group (parent_id)');
32
+
$this->addSql('ALTER TABLE problem ADD parent_testcase_group_id INT UNSIGNED DEFAULT NULL COMMENT \'Testcase group ID\'');
33
+
$this->addSql('ALTER TABLE problem ADD CONSTRAINT FK_D7E7CCC8A090DCC7 FOREIGN KEY (parent_testcase_group_id) REFERENCES testcase_group (testcase_group_id) ON DELETE SET NULL');
34
+
$this->addSql('CREATE INDEX IDX_D7E7CCC8A090DCC7 ON problem (parent_testcase_group_id)');
$this->addSql('ALTER TABLE testcase_group ADD on_reject_continue TINYINT(1) DEFAULT 0 NOT NULL COMMENT \'Continue on reject\'');
37
+
$this->addSql('ALTER TABLE scorecache ADD score_public NUMERIC(32, 9) DEFAULT \'0.000000000\' NOT NULL COMMENT \'Optional score for this run, e.g. for partial scoring\', ADD score_restricted NUMERIC(32, 9) DEFAULT \'0.000000000\' NOT NULL COMMENT \'Optional score for this run, e.g. for partial scoring (for restricted audience)\'');
38
+
$this->addSql('ALTER TABLE rankcache ADD score_public NUMERIC(32, 9) DEFAULT \'0.000000000\' NOT NULL COMMENT \'Optional score for this run, e.g. for partial scoring\', ADD score_restricted NUMERIC(32, 9) DEFAULT \'0.000000000\' NOT NULL COMMENT \'Optional score for this run, e.g. for partial scoring (for restricted audience)\'');
39
+
}
40
+
41
+
publicfunctiondown(Schema$schema): void
42
+
{
43
+
// this down() migration is auto-generated, please modify it to your needs
44
+
$this->addSql('ALTER TABLE rankcache DROP score_public, DROP score_restricted');
45
+
$this->addSql('ALTER TABLE scorecache DROP score_public, DROP score_restricted');
46
+
$this->addSql('ALTER TABLE testcase_group DROP on_reject_continue');
47
+
$this->addSql('ALTER TABLE testcase_group DROP output_validator_flags');
48
+
$this->addSql('ALTER TABLE problem DROP FOREIGN KEY FK_D7E7CCC8A090DCC7');
49
+
$this->addSql('DROP INDEX IDX_D7E7CCC8A090DCC7 ON problem');
50
+
$this->addSql('ALTER TABLE problem DROP parent_testcase_group_id');
51
+
$this->addSql('ALTER TABLE testcase_group DROP FOREIGN KEY FK_F02888FE727ACA70');
52
+
$this->addSql('DROP INDEX IDX_F02888FE727ACA70 ON testcase_group');
53
+
$this->addSql('ALTER TABLE testcase_group DROP parent_id');
54
+
$this->addSql('ALTER TABLE judging DROP score');
55
+
$this->addSql('ALTER TABLE judging_run DROP score');
56
+
$this->addSql('ALTER TABLE testcase DROP FOREIGN KEY FK_4C1E5C391FF421A3');
57
+
$this->addSql('DROP TABLE testcase_group');
58
+
$this->addSql('DROP INDEX IDX_4C1E5C391FF421A3 ON testcase');
59
+
$this->addSql('ALTER TABLE testcase DROP testcase_group_id');
0 commit comments