Skip to content

Commit bb771de

Browse files
committed
Added migration for package avoiding
1 parent a0562a3 commit bb771de

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

Diff for: src/migrations/m170424_144100_package_avoiding.php

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?php
2+
3+
namespace hiqdev\assetpackagist\migrations;
4+
5+
use yii\db\Migration;
6+
7+
/**
8+
* Migration for packages avoiding
9+
*
10+
* @author Dmytro Naumenko <d.naumenko.a@gmail.com>
11+
*/
12+
class m170424_144100_package_avoiding extends Migration
13+
{
14+
public function up()
15+
{
16+
$this->addColumn('package', 'is_avoided', $this->boolean()->defaultExpression('false'));
17+
18+
$this->createIndex('package-is_avoided-idx', 'package', 'is_avoided');
19+
}
20+
21+
public function down()
22+
{
23+
$this->dropColumn('package', 'is_avoided');
24+
}
25+
}

0 commit comments

Comments
 (0)