Code Duplication    Length = 16-25 lines in 25 locations

src/SWP/Bundle/CoreBundle/Migrations/2018/11/Version20181106153503.php 1 location

@@ 13-30 (lines=18) @@
10
/**
11
 * Auto-generated Migration: Please modify to your needs!
12
 */
13
final class Version20181106153503 extends AbstractMigration
14
{
15
    public function up(Schema $schema): void
16
    {
17
        // this up() migration is auto-generated, please modify it to your needs
18
        $this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.');
19
20
        $this->addSql('ALTER TABLE swp_article ADD comments_count INT DEFAULT NULL');
21
    }
22
23
    public function down(Schema $schema): void
24
    {
25
        // this down() migration is auto-generated, please modify it to your needs
26
        $this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.');
27
28
        $this->addSql('ALTER TABLE swp_article DROP comments_count');
29
    }
30
}
31

src/SWP/Bundle/CoreBundle/Migrations/2019/03/Version20190305142448.php 1 location

@@ 13-33 (lines=21) @@
10
/**
11
 * Auto-generated Migration: Please modify to your needs!
12
 */
13
final class Version20190305142448 extends AbstractMigration
14
{
15
    public function up(Schema $schema): void
16
    {
17
        // this up() migration is auto-generated, please modify it to your needs
18
        $this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.');
19
20
        $this->addSql('ALTER TABLE 
21
          swp_content_list 
22
        ADD 
23
          content_list_items_updated_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL');
24
    }
25
26
    public function down(Schema $schema): void
27
    {
28
        // this down() migration is auto-generated, please modify it to your needs
29
        $this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.');
30
31
        $this->addSql('ALTER TABLE swp_content_list DROP content_list_items_updated_at');
32
    }
33
}
34

src/SWP/Bundle/CoreBundle/Migrations/2019/03/Version20190312113241.php 1 location

@@ 13-35 (lines=23) @@
10
/**
11
 * Auto-generated Migration: Please modify to your needs!
12
 */
13
final class Version20190312113241 extends AbstractMigration
14
{
15
    public function getDescription()
16
    {
17
        return 'Change all comments_count with NULL to 0 to improve filtering';
18
    }
19
20
    public function up(Schema $schema): void
21
    {
22
        // this up() migration is auto-generated, please modify it to your needs
23
        $this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.');
24
25
        $this->addSql('UPDATE swp_article SET comments_count = 0 WHERE comments_count IS NULL');
26
    }
27
28
    public function down(Schema $schema): void
29
    {
30
        // this down() migration is auto-generated, please modify it to your needs
31
        $this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.');
32
33
        $this->addSql('UPDATE swp_article SET comments_count = NULL WHERE comments_count = 0');
34
    }
35
}
36

src/SWP/Bundle/CoreBundle/Migrations/2019/05/Version20190508123833.php 1 location

@@ 13-30 (lines=18) @@
10
/**
11
 * Auto-generated Migration: Please modify to your needs!
12
 */
13
final class Version20190508123833 extends AbstractMigration
14
{
15
    public function up(Schema $schema): void
16
    {
17
        // this up() migration is auto-generated, please modify it to your needs
18
        $this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.');
19
20
        $this->addSql('ALTER TABLE swp_article_seo_metadata ADD package_guid VARCHAR(255) DEFAULT NULL');
21
    }
22
23
    public function down(Schema $schema): void
24
    {
25
        // this down() migration is auto-generated, please modify it to your needs
26
        $this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.');
27
28
        $this->addSql('ALTER TABLE swp_article_seo_metadata DROP package_guid');
29
    }
30
}
31

src/SWP/Bundle/CoreBundle/Migrations/2019/05/Version20190522105934.php 1 location

@@ 10-26 (lines=17) @@
7
use Doctrine\DBAL\Schema\Schema;
8
use Doctrine\Migrations\AbstractMigration;
9
10
final class Version20190522105934 extends AbstractMigration
11
{
12
    public function up(Schema $schema): void
13
    {
14
        $this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.');
15
16
        $this->addSql('ALTER TABLE swp_image ADD variants JSON DEFAULT NULL');
17
        $this->addSql('COMMENT ON COLUMN swp_image.variants IS \'(DC2Type:json_array)\'');
18
    }
19
20
    public function down(Schema $schema): void
21
    {
22
        $this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.');
23
24
        $this->addSql('ALTER TABLE swp_image DROP variants');
25
    }
26
}
27

src/SWP/Bundle/CoreBundle/Migrations/2019/07/Version20190702120702.php 1 location

@@ 13-30 (lines=18) @@
10
/**
11
 * Auto-generated Migration: Please modify to your needs!
12
 */
13
final class Version20190702120702 extends AbstractMigration
14
{
15
    public function up(Schema $schema): void
16
    {
17
        // this up() migration is auto-generated, please modify it to your needs
18
        $this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.');
19
20
        $this->addSql('ALTER TABLE swp_user ADD external_id VARCHAR(255) DEFAULT NULL');
21
    }
22
23
    public function down(Schema $schema): void
24
    {
25
        // this down() migration is auto-generated, please modify it to your needs
26
        $this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.');
27
28
        $this->addSql('ALTER TABLE swp_user DROP external_id');
29
    }
30
}
31

src/SWP/Bundle/CoreBundle/Migrations/2019/07/Version20190711081727.php 1 location

@@ 10-25 (lines=16) @@
7
use Doctrine\DBAL\Schema\Schema;
8
use Doctrine\Migrations\AbstractMigration;
9
10
final class Version20190711081727 extends AbstractMigration
11
{
12
    public function up(Schema $schema): void
13
    {
14
        $this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.');
15
16
        $this->addSql('ALTER TABLE swp_article ADD media_updated_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL');
17
    }
18
19
    public function down(Schema $schema): void
20
    {
21
        $this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.');
22
23
        $this->addSql('ALTER TABLE swp_article DROP media_updated_at');
24
    }
25
}
26

src/SWP/Bundle/CoreBundle/Migrations/2019/11/Version20191107115124.php 1 location

@@ 13-30 (lines=18) @@
10
/**
11
 * Auto-generated Migration: Please modify to your needs!
12
 */
13
final class Version20191107115124 extends AbstractMigration
14
{
15
    public function up(Schema $schema): void
16
    {
17
        // this up() migration is auto-generated, please modify it to your needs
18
        $this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.');
19
20
        $this->addSql('ALTER TABLE swp_image ADD COLUMN length NUMERIC;');
21
    }
22
23
    public function down(Schema $schema): void
24
    {
25
        // this down() migration is auto-generated, please modify it to your needs
26
        $this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.');
27
28
        $this->addSql('ALTER TABLE swp_image DROP COLUMN length;');
29
    }
30
}
31

src/SWP/Bundle/CoreBundle/Migrations/2020/01/Version20200109113028.php 1 location

@@ 10-25 (lines=16) @@
7
use Doctrine\DBAL\Schema\Schema;
8
use Doctrine\Migrations\AbstractMigration;
9
10
final class Version20200109113028 extends AbstractMigration
11
{
12
    public function up(Schema $schema): void
13
    {
14
        $this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.');
15
16
        $this->addSql('CREATE INDEX swp_asset_image ON swp_image (asset_id)');
17
    }
18
19
    public function down(Schema $schema): void
20
    {
21
        $this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.');
22
23
        $this->addSql('DROP INDEX swp_asset_image');
24
    }
25
}
26

src/SWP/Bundle/CoreBundle/Migrations/2020/02/Version20200206100212.php 1 location

@@ 13-31 (lines=19) @@
10
/**
11
 * Auto-generated Migration: Please modify to your needs!
12
 */
13
final class Version20200206100212 extends AbstractMigration
14
{
15
    public function up(Schema $schema): void
16
    {
17
        // this up() migration is auto-generated, please modify it to your needs
18
        $this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.');
19
20
        $this->addSql('ALTER TABLE swp_analytics_report ADD filters TEXT NOT NULL');
21
        $this->addSql('COMMENT ON COLUMN swp_analytics_report.filters IS \'(DC2Type:array)\'');
22
    }
23
24
    public function down(Schema $schema): void
25
    {
26
        // this down() migration is auto-generated, please modify it to your needs
27
        $this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.');
28
29
        $this->addSql('ALTER TABLE swp_analytics_report DROP filters');
30
    }
31
}
32

src/SWP/Bundle/CoreBundle/Migrations/2020/03/Version20200303134042.php 1 location

@@ 13-30 (lines=18) @@
10
/**
11
 * Auto-generated Migration: Please modify to your needs!
12
 */
13
final class Version20200303134042 extends AbstractMigration
14
{
15
    public function up(Schema $schema): void
16
    {
17
        // this up() migration is auto-generated, please modify it to your needs
18
        $this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.');
19
20
        $this->addSql('ALTER TABLE swp_article_media ADD media_type VARCHAR(255) DEFAULT NULL');
21
    }
22
23
    public function down(Schema $schema): void
24
    {
25
        // this down() migration is auto-generated, please modify it to your needs
26
        $this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.');
27
28
        $this->addSql('ALTER TABLE swp_article_media DROP media_type');
29
    }
30
}
31

src/SWP/Bundle/CoreBundle/Migrations/2020/04/Version20200427121544.php 1 location

@@ 13-30 (lines=18) @@
10
/**
11
 * Auto-generated Migration: Please modify to your needs!
12
 */
13
final class Version20200427121544 extends AbstractMigration
14
{
15
    public function up(Schema $schema): void
16
    {
17
        // this up() migration is auto-generated, please modify it to your needs
18
        $this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.');
19
20
        $this->addSql('ALTER TABLE swp_content_list_item ADD sticky_position INT DEFAULT NULL');
21
    }
22
23
    public function down(Schema $schema): void
24
    {
25
        // this down() migration is auto-generated, please modify it to your needs
26
        $this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.');
27
28
        $this->addSql('ALTER TABLE swp_content_list_item DROP sticky_position');
29
    }
30
}
31

src/SWP/Bundle/CoreBundle/Migrations/2021/01/Version20210112135555.php 1 location

@@ 11-29 (lines=19) @@
8
/**
9
 * Auto-generated Migration: Please modify to your needs!
10
 */
11
final class Version20210112135555 extends AbstractMigration
12
{
13
    public function up(Schema $schema) : void
14
    {
15
        $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
16
17
        $this->addSql('ALTER TABLE swp_article DROP extra');
18
19
    }
20
21
    public function down(Schema $schema) : void
22
    {
23
        $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
24
25
        $this->addSql('ALTER TABLE swp_article ADD extra TEXT DEFAULT \'a:0:{}\'');
26
        $this->addSql('COMMENT ON COLUMN swp_article.extra IS \'(DC2Type:array)\'');
27
28
    }
29
}
30

src/SWP/Bundle/CoreBundle/Migrations/2021/03/Version20210323112900.php 1 location

@@ 8-23 (lines=16) @@
5
use Doctrine\DBAL\Schema\Schema;
6
use Doctrine\Migrations\AbstractMigration;
7
8
final class Version20210323112900 extends AbstractMigration
9
{
10
    public function up(Schema $schema) : void
11
    {
12
        $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
13
14
        $this->addSql('ALTER TABLE swp_tenant ADD pwa_config_url VARCHAR(255) DEFAULT NULL');
15
    }
16
17
    public function down(Schema $schema) : void
18
    {
19
        $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
20
21
        $this->addSql('ALTER TABLE swp_tenant DROP pwa_config_url');
22
    }
23
}
24

src/SWP/Bundle/CoreBundle/Migrations/Version20170222102940.php 1 location

@@ 11-35 (lines=25) @@
8
/**
9
 * Auto-generated Migration: Please modify to your needs!
10
 */
11
class Version20170222102940 extends AbstractMigration
12
{
13
    /**
14
     * @param Schema $schema
15
     */
16
    public function up(Schema $schema)
17
    {
18
        // this up() migration is auto-generated, please modify it to your needs
19
        $this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.');
20
21
        $this->addSql('ALTER TABLE swp_article ALTER metadata TYPE JSON USING metadata::json');
22
        $this->addSql('ALTER TABLE swp_article ALTER metadata DROP DEFAULT');
23
    }
24
25
    /**
26
     * @param Schema $schema
27
     */
28
    public function down(Schema $schema)
29
    {
30
        // this down() migration is auto-generated, please modify it to your needs
31
        $this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.');
32
33
        $this->addSql('ALTER TABLE swp_article ALTER metadata TYPE TEXT');
34
    }
35
}
36

src/SWP/Bundle/CoreBundle/Migrations/Version20170531111906.php 1 location

@@ 11-35 (lines=25) @@
8
/**
9
 * Auto-generated Migration: Please modify to your needs!
10
 */
11
class Version20170531111906 extends AbstractMigration
12
{
13
    /**
14
     * @param Schema $schema
15
     */
16
    public function up(Schema $schema)
17
    {
18
        // this up() migration is auto-generated, please modify it to your needs
19
        $this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.');
20
21
        $this->addSql('ALTER TABLE swp_item ADD genre TEXT DEFAULT NULL');
22
        $this->addSql('COMMENT ON COLUMN swp_item.genre IS \'(DC2Type:array)\'');
23
    }
24
25
    /**
26
     * @param Schema $schema
27
     */
28
    public function down(Schema $schema)
29
    {
30
        // this down() migration is auto-generated, please modify it to your needs
31
        $this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.');
32
33
        $this->addSql('ALTER TABLE swp_item DROP genre');
34
    }
35
}
36

src/SWP/Bundle/CoreBundle/Migrations/Version20180509155208.php 1 location

@@ 13-31 (lines=19) @@
10
/**
11
 * Auto-generated Migration: Please modify to your needs!
12
 */
13
final class Version20180509155208 extends AbstractMigration
14
{
15
    public function up(Schema $schema): void
16
    {
17
        // this up() migration is auto-generated, please modify it to your needs
18
        $this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.');
19
20
        $this->addSql('ALTER TABLE swp_article_external ADD extra TEXT DEFAULT \'a:0:{}\' NOT NULL');
21
        $this->addSql('COMMENT ON COLUMN swp_article_external.extra IS \'(DC2Type:array)\'');
22
    }
23
24
    public function down(Schema $schema): void
25
    {
26
        // this down() migration is auto-generated, please modify it to your needs
27
        $this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.');
28
29
        $this->addSql('ALTER TABLE swp_article_external DROP extra');
30
    }
31
}
32

src/SWP/Bundle/CoreBundle/Migrations/Version20180515085116.php 1 location

@@ 13-30 (lines=18) @@
10
/**
11
 * Auto-generated Migration: Please modify to your needs!
12
 */
13
final class Version20180515085116 extends AbstractMigration
14
{
15
    public function up(Schema $schema): void
16
    {
17
        // this up() migration is auto-generated, please modify it to your needs
18
        $this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.');
19
20
        $this->addSql('ALTER TABLE swp_article_external ADD deleted_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL');
21
    }
22
23
    public function down(Schema $schema): void
24
    {
25
        // this down() migration is auto-generated, please modify it to your needs
26
        $this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.');
27
28
        $this->addSql('ALTER TABLE swp_article_external DROP deleted_at');
29
    }
30
}
31

src/SWP/Bundle/CoreBundle/Migrations/Version20180524174214.php 1 location

@@ 13-30 (lines=18) @@
10
/**
11
 * Auto-generated Migration: Please modify to your needs!
12
 */
13
final class Version20180524174214 extends AbstractMigration
14
{
15
    public function up(Schema $schema): void
16
    {
17
        // this up() migration is auto-generated, please modify it to your needs
18
        $this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.');
19
20
        $this->addSql('ALTER TABLE swp_author ALTER biography TYPE VARCHAR(460)');
21
    }
22
23
    public function down(Schema $schema): void
24
    {
25
        // this down() migration is auto-generated, please modify it to your needs
26
        $this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.');
27
28
        $this->addSql('ALTER TABLE swp_author ALTER biography TYPE VARCHAR(255)');
29
    }
30
}
31

src/SWP/Bundle/CoreBundle/Migrations/Version20180807131629.php 1 location

@@ 13-30 (lines=18) @@
10
/**
11
 * Auto-generated Migration: Please modify to your needs!
12
 */
13
final class Version20180807131629 extends AbstractMigration
14
{
15
    public function up(Schema $schema): void
16
    {
17
        // this up() migration is auto-generated, please modify it to your needs
18
        $this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.');
19
20
        $this->addSql('ALTER TABLE swp_publish_destination ADD paywall_secured BOOLEAN NOT NULL DEFAULT false');
21
    }
22
23
    public function down(Schema $schema): void
24
    {
25
        // this down() migration is auto-generated, please modify it to your needs
26
        $this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.');
27
28
        $this->addSql('ALTER TABLE swp_publish_destination DROP paywall_secured');
29
    }
30
}
31

src/SWP/Bundle/CoreBundle/Migrations/Version20180808143130.php 1 location

@@ 13-30 (lines=18) @@
10
/**
11
 * Auto-generated Migration: Please modify to your needs!
12
 */
13
final class Version20180808143130 extends AbstractMigration
14
{
15
    public function up(Schema $schema): void
16
    {
17
        // this up() migration is auto-generated, please modify it to your needs
18
        $this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.');
19
20
        $this->addSql('ALTER TABLE swp_route ADD articles_updated_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL');
21
    }
22
23
    public function down(Schema $schema): void
24
    {
25
        // this down() migration is auto-generated, please modify it to your needs
26
        $this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.');
27
28
        $this->addSql('ALTER TABLE swp_route DROP articles_updated_at');
29
    }
30
}
31

src/SWP/Bundle/CoreBundle/Migrations/Version20180809111336.php 1 location

@@ 13-30 (lines=18) @@
10
/**
11
 * Auto-generated Migration: Please modify to your needs!
12
 */
13
final class Version20180809111336 extends AbstractMigration
14
{
15
    public function up(Schema $schema): void
16
    {
17
        // this up() migration is auto-generated, please modify it to your needs
18
        $this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.');
19
20
        $this->addSql('CREATE INDEX swp_article_published_at ON swp_article (published_at)');
21
    }
22
23
    public function down(Schema $schema): void
24
    {
25
        // this down() migration is auto-generated, please modify it to your needs
26
        $this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.');
27
28
        $this->addSql('DROP INDEX swp_article_published_at');
29
    }
30
}
31

src/SWP/Bundle/CoreBundle/Migrations/Version20180904123658.php 1 location

@@ 15-34 (lines=20) @@
12
/**
13
 * Auto-generated Migration: Please modify to your needs!
14
 */
15
final class Version20180904123658 extends AbstractMigration implements ContainerAwareInterface
16
{
17
    use ContainerAwareTrait;
18
19
    public function up(Schema $schema): void
20
    {
21
        // this up() migration is auto-generated, please modify it to your needs
22
        $this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.');
23
24
        $this->addSql('ALTER TABLE swp_article_events ADD page_view_source VARCHAR(255) DEFAULT NULL');
25
    }
26
27
    public function down(Schema $schema): void
28
    {
29
        // this down() migration is auto-generated, please modify it to your needs
30
        $this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.');
31
32
        $this->addSql('ALTER TABLE swp_article_events DROP page_view_source');
33
    }
34
}
35

src/SWP/Bundle/CoreBundle/Migrations/Version20180905082928.php 1 location

@@ 13-30 (lines=18) @@
10
/**
11
 * Auto-generated Migration: Please modify to your needs!
12
 */
13
final class Version20180905082928 extends AbstractMigration
14
{
15
    public function up(Schema $schema): void
16
    {
17
        // this up() migration is auto-generated, please modify it to your needs
18
        $this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.');
19
20
        $this->addSql('ALTER TABLE swp_article_statistics ADD internal_click_rate INT DEFAULT NULL');
21
    }
22
23
    public function down(Schema $schema): void
24
    {
25
        // this down() migration is auto-generated, please modify it to your needs
26
        $this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.');
27
28
        $this->addSql('ALTER TABLE swp_article_statistics DROP internal_click_rate');
29
    }
30
}
31

src/SWP/Bundle/CoreBundle/Migrations/2021/04/Version20210426085015.php 1 location

@@ 13-32 (lines=20) @@
10
/**
11
 * Auto-generated Migration: Please modify to your needs!
12
 */
13
final class Version20210426085015 extends AbstractMigration
14
{
15
    public function up(Schema $schema): void
16
    {
17
        // this up() migration is auto-generated, please modify it to your needs
18
        $this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.');
19
20
        $this->addSql('ALTER TABLE swp_article_extra ALTER value TYPE TEXT');
21
        $this->addSql('ALTER TABLE swp_article_extra ALTER embed TYPE TEXT');
22
    }
23
24
    public function down(Schema $schema): void
25
    {
26
        // this down() migration is auto-generated, please modify it to your needs
27
        $this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.');
28
29
        $this->addSql('ALTER TABLE swp_article_extra ALTER value TYPE VARCHAR(255)');
30
        $this->addSql('ALTER TABLE swp_article_extra ALTER embed TYPE VARCHAR(255)');
31
    }
32
}
33