| 1 | <?php |
||
| 6 | use yii\db\Schema; |
||
| 7 | |||
| 8 | class m170126_000001_alter_audit_mail extends Migration |
||
| 9 | { |
||
| 10 | const TABLE = '{{%audit_mail}}'; |
||
| 11 | |||
| 12 | public function up() |
||
| 13 | { |
||
| 14 | if ($this->db->driverName === 'mysql') { |
||
| 15 | $this->alterColumn(self::TABLE, 'data', 'LONGBLOB'); |
||
| 16 | } elseif ($this->db->driverName === 'sqlsrv') { |
||
| 17 | $this->alterColumn(self::TABLE, 'data', 'VARBINARY(MAX)'); |
||
| 18 | } else { |
||
| 19 | $this->alterColumn(self::TABLE, 'data', 'BYTEA'); |
||
| 20 | } |
||
| 21 | } |
||
| 23 |