Skip to content

Commit

Permalink
apps表增加状态字段 #3290
Browse files Browse the repository at this point in the history
  • Loading branch information
twinh committed Mar 21, 2017
1 parent 14ea1dc commit e1203e4
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions src/Migration/V20170321181010AddStatusToAppsTable.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php

namespace Miaoxing\App\Migration;

use Miaoxing\Plugin\BaseMigration;

class V20170321181010AddStatusToAppsTable extends BaseMigration
{
/**
* {@inheritdoc}
*/
public function up()
{
$this->schema->table('apps')
->tinyInt('status')->defaults(1)->after('industry')
->exec();
}

/**
* {@inheritdoc}
*/
public function down()
{
$this->schema->table('apps')
->dropColumn('status')
->exec();
}
}

0 comments on commit e1203e4

Please sign in to comment.