From 9909ec2ad3301430ba970fc66bec05dffba95488 Mon Sep 17 00:00:00 2001 From: Angel Fernando Quiroz Campos Date: Mon, 8 Aug 2016 12:08:32 -0500 Subject: [PATCH] Set null to post_parent_id when it is 0 on c_forum_post table - refs #11477 --- .../Schema/V110/Version20160808110200.php | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 app/Migrations/Schema/V110/Version20160808110200.php diff --git a/app/Migrations/Schema/V110/Version20160808110200.php b/app/Migrations/Schema/V110/Version20160808110200.php new file mode 100644 index 0000000000..6182987a12 --- /dev/null +++ b/app/Migrations/Schema/V110/Version20160808110200.php @@ -0,0 +1,29 @@ +addSql("UPDATE c_forum_post SET post_parent_id = NULL WHERE post_parent_id = 0"); + } + + /** + * @param Schema $schema + */ + public function down(Schema $schema) + { + $this->addSql('UPDATE c_forum_post SET post_parent_id = 0 WHERE post_parent_id = NULL'); + } +}