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
return'Add option to restrict a problem to a set of languages.';
18
+
}
19
+
20
+
publicfunctionup(Schema$schema): void
21
+
{
22
+
// this up() migration is auto-generated, please modify it to your needs
23
+
$this->addSql('CREATE TABLE problemlanguage (probid INT UNSIGNED NOT NULL COMMENT \'Problem ID\', langid VARCHAR(32) NOT NULL COMMENT \'Language ID (string)\', INDEX IDX_46B150BBEF049279 (probid), INDEX IDX_46B150BB2271845 (langid), PRIMARY KEY(probid, langid)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
24
+
$this->addSql('ALTER TABLE problemlanguage ADD CONSTRAINT FK_46B150BBEF049279 FOREIGN KEY (probid) REFERENCES problem (probid) ON DELETE CASCADE');
25
+
$this->addSql('ALTER TABLE problemlanguage ADD CONSTRAINT FK_46B150BB2271845 FOREIGN KEY (langid) REFERENCES language (langid) ON DELETE CASCADE');
26
+
}
27
+
28
+
publicfunctiondown(Schema$schema): void
29
+
{
30
+
// this down() migration is auto-generated, please modify it to your needs
31
+
$this->addSql('ALTER TABLE problemlanguage DROP FOREIGN KEY FK_46B150BBEF049279');
32
+
$this->addSql('ALTER TABLE problemlanguage DROP FOREIGN KEY FK_46B150BB2271845');
0 commit comments