add skill and position
This commit is contained in:
33
console/migrations/m181012_082916_create_position_table.php
Normal file
33
console/migrations/m181012_082916_create_position_table.php
Normal file
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
use yii\db\Migration;
|
||||
|
||||
/**
|
||||
* Handles the creation of table `position`.
|
||||
*/
|
||||
class m181012_082916_create_position_table extends Migration
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function safeUp()
|
||||
{
|
||||
$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('position', [
|
||||
'id' => $this->primaryKey(),
|
||||
'name' => $this->string(100)->notNull(),
|
||||
], $tableOptions);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function safeDown()
|
||||
{
|
||||
$this->dropTable('position');
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user