Skip to content

Commit

Permalink
Closed #1: Added DB Migration
Browse files Browse the repository at this point in the history
  • Loading branch information
Evgeniy Filipyev committed Sep 25, 2015
1 parent 033780f commit bbcfa47
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Database Migration/createTable.sublime-snippet
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
<snippet>
<content><![CDATA[
\$this->createTable('{{%${1:table}}}', [
${1:\$tableOptions = null;
if (\$this->db->driverName === 'mysql') {
// http://stackoverflow.com/questions/766809/whats-the-difference-between-utf8-general-ci-and-utf8-unicode-ci
\$tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB';
}
}
\$this->createTable('{{%${2:table}}}', [
'id' => \$this->primaryKey(),
${2://columns}
${3://columns}
'created_at' => \$this->integer()->notNull(),
'updated_at' => \$this->integer()->notNull(),
], \$tableOptions);
Expand Down

3 comments on commit bbcfa47

@liuyongfei1
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

顶一个

@liuyongfei1
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm using,thank you!
Tips:At the prompt you can display parameters of the method?

@liuyongfei1
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

example:
now:

but,I think the best is like this:

After entering the ':: checkbox'.
The expression may not be cleare...

Please sign in to comment.