From 08b5c1c455ff72c0ca96d56296859c07372cdd00 Mon Sep 17 00:00:00 2001 From: stes Date: Thu, 31 Aug 2017 12:51:36 +0300 Subject: [PATCH] comments in admin --- migrations/m170831_094035_comment_add_foreogn_key.php | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+), 0 deletions(-) create mode 100644 migrations/m170831_094035_comment_add_foreogn_key.php diff --git a/migrations/m170831_094035_comment_add_foreogn_key.php b/migrations/m170831_094035_comment_add_foreogn_key.php new file mode 100644 index 0000000..f733911 --- /dev/null +++ b/migrations/m170831_094035_comment_add_foreogn_key.php @@ -0,0 +1,37 @@ +addForeignKey('comment_customer', + 'artbox_comment', + 'customer_id', + 'customer', + 'id', + 'CASCADE', + 'CASCADE'); + } + + public function safeDown() + { + $this->dropForeignKey('comment_customer', 'artbox_comment'); + } + + /* + // Use up()/down() to run migration code without a transaction. + public function up() + { + + } + + public function down() + { + echo "m170831_094035_comment_add_foreogn_key cannot be reverted.\n"; + + return false; + } + */ +} -- libgit2 0.21.4