linyaostalker
5 years ago
5 changed files with 6 additions and 118 deletions
-
43vendor/antgoods/goods/src/migrations/m191202_025843_update_column_sort_order_in_antgoods_attribute.php
-
43vendor/antgoods/goods/src/migrations/m191202_032835_update_column_sort_order_in_antgoods_category.php
-
16vendor/antgoods/goods/src/models/ars/Attribute.php
-
16vendor/antgoods/goods/src/models/ars/Category.php
-
6vendor/antgoods/goods/src/views/goods/goods.php
@ -1,43 +0,0 @@ |
|||
<?php |
|||
|
|||
use yii\db\Migration; |
|||
|
|||
/** |
|||
* Class m191202_025843_update_column_sort_order_in_antgoods_attribute |
|||
*/ |
|||
class m191202_025843_update_column_sort_order_in_antgoods_attribute extends Migration |
|||
{ |
|||
/** |
|||
* {@inheritdoc} |
|||
*/ |
|||
public function safeUp() |
|||
{ |
|||
$this->dropColumn('antgoods_attribute', 'sort_order'); |
|||
$this->addColumn('antgoods_attribute', 'sort_order', $this->smallInteger(3)->defaultValue(null)->unsigned()->comment('排序')); |
|||
} |
|||
|
|||
/** |
|||
* {@inheritdoc} |
|||
*/ |
|||
public function safeDown() |
|||
{ |
|||
$this->dropColumn('antgoods_attribute', 'sort_order'); |
|||
$this->addColumn('antgoods_attribute', 'sort_order', $this->smallInteger(3)->defaultValue(null)->comment('排序')); |
|||
return true; |
|||
} |
|||
|
|||
/* |
|||
// Use up()/down() to run migration code without a transaction.
|
|||
public function up() |
|||
{ |
|||
|
|||
} |
|||
|
|||
public function down() |
|||
{ |
|||
echo "m191202_025843_update_column_sort_order_in_antgoods_attribute cannot be reverted.\n"; |
|||
|
|||
return false; |
|||
} |
|||
*/ |
|||
} |
@ -1,43 +0,0 @@ |
|||
<?php |
|||
|
|||
use yii\db\Migration; |
|||
|
|||
/** |
|||
* Class m191202_032835_update_column_sort_order_in_antgoods_category |
|||
*/ |
|||
class m191202_032835_update_column_sort_order_in_antgoods_category extends Migration |
|||
{ |
|||
/** |
|||
* {@inheritdoc} |
|||
*/ |
|||
public function safeUp() |
|||
{ |
|||
$this->dropColumn('antgoods_category', 'sort_order'); |
|||
$this->addColumn('antgoods_category', 'sort_order', $this->smallInteger(3)->defaultValue(0)->comment('排序')); |
|||
} |
|||
|
|||
/** |
|||
* {@inheritdoc} |
|||
*/ |
|||
public function safeDown() |
|||
{ |
|||
$this->dropColumn('antgoods_category', 'sort_order'); |
|||
$this->addColumn('antgoods_category', 'sort_order', $this->smallInteger(3)->unsigned()->defaultValue(0)->comment('排序')); |
|||
return true; |
|||
} |
|||
|
|||
/* |
|||
// Use up()/down() to run migration code without a transaction.
|
|||
public function up() |
|||
{ |
|||
|
|||
} |
|||
|
|||
public function down() |
|||
{ |
|||
echo "m191202_032835_update_column_sort_order_in_antgoods_category cannot be reverted.\n"; |
|||
|
|||
return false; |
|||
} |
|||
*/ |
|||
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue