forked from fecshop/yii2_fecshop
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7590725
commit 47c0c3b
Showing
1 changed file
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<?php | ||
|
||
use yii\db\Migration; | ||
|
||
/** | ||
* Class m200526_005347_fecshop_tables | ||
*/ | ||
class m200526_005347_fecshop_tables extends Migration | ||
{ | ||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function safeUp() | ||
{ | ||
$arr = [ | ||
" | ||
ALTER TABLE `customer` ADD `wx_micro_openid` VARCHAR( 200 ) NULL COMMENT '微信小程序openid' AFTER `wx_openid` | ||
", | ||
]; | ||
|
||
foreach ($arr as $sql) { | ||
$this->execute($sql); | ||
} | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function safeDown() | ||
{ | ||
echo "m200526_005347_fecshop_tables cannot be reverted.\n"; | ||
|
||
return false; | ||
} | ||
|
||
/* | ||
// Use up()/down() to run migration code without a transaction. | ||
public function up() | ||
{ | ||
} | ||
public function down() | ||
{ | ||
echo "m200526_005347_fecshop_tables cannot be reverted.\n"; | ||
return false; | ||
} | ||
*/ | ||
} |