mirror of
https://github.com/wallabag/wallabag.git
synced 2025-08-01 17:38:38 +00:00
CS
This commit is contained in:
parent
f40c88eb1f
commit
3ef055ced3
27 changed files with 37 additions and 37 deletions
|
@ -28,7 +28,7 @@ class Version20161001072726 extends AbstractMigration implements ContainerAwareI
|
|||
*/
|
||||
public function up(Schema $schema)
|
||||
{
|
||||
$this->skipIf($this->connection->getDatabasePlatform()->getName() === 'sqlite', 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.');
|
||||
$this->skipIf('sqlite' === $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.');
|
||||
|
||||
// remove all FK from entry_tag
|
||||
switch ($this->connection->getDatabasePlatform()->getName()) {
|
||||
|
|
|
@ -27,7 +27,7 @@ class Version20161022134138 extends AbstractMigration implements ContainerAwareI
|
|||
*/
|
||||
public function up(Schema $schema)
|
||||
{
|
||||
$this->skipIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'This migration only apply to MySQL');
|
||||
$this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration only apply to MySQL');
|
||||
|
||||
$this->addSql('ALTER DATABASE ' . $this->connection->getParams()['dbname'] . ' CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;');
|
||||
|
||||
|
@ -58,7 +58,7 @@ class Version20161022134138 extends AbstractMigration implements ContainerAwareI
|
|||
*/
|
||||
public function down(Schema $schema)
|
||||
{
|
||||
$this->skipIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'This migration only apply to MySQL');
|
||||
$this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration only apply to MySQL');
|
||||
|
||||
$this->addSql('ALTER DATABASE ' . $this->connection->getParams()['dbname'] . ' CHARACTER SET = utf8 COLLATE = utf8_unicode_ci;');
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ class Version20161024212538 extends AbstractMigration implements ContainerAwareI
|
|||
|
||||
$clientsTable->dropColumn('user_id', 'integer');
|
||||
|
||||
if ($this->connection->getDatabasePlatform()->getName() !== 'sqlite') {
|
||||
if ('sqlite' !== $this->connection->getDatabasePlatform()->getName()) {
|
||||
$clientsTable->removeForeignKey($this->constraintName);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ class Version20170510082609 extends AbstractMigration implements ContainerAwareI
|
|||
*/
|
||||
public function up(Schema $schema)
|
||||
{
|
||||
$this->skipIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'This migration only apply to MySQL');
|
||||
$this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration only apply to MySQL');
|
||||
|
||||
foreach ($this->fields as $field) {
|
||||
$this->addSql('ALTER TABLE ' . $this->getTable('user') . ' CHANGE ' . $field . ' ' . $field . ' VARCHAR(180) NOT NULL;');
|
||||
|
@ -46,7 +46,7 @@ class Version20170510082609 extends AbstractMigration implements ContainerAwareI
|
|||
*/
|
||||
public function down(Schema $schema)
|
||||
{
|
||||
$this->skipIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'This migration only apply to MySQL');
|
||||
$this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration only apply to MySQL');
|
||||
|
||||
foreach ($this->fields as $field) {
|
||||
$this->addSql('ALTER TABLE ' . $this->getTable('user') . ' CHANGE ' . $field . ' ' . $field . ' VARCHAR(255) NOT NULL;');
|
||||
|
|
|
@ -27,7 +27,7 @@ class Version20170719231144 extends AbstractMigration implements ContainerAwareI
|
|||
*/
|
||||
public function up(Schema $schema)
|
||||
{
|
||||
$this->skipIf($this->connection->getDatabasePlatform()->getName() === 'sqlite', 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.');
|
||||
$this->skipIf('sqlite' === $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.');
|
||||
|
||||
// Find tags which need to be merged
|
||||
$dupTags = $this->connection->query('
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue