From f7d9fb4f6386cbe56f5d7f52d761eaf1e90fe02a Mon Sep 17 00:00:00 2001 From: levani Date: Tue, 17 Apr 2018 19:07:01 +0400 Subject: [PATCH] Add new migration add_path_mobile_column_to_widget_carousel_item . --- ..._mobile_column_to_widget_carousel_item.php | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 migrations/m180416_120424_add_path_mobile_column_to_widget_carousel_item.php diff --git a/migrations/m180416_120424_add_path_mobile_column_to_widget_carousel_item.php b/migrations/m180416_120424_add_path_mobile_column_to_widget_carousel_item.php new file mode 100644 index 0000000..07a0ab0 --- /dev/null +++ b/migrations/m180416_120424_add_path_mobile_column_to_widget_carousel_item.php @@ -0,0 +1,40 @@ +addColumn('{{%widget_carousel_item}}', 'path_mobile', $this->text()); + } + + /** + * @inheritdoc + */ + public function safeDown() + { + $this->dropColumn( '{{%widget_carousel_item}}', 'path_mobile'); + } + + /* + // Use up()/down() to run migration code without a transaction. + public function up() + { + + } + + public function down() + { + echo "m180416_120424_add_path_mobile_column_to_widget_carousel_item cannot be reverted.\n"; + + return false; + } + */ +}