Browse Source

Add change article problem_id in Problem.changeID()

pull/6/head
Menci 7 years ago
parent
commit
467bd6b5f1
  1. 1
      models/problem.js

1
models/problem.js

@ -599,6 +599,7 @@ class Problem extends Model {
await db.query('UPDATE `problem` SET `id` = ' + id + ' WHERE `id` = ' + this.id);
await db.query('UPDATE `judge_state` SET `problem_id` = ' + id + ' WHERE `problem_id` = ' + this.id);
await db.query('UPDATE `problem_tag_map` SET `problem_id` = ' + id + ' WHERE `problem_id` = ' + this.id);
await db.query('UPDATE `article` SET `problem_id` = ' + id + ' WHERE `problem_id` = ' + this.id);
let Contest = syzoj.model('contest');
let contests = await Contest.all();

Loading…
Cancel
Save