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