37 lines
1.2 KiB
PHP
37 lines
1.2 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Neos\Flow\Persistence\Doctrine\Migrations;
|
|
|
|
use Doctrine\DBAL\Exception as DoctrineDBALException;
|
|
use Doctrine\DBAL\Migrations\AbortMigrationException;
|
|
use Doctrine\DBAL\Schema\Schema;
|
|
use Doctrine\Migrations\AbstractMigration;
|
|
|
|
class Version20140505093853 extends AbstractMigration
|
|
{
|
|
/**
|
|
* @param Schema $schema
|
|
* @throws AbortMigrationException
|
|
* @throws DoctrineDBALException
|
|
*/
|
|
public function up(Schema $schema): void
|
|
{
|
|
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on "mysql".');
|
|
|
|
$this->addSql('CREATE TABLE digicomp_sequence_domain_model_insert (number INT NOT NULL, type VARCHAR(255) NOT NULL, PRIMARY KEY(number, type))');
|
|
}
|
|
|
|
/**
|
|
* @param Schema $schema
|
|
* @throws AbortMigrationException
|
|
* @throws DoctrineDBALException
|
|
*/
|
|
public function down(Schema $schema): void
|
|
{
|
|
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on "mysql".');
|
|
|
|
$this->addSql('DROP TABLE digicomp_sequence_domain_model_insert');
|
|
}
|
|
}
|