| @@ 8-32 (lines=25) @@ | ||
| 5 | /** |
|
| 6 | * Handles the creation of table `technologies`. |
|
| 7 | */ |
|
| 8 | class m180531_170328_create_technologies_table extends Migration |
|
| 9 | { |
|
| 10 | /** |
|
| 11 | * {@inheritdoc} |
|
| 12 | */ |
|
| 13 | public function safeUp() |
|
| 14 | { |
|
| 15 | $this->createTable('technologies', [ |
|
| 16 | 'id' => $this->primaryKey(), |
|
| 17 | 'name' => $this->string(64)->notNull(), |
|
| 18 | 'share' => $this->integer(3)->notNull(), |
|
| 19 | 'icon' => $this->string(64), |
|
| 20 | 'created_at' => $this->dateTime(), |
|
| 21 | 'updated_at' => $this->dateTime(), |
|
| 22 | ]); |
|
| 23 | } |
|
| 24 | ||
| 25 | /** |
|
| 26 | * {@inheritdoc} |
|
| 27 | */ |
|
| 28 | public function safeDown() |
|
| 29 | { |
|
| 30 | $this->dropTable('technologies'); |
|
| 31 | } |
|
| 32 | } |
|
| 33 | ||
| @@ 8-34 (lines=27) @@ | ||
| 5 | /** |
|
| 6 | * Handles the creation of table `qualities`. |
|
| 7 | */ |
|
| 8 | class m190220_013101_create_qualities_table extends Migration |
|
| 9 | { |
|
| 10 | /** |
|
| 11 | * {@inheritdoc} |
|
| 12 | */ |
|
| 13 | public function safeUp() |
|
| 14 | { |
|
| 15 | $this->createTable('qualities', |
|
| 16 | [ |
|
| 17 | 'id' => $this->primaryKey(), |
|
| 18 | 'title' => $this->string()->notNull(), |
|
| 19 | 'description' => $this->string(1024)->notNull(), |
|
| 20 | 'icon' => $this->string(64)->notNull(), |
|
| 21 | 'created_at' => $this->dateTime(), |
|
| 22 | 'updated_at' => $this->dateTime(), |
|
| 23 | ] |
|
| 24 | ); |
|
| 25 | } |
|
| 26 | ||
| 27 | /** |
|
| 28 | * {@inheritdoc} |
|
| 29 | */ |
|
| 30 | public function safeDown() |
|
| 31 | { |
|
| 32 | $this->dropTable('qualities'); |
|
| 33 | } |
|
| 34 | } |
|
| 35 | ||