Conditions | 1 |
Paths | 1 |
Total Lines | 18 |
Code Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
13 | public function safeUp() |
||
14 | { |
||
15 | $this->createTable('{{%recurrence}}', [ |
||
16 | 'id' => $this->primaryKey(), |
||
17 | 'user_id' => $this->integer()->notNull(), |
||
18 | 'name' => $this->string()->notNull(), |
||
19 | 'frequency' => $this->tinyInteger()->notNull(), |
||
20 | 'interval' => $this->tinyInteger()->defaultValue(1), |
||
21 | 'schedule' => $this->string(), |
||
22 | 'transaction_id' => $this->integer()->notNull(), |
||
23 | 'started_at' => $this->timestamp()->defaultValue(null), |
||
24 | 'execution_date' => $this->timestamp()->defaultValue(null), |
||
25 | 'status' => $this->tinyInteger()->defaultValue(1), |
||
26 | 'created_at' => $this->timestamp()->defaultValue(null), |
||
27 | 'updated_at' => $this->timestamp()->defaultValue(null), |
||
28 | ]); |
||
29 | |||
30 | $this->createIndex('record_user_id_transaction_id', '{{%recurrence}}', ['user_id', 'transaction_id']); |
||
31 | } |
||
41 |