Conditions | 3 |
Paths | 2 |
Total Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
10 | const TABLE = '{{%audit_data}}'; |
||
11 | |||
12 | public function up() |
||
13 | { |
||
14 | $this->createTable(self::TABLE, [ |
||
15 | 'id' => Schema::TYPE_PK, |
||
16 | 'entry_id' => Schema::TYPE_INTEGER . ' NOT NULL', |
||
17 | 'type' => Schema::TYPE_STRING . '(255) NOT NULL', |
||
18 | 'data' => Schema::TYPE_BINARY, |
||
19 | ], ($this->db->driverName === 'mysql' ? 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB' : null)); |
||
20 | |||
21 | if ($this->db->driverName != 'sqlite') { |
||
22 | $this->addForeignKey('fk_audit_data_entry_id', self::TABLE, ['entry_id'], '{{%audit_entry}}', 'id'); |
||
23 | } |
||
34 |