Skip to content
This repository has been archived by the owner on Jun 4, 2024. It is now read-only.

Commit

Permalink
Merge pull request #6 from kdambekalns/patch-1
Browse files Browse the repository at this point in the history
TASK: Add PostgreSQL migration
  • Loading branch information
akappler authored Oct 20, 2017
2 parents e6ca950 + 3b7bae8 commit 8078193
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions Migrations/Postgresql/Version20171015140356.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?php
namespace Neos\Flow\Persistence\Doctrine\Migrations;

use Doctrine\DBAL\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;

/**
* Initial DB structure
*/
class Version20171015140356 extends AbstractMigration
{
/**
* @return string
*/
public function getDescription()
{
return 'Initial DB structure';
}

/**
* @param Schema $schema
* @return void
*/
public function up(Schema $schema)
{
$this->abortIf($this->connection->getDatabasePlatform()->getName() != 'postgresql', 'Migration can only be executed safely on "postgresql".');

$this->addSql('CREATE TABLE cm_neos_thememodule_domain_model_settings (persistence_object_identifier VARCHAR(40) NOT NULL, customscss TEXT DEFAULT \'\', customcss TEXT DEFAULT \'\', customsettings TEXT DEFAULT \'\', PRIMARY KEY(persistence_object_identifier))');
}

/**
* @param Schema $schema
* @return void
*/
public function down(Schema $schema)
{
$this->abortIf($this->connection->getDatabasePlatform()->getName() != 'postgresql', 'Migration can only be executed safely on "postgresql".');

$this->addSql('DROP TABLE cm_neos_thememodule_domain_model_settings');
}
}

0 comments on commit 8078193

Please sign in to comment.