Skip to content

Commit

Permalink
add customer columns
Browse files Browse the repository at this point in the history
  • Loading branch information
fancyecommerce committed May 26, 2020
1 parent 7590725 commit 47c0c3b
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions migrations/mysqldb/m200526_005347_fecshop_tables.php
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;
}
*/
}

0 comments on commit 47c0c3b

Please sign in to comment.