@@ -132,9 +132,9 @@ |
||
| 132 | 132 | } |
| 133 | 133 | |
| 134 | 134 | // If unserialize failed, try to fix and retry |
| 135 | - $callback = function ($matches) { |
|
| 135 | + $callback = function($matches) { |
|
| 136 | 136 | $matches[2] = trim(preg_replace('/\s\s+/', ' ', $matches[2])); |
| 137 | - return 's:' . mb_strlen($matches[2]) . ':"' . $matches[2] . '";'; |
|
| 137 | + return 's:'.mb_strlen($matches[2]).':"'.$matches[2].'";'; |
|
| 138 | 138 | }; |
| 139 | 139 | |
| 140 | 140 | $data = preg_replace_callback('!s:(\d+):"(.*?)";!s', $callback, $data); |
@@ -35,7 +35,7 @@ |
||
| 35 | 35 | 'Migration can only be executed safely on \'postgresql\'.' |
| 36 | 36 | ); |
| 37 | 37 | |
| 38 | - if (!$schema->hasTable('swp_article_extra')) { |
|
| 38 | + if (!$schema->hasTable('swp_article_extra')) { |
|
| 39 | 39 | $this->addSql('CREATE SEQUENCE swp_article_extra_id_seq INCREMENT BY 1 MINVALUE 1 START WITH 1'); |
| 40 | 40 | $this->addSql( |
| 41 | 41 | 'CREATE TABLE swp_article_extra (id INT NOT NULL DEFAULT nextval(\'swp_article_extra_id_seq\'), article_id INT DEFAULT NULL, field_name VARCHAR(255) NOT NULL, discr VARCHAR(255) NOT NULL, value VARCHAR(255) DEFAULT NULL, embed VARCHAR(255) DEFAULT NULL, description VARCHAR(255) DEFAULT NULL, PRIMARY KEY(id))' |