diff options
author | Jeremy Benoist <jeremy.benoist@gmail.com> | 2017-10-09 16:47:15 +0200 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2017-10-09 16:47:15 +0200 |
commit | 3ef055ced3d6ea0d2f15ba660602545f477e9c3c (patch) | |
tree | 800dfcf6cd276650cfc6626d641e4fbf65a0bb68 /app/DoctrineMigrations | |
parent | f40c88eb1fa349aab600f9c1c94364f317fe62dd (diff) | |
download | wallabag-3ef055ced3d6ea0d2f15ba660602545f477e9c3c.tar.gz wallabag-3ef055ced3d6ea0d2f15ba660602545f477e9c3c.tar.zst wallabag-3ef055ced3d6ea0d2f15ba660602545f477e9c3c.zip |
CS
Diffstat (limited to 'app/DoctrineMigrations')
5 files changed, 7 insertions, 7 deletions
diff --git a/app/DoctrineMigrations/Version20161001072726.php b/app/DoctrineMigrations/Version20161001072726.php index 4babe172..f9d088a3 100644 --- a/app/DoctrineMigrations/Version20161001072726.php +++ b/app/DoctrineMigrations/Version20161001072726.php | |||
@@ -28,7 +28,7 @@ class Version20161001072726 extends AbstractMigration implements ContainerAwareI | |||
28 | */ | 28 | */ |
29 | public function up(Schema $schema) | 29 | public function up(Schema $schema) |
30 | { | 30 | { |
31 | $this->skipIf($this->connection->getDatabasePlatform()->getName() === 'sqlite', 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.'); | 31 | $this->skipIf('sqlite' === $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.'); |
32 | 32 | ||
33 | // remove all FK from entry_tag | 33 | // remove all FK from entry_tag |
34 | switch ($this->connection->getDatabasePlatform()->getName()) { | 34 | switch ($this->connection->getDatabasePlatform()->getName()) { |
diff --git a/app/DoctrineMigrations/Version20161022134138.php b/app/DoctrineMigrations/Version20161022134138.php index 89ba9973..c84f8fbb 100644 --- a/app/DoctrineMigrations/Version20161022134138.php +++ b/app/DoctrineMigrations/Version20161022134138.php | |||
@@ -27,7 +27,7 @@ class Version20161022134138 extends AbstractMigration implements ContainerAwareI | |||
27 | */ | 27 | */ |
28 | public function up(Schema $schema) | 28 | public function up(Schema $schema) |
29 | { | 29 | { |
30 | $this->skipIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'This migration only apply to MySQL'); | 30 | $this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration only apply to MySQL'); |
31 | 31 | ||
32 | $this->addSql('ALTER DATABASE ' . $this->connection->getParams()['dbname'] . ' CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;'); | 32 | $this->addSql('ALTER DATABASE ' . $this->connection->getParams()['dbname'] . ' CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;'); |
33 | 33 | ||
@@ -58,7 +58,7 @@ class Version20161022134138 extends AbstractMigration implements ContainerAwareI | |||
58 | */ | 58 | */ |
59 | public function down(Schema $schema) | 59 | public function down(Schema $schema) |
60 | { | 60 | { |
61 | $this->skipIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'This migration only apply to MySQL'); | 61 | $this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration only apply to MySQL'); |
62 | 62 | ||
63 | $this->addSql('ALTER DATABASE ' . $this->connection->getParams()['dbname'] . ' CHARACTER SET = utf8 COLLATE = utf8_unicode_ci;'); | 63 | $this->addSql('ALTER DATABASE ' . $this->connection->getParams()['dbname'] . ' CHARACTER SET = utf8 COLLATE = utf8_unicode_ci;'); |
64 | 64 | ||
diff --git a/app/DoctrineMigrations/Version20161024212538.php b/app/DoctrineMigrations/Version20161024212538.php index 35853d03..698819be 100644 --- a/app/DoctrineMigrations/Version20161024212538.php +++ b/app/DoctrineMigrations/Version20161024212538.php | |||
@@ -55,7 +55,7 @@ class Version20161024212538 extends AbstractMigration implements ContainerAwareI | |||
55 | 55 | ||
56 | $clientsTable->dropColumn('user_id', 'integer'); | 56 | $clientsTable->dropColumn('user_id', 'integer'); |
57 | 57 | ||
58 | if ($this->connection->getDatabasePlatform()->getName() !== 'sqlite') { | 58 | if ('sqlite' !== $this->connection->getDatabasePlatform()->getName()) { |
59 | $clientsTable->removeForeignKey($this->constraintName); | 59 | $clientsTable->removeForeignKey($this->constraintName); |
60 | } | 60 | } |
61 | } | 61 | } |
diff --git a/app/DoctrineMigrations/Version20170510082609.php b/app/DoctrineMigrations/Version20170510082609.php index 329613b1..52c70168 100644 --- a/app/DoctrineMigrations/Version20170510082609.php +++ b/app/DoctrineMigrations/Version20170510082609.php | |||
@@ -34,7 +34,7 @@ class Version20170510082609 extends AbstractMigration implements ContainerAwareI | |||
34 | */ | 34 | */ |
35 | public function up(Schema $schema) | 35 | public function up(Schema $schema) |
36 | { | 36 | { |
37 | $this->skipIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'This migration only apply to MySQL'); | 37 | $this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration only apply to MySQL'); |
38 | 38 | ||
39 | foreach ($this->fields as $field) { | 39 | foreach ($this->fields as $field) { |
40 | $this->addSql('ALTER TABLE ' . $this->getTable('user') . ' CHANGE ' . $field . ' ' . $field . ' VARCHAR(180) NOT NULL;'); | 40 | $this->addSql('ALTER TABLE ' . $this->getTable('user') . ' CHANGE ' . $field . ' ' . $field . ' VARCHAR(180) NOT NULL;'); |
@@ -46,7 +46,7 @@ class Version20170510082609 extends AbstractMigration implements ContainerAwareI | |||
46 | */ | 46 | */ |
47 | public function down(Schema $schema) | 47 | public function down(Schema $schema) |
48 | { | 48 | { |
49 | $this->skipIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'This migration only apply to MySQL'); | 49 | $this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration only apply to MySQL'); |
50 | 50 | ||
51 | foreach ($this->fields as $field) { | 51 | foreach ($this->fields as $field) { |
52 | $this->addSql('ALTER TABLE ' . $this->getTable('user') . ' CHANGE ' . $field . ' ' . $field . ' VARCHAR(255) NOT NULL;'); | 52 | $this->addSql('ALTER TABLE ' . $this->getTable('user') . ' CHANGE ' . $field . ' ' . $field . ' VARCHAR(255) NOT NULL;'); |
diff --git a/app/DoctrineMigrations/Version20170719231144.php b/app/DoctrineMigrations/Version20170719231144.php index 0f5fa75a..0c749150 100644 --- a/app/DoctrineMigrations/Version20170719231144.php +++ b/app/DoctrineMigrations/Version20170719231144.php | |||
@@ -27,7 +27,7 @@ class Version20170719231144 extends AbstractMigration implements ContainerAwareI | |||
27 | */ | 27 | */ |
28 | public function up(Schema $schema) | 28 | public function up(Schema $schema) |
29 | { | 29 | { |
30 | $this->skipIf($this->connection->getDatabasePlatform()->getName() === 'sqlite', 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.'); | 30 | $this->skipIf('sqlite' === $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.'); |
31 | 31 | ||
32 | // Find tags which need to be merged | 32 | // Find tags which need to be merged |
33 | $dupTags = $this->connection->query(' | 33 | $dupTags = $this->connection->query(' |