Skip to content

Commit

Permalink
增加album建表语句和category依赖 #2951
Browse files Browse the repository at this point in the history
  • Loading branch information
twinh committed Feb 28, 2017
1 parent ac659d6 commit 22fb8ba
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
],
"license": "MIT",
"require": {
"miaoxing/app": "dev-master@dev"
"miaoxing/app": "dev-master@dev",
"miaoxing/category": "dev-master@dev"
},
"autoload": {
"psr-4": {
Expand Down
34 changes: 34 additions & 0 deletions src/Migration/V20170228172435CreateAlbumTable.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?php

namespace Miaoxing\Photo\Migration;

use Miaoxing\Plugin\BaseMigration;

class V20170228172435CreateAlbumTable extends BaseMigration
{
/**
* {@inheritdoc}
*/
public function up()
{
$this->schema->table('album')
->id()
->string('class')
->string('image')
->string('description')
->text('linkTo')
->int('sort')
->bool('enable')
->timestamp('createTime')
->timestamp('updateTime')
->exec();
}

/**
* {@inheritdoc}
*/
public function down()
{
$this->schema->dropIfExists('album');
}
}

0 comments on commit 22fb8ba

Please sign in to comment.