Total Complexity | 2 |
Total Lines | 27 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
8 | class m200730_082622_create_currency_rate_table extends Migration |
||
9 | { |
||
10 | /** |
||
11 | * {@inheritdoc} |
||
12 | */ |
||
13 | public function safeUp() |
||
14 | { |
||
15 | $this->createTable('{{%currency_rate}}', [ |
||
16 | 'id' => $this->primaryKey(), |
||
17 | 'user_id' => $this->integer()->notNull(), |
||
18 | 'currency_code' => $this->string(3)->notNull(), |
||
19 | 'currency_name' => $this->string(60)->notNull(), |
||
20 | 'rate' => $this->bigInteger(), |
||
21 | 'status' => $this->tinyInteger()->defaultValue(1), |
||
22 | 'created_at' => $this->timestamp()->defaultValue(null), |
||
23 | 'updated_at' => $this->timestamp()->defaultValue(null), |
||
24 | ]); |
||
25 | |||
26 | $this->createIndex('currency_rate_user_id', '{{%currency_rate}}', 'user_id'); |
||
27 | } |
||
28 | |||
29 | /** |
||
30 | * {@inheritdoc} |
||
31 | */ |
||
32 | public function safeDown() |
||
35 | } |
||
36 | } |
||
37 |