mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 21:34:25 +00:00
adapt migrations files to flex
This commit is contained in:
parent
bf3c9ead2d
commit
2ed1de8629
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
namespace Application\Migrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
use Doctrine\Migrations\AbstractMigration;
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -10,7 +10,7 @@ use Doctrine\DBAL\Schema\Schema;
|
|||||||
*/
|
*/
|
||||||
class Version20141129010948 extends AbstractMigration
|
class Version20141129010948 extends AbstractMigration
|
||||||
{
|
{
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema): void
|
||||||
{
|
{
|
||||||
$this->addSql("CREATE SEQUENCE ClosingMotive_id_seq INCREMENT BY 1 MINVALUE 1 START 1;");
|
$this->addSql("CREATE SEQUENCE ClosingMotive_id_seq INCREMENT BY 1 MINVALUE 1 START 1;");
|
||||||
$this->addSql("CREATE SEQUENCE person_history_file_id_seq INCREMENT BY 1 MINVALUE 1 START 1;");
|
$this->addSql("CREATE SEQUENCE person_history_file_id_seq INCREMENT BY 1 MINVALUE 1 START 1;");
|
||||||
@ -36,7 +36,7 @@ class Version20141129010948 extends AbstractMigration
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema): void
|
||||||
{
|
{
|
||||||
// this down() migration is auto-generated, please modify it to your needs
|
// this down() migration is auto-generated, please modify it to your needs
|
||||||
|
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
namespace Application\Migrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
use Doctrine\Migrations\AbstractMigration;
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -10,7 +10,7 @@ use Doctrine\DBAL\Schema\Schema;
|
|||||||
*/
|
*/
|
||||||
class Version20150212173934 extends AbstractMigration
|
class Version20150212173934 extends AbstractMigration
|
||||||
{
|
{
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema): void
|
||||||
{
|
{
|
||||||
// this up() migration is auto-generated, please modify it to your needs
|
// this up() migration is auto-generated, please modify it to your needs
|
||||||
|
|
||||||
@ -20,7 +20,7 @@ class Version20150212173934 extends AbstractMigration
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema): void
|
||||||
{
|
{
|
||||||
// this down() migration is auto-generated, please modify it to your needs
|
// this down() migration is auto-generated, please modify it to your needs
|
||||||
$this->addSql("ALTER TABLE accompanying_period RENAME TO person_history_file;");
|
$this->addSql("ALTER TABLE accompanying_period RENAME TO person_history_file;");
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
namespace Application\Migrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
use Doctrine\Migrations\AbstractMigration;
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
use Chill\MainBundle\Entity\Center;
|
use Chill\MainBundle\Entity\Center;
|
||||||
|
|
||||||
@ -11,7 +11,7 @@ use Chill\MainBundle\Entity\Center;
|
|||||||
*/
|
*/
|
||||||
class Version20150607231010 extends AbstractMigration
|
class Version20150607231010 extends AbstractMigration
|
||||||
{
|
{
|
||||||
public function getDescription()
|
public function getDescription(): string
|
||||||
{
|
{
|
||||||
return 'Add a center on the person entity. The default center is the first '
|
return 'Add a center on the person entity. The default center is the first '
|
||||||
. 'recorded.';
|
. 'recorded.';
|
||||||
@ -21,7 +21,7 @@ class Version20150607231010 extends AbstractMigration
|
|||||||
/**
|
/**
|
||||||
* @param Schema $schema
|
* @param Schema $schema
|
||||||
*/
|
*/
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema): void
|
||||||
{
|
{
|
||||||
$this->abortIf(
|
$this->abortIf(
|
||||||
$this->connection->getDatabasePlatform()->getName() != 'postgresql',
|
$this->connection->getDatabasePlatform()->getName() != 'postgresql',
|
||||||
@ -64,7 +64,7 @@ class Version20150607231010 extends AbstractMigration
|
|||||||
/**
|
/**
|
||||||
* @param Schema $schema
|
* @param Schema $schema
|
||||||
*/
|
*/
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema): void
|
||||||
{
|
{
|
||||||
$this->abortIf(
|
$this->abortIf(
|
||||||
$this->connection->getDatabasePlatform()->getName() != 'postgresql',
|
$this->connection->getDatabasePlatform()->getName() != 'postgresql',
|
@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
namespace Application\Migrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
use Doctrine\Migrations\AbstractMigration;
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -37,7 +37,7 @@ class Version20150811152608 extends AbstractMigration
|
|||||||
/**
|
/**
|
||||||
* @param Schema $schema
|
* @param Schema $schema
|
||||||
*/
|
*/
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema): void
|
||||||
{
|
{
|
||||||
$this->abortIf(
|
$this->abortIf(
|
||||||
$this->connection->getDatabasePlatform()->getName() != 'postgresql',
|
$this->connection->getDatabasePlatform()->getName() != 'postgresql',
|
||||||
@ -53,7 +53,7 @@ class Version20150811152608 extends AbstractMigration
|
|||||||
/**
|
/**
|
||||||
* @param Schema $schema
|
* @param Schema $schema
|
||||||
*/
|
*/
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema): void
|
||||||
{
|
{
|
||||||
$this->abortIf(
|
$this->abortIf(
|
||||||
$this->connection->getDatabasePlatform()->getName() != 'postgresql',
|
$this->connection->getDatabasePlatform()->getName() != 'postgresql',
|
@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
namespace Application\Migrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
use Doctrine\Migrations\AbstractMigration;
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -33,7 +33,7 @@ class Version20150812110708 extends AbstractMigration
|
|||||||
/**
|
/**
|
||||||
* @param Schema $schema
|
* @param Schema $schema
|
||||||
*/
|
*/
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema): void
|
||||||
{
|
{
|
||||||
$this->abortIf(
|
$this->abortIf(
|
||||||
$this->connection->getDatabasePlatform()->getName() != 'postgresql',
|
$this->connection->getDatabasePlatform()->getName() != 'postgresql',
|
||||||
@ -50,7 +50,7 @@ class Version20150812110708 extends AbstractMigration
|
|||||||
/**
|
/**
|
||||||
* @param Schema $schema
|
* @param Schema $schema
|
||||||
*/
|
*/
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema): void
|
||||||
{
|
{
|
||||||
$this->abortIf(
|
$this->abortIf(
|
||||||
$this->connection->getDatabasePlatform()->getName() != 'postgresql',
|
$this->connection->getDatabasePlatform()->getName() != 'postgresql',
|
@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
namespace Application\Migrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
use Doctrine\Migrations\AbstractMigration;
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -34,7 +34,7 @@ class Version20150820113409 extends AbstractMigration
|
|||||||
/**
|
/**
|
||||||
* @param Schema $schema
|
* @param Schema $schema
|
||||||
*/
|
*/
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema): void
|
||||||
{
|
{
|
||||||
$this->abortIf(
|
$this->abortIf(
|
||||||
$this->connection->getDatabasePlatform()->getName() != 'postgresql',
|
$this->connection->getDatabasePlatform()->getName() != 'postgresql',
|
||||||
@ -48,7 +48,7 @@ class Version20150820113409 extends AbstractMigration
|
|||||||
/**
|
/**
|
||||||
* @param Schema $schema
|
* @param Schema $schema
|
||||||
*/
|
*/
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema): void
|
||||||
{
|
{
|
||||||
$this->abortIf(
|
$this->abortIf(
|
||||||
$this->connection->getDatabasePlatform()->getName() != 'postgresql',
|
$this->connection->getDatabasePlatform()->getName() != 'postgresql',
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
namespace Application\Migrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
use Doctrine\Migrations\AbstractMigration;
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -13,7 +13,7 @@ class Version20160310161006 extends AbstractMigration
|
|||||||
/**
|
/**
|
||||||
* @param Schema $schema
|
* @param Schema $schema
|
||||||
*/
|
*/
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema): void
|
||||||
{
|
{
|
||||||
// this up() migration is auto-generated, please modify it to your needs
|
// this up() migration is auto-generated, please modify it to your needs
|
||||||
$this->abortIf($this->connection->getDatabasePlatform()->getName() != 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
|
$this->abortIf($this->connection->getDatabasePlatform()->getName() != 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
|
||||||
@ -39,7 +39,7 @@ class Version20160310161006 extends AbstractMigration
|
|||||||
/**
|
/**
|
||||||
* @param Schema $schema
|
* @param Schema $schema
|
||||||
*/
|
*/
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema): void
|
||||||
{
|
{
|
||||||
$this->abortIf($this->connection->getDatabasePlatform()->getName() != 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
|
$this->abortIf($this->connection->getDatabasePlatform()->getName() != 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
|
||||||
|
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
namespace Application\Migrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
use Doctrine\Migrations\AbstractMigration;
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -13,7 +13,7 @@ class Version20160422000000 extends AbstractMigration
|
|||||||
/**
|
/**
|
||||||
* @param Schema $schema
|
* @param Schema $schema
|
||||||
*/
|
*/
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema): void
|
||||||
{
|
{
|
||||||
$stmt = $this->connection->query('SELECT COUNT(*), pe.id, ad.validfrom FROM person AS pe
|
$stmt = $this->connection->query('SELECT COUNT(*), pe.id, ad.validfrom FROM person AS pe
|
||||||
INNER JOIN chill_person_persons_to_addresses AS pe_ad ON pe.id = pe_ad.person_id
|
INNER JOIN chill_person_persons_to_addresses AS pe_ad ON pe.id = pe_ad.person_id
|
||||||
@ -36,7 +36,7 @@ class Version20160422000000 extends AbstractMigration
|
|||||||
/**
|
/**
|
||||||
* @param Schema $schema
|
* @param Schema $schema
|
||||||
*/
|
*/
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema): void
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
namespace Application\Migrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
use Doctrine\Migrations\AbstractMigration;
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -17,7 +17,7 @@ class Version20160818113633 extends AbstractMigration
|
|||||||
*
|
*
|
||||||
* @param Schema $schema
|
* @param Schema $schema
|
||||||
*/
|
*/
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema): void
|
||||||
{
|
{
|
||||||
$personIdAndCFData = $this->connection->executeQuery('SELECT id, cfdata FROM person');
|
$personIdAndCFData = $this->connection->executeQuery('SELECT id, cfdata FROM person');
|
||||||
|
|
||||||
@ -41,7 +41,7 @@ class Version20160818113633 extends AbstractMigration
|
|||||||
*
|
*
|
||||||
* @param Schema $schema
|
* @param Schema $schema
|
||||||
*/
|
*/
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema): void
|
||||||
{
|
{
|
||||||
$this->addSQL('ALTER TABLE person DROP COLUMN cfdata');
|
$this->addSQL('ALTER TABLE person DROP COLUMN cfdata');
|
||||||
$this->addSQL('ALTER TABLE person RENAME COLUMN cfdata_old TO cfdata');
|
$this->addSQL('ALTER TABLE person RENAME COLUMN cfdata_old TO cfdata');
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
namespace Application\Migrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
use Doctrine\Migrations\AbstractMigration;
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -13,7 +13,7 @@ class Version20160818151130 extends AbstractMigration
|
|||||||
/**
|
/**
|
||||||
* @param Schema $schema
|
* @param Schema $schema
|
||||||
*/
|
*/
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema): void
|
||||||
{
|
{
|
||||||
$this->addSql('ALTER TABLE person RENAME TO chill_person_person');
|
$this->addSql('ALTER TABLE person RENAME TO chill_person_person');
|
||||||
$this->addSql('ALTER TABLE person_id_seq RENAME TO chill_person_person_id_seq');
|
$this->addSql('ALTER TABLE person_id_seq RENAME TO chill_person_person_id_seq');
|
||||||
@ -30,7 +30,7 @@ class Version20160818151130 extends AbstractMigration
|
|||||||
/**
|
/**
|
||||||
* @param Schema $schema
|
* @param Schema $schema
|
||||||
*/
|
*/
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema): void
|
||||||
{
|
{
|
||||||
$this->addSQL('ALTER TABLE chill_person_person RENAME TO person');
|
$this->addSQL('ALTER TABLE chill_person_person RENAME TO person');
|
||||||
$this->addSql('ALTER TABLE chill_person_person_id_seq RENAME TO person_id_seq');
|
$this->addSql('ALTER TABLE chill_person_person_id_seq RENAME TO person_id_seq');
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
namespace Application\Migrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
use Doctrine\Migrations\AbstractMigration;
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -27,7 +27,7 @@ class Version20170117131924 extends AbstractMigration
|
|||||||
/**
|
/**
|
||||||
* @param Schema $schema
|
* @param Schema $schema
|
||||||
*/
|
*/
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema): void
|
||||||
{
|
{
|
||||||
$this->addSql(<<<'SQL'
|
$this->addSql(<<<'SQL'
|
||||||
CREATE OR REPLACE FUNCTION public.get_last_address (
|
CREATE OR REPLACE FUNCTION public.get_last_address (
|
||||||
@ -99,7 +99,7 @@ SQL
|
|||||||
/**
|
/**
|
||||||
* @param Schema $schema
|
* @param Schema $schema
|
||||||
*/
|
*/
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema): void
|
||||||
{
|
{
|
||||||
// drop function to get parts of address
|
// drop function to get parts of address
|
||||||
foreach ($this->fields as $var => $type) {
|
foreach ($this->fields as $var => $type) {
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
namespace Application\Migrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
use Doctrine\Migrations\AbstractMigration;
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -10,7 +10,7 @@ use Doctrine\DBAL\Schema\Schema;
|
|||||||
*/
|
*/
|
||||||
final class Version20180518144221 extends AbstractMigration
|
final class Version20180518144221 extends AbstractMigration
|
||||||
{
|
{
|
||||||
public function up(Schema $schema) : void
|
public function up(Schema $schema): void
|
||||||
{
|
{
|
||||||
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
|
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
|
||||||
|
|
||||||
@ -19,7 +19,7 @@ final class Version20180518144221 extends AbstractMigration
|
|||||||
$this->addSql('ALTER TABLE chill_person_person ALTER email DROP NOT NULL');
|
$this->addSql('ALTER TABLE chill_person_person ALTER email DROP NOT NULL');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function down(Schema $schema) : void
|
public function down(Schema $schema): void
|
||||||
{
|
{
|
||||||
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
|
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
|
||||||
|
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
namespace Application\Migrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
use Doctrine\Migrations\AbstractMigration;
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -12,7 +12,7 @@ use Doctrine\DBAL\Schema\Schema;
|
|||||||
*/
|
*/
|
||||||
final class Version20180820120000 extends AbstractMigration
|
final class Version20180820120000 extends AbstractMigration
|
||||||
{
|
{
|
||||||
public function up(Schema $schema) : void
|
public function up(Schema $schema): void
|
||||||
{
|
{
|
||||||
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
|
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
|
||||||
|
|
||||||
@ -21,7 +21,7 @@ final class Version20180820120000 extends AbstractMigration
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function down(Schema $schema) : void
|
public function down(Schema $schema): void
|
||||||
{
|
{
|
||||||
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
|
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
|
||||||
|
|
@ -10,14 +10,14 @@ use Doctrine\Migrations\AbstractMigration;
|
|||||||
*/
|
*/
|
||||||
final class Version20181005140249 extends AbstractMigration
|
final class Version20181005140249 extends AbstractMigration
|
||||||
{
|
{
|
||||||
public function up(Schema $schema) : void
|
public function up(Schema $schema): void
|
||||||
{
|
{
|
||||||
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
|
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
|
||||||
|
|
||||||
$this->addSql('ALTER TABLE chill_person_person ALTER gender DROP NOT NULL');
|
$this->addSql('ALTER TABLE chill_person_person ALTER gender DROP NOT NULL');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function down(Schema $schema) : void
|
public function down(Schema $schema): void
|
||||||
{
|
{
|
||||||
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
|
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
|
||||||
|
|
@ -10,7 +10,7 @@ use Doctrine\Migrations\AbstractMigration;
|
|||||||
*/
|
*/
|
||||||
final class Version20181023101621 extends AbstractMigration
|
final class Version20181023101621 extends AbstractMigration
|
||||||
{
|
{
|
||||||
public function up(Schema $schema) : void
|
public function up(Schema $schema): void
|
||||||
{
|
{
|
||||||
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
|
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
|
||||||
|
|
||||||
@ -65,7 +65,7 @@ SQL
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function down(Schema $schema) : void
|
public function down(Schema $schema): void
|
||||||
{
|
{
|
||||||
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
|
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
|
||||||
|
|
@ -10,14 +10,14 @@ use Doctrine\Migrations\AbstractMigration;
|
|||||||
*/
|
*/
|
||||||
final class Version20190701124238 extends AbstractMigration
|
final class Version20190701124238 extends AbstractMigration
|
||||||
{
|
{
|
||||||
public function up(Schema $schema) : void
|
public function up(Schema $schema): void
|
||||||
{
|
{
|
||||||
$this->addSql('ALTER TABLE chill_person_accompanying_period ADD user_id INT DEFAULT NULL;');
|
$this->addSql('ALTER TABLE chill_person_accompanying_period ADD user_id INT DEFAULT NULL;');
|
||||||
$this->addSql('ALTER TABLE chill_person_accompanying_period ADD CONSTRAINT FK_E260A868A76ED395 FOREIGN KEY (user_id) REFERENCES users (id) NOT DEFERRABLE INITIALLY IMMEDIATE;');
|
$this->addSql('ALTER TABLE chill_person_accompanying_period ADD CONSTRAINT FK_E260A868A76ED395 FOREIGN KEY (user_id) REFERENCES users (id) NOT DEFERRABLE INITIALLY IMMEDIATE;');
|
||||||
$this->addSql('CREATE INDEX IDX_E260A868A76ED395 ON chill_person_accompanying_period (user_id);');
|
$this->addSql('CREATE INDEX IDX_E260A868A76ED395 ON chill_person_accompanying_period (user_id);');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function down(Schema $schema) : void
|
public function down(Schema $schema): void
|
||||||
{
|
{
|
||||||
$this->addSql('ALTER TABLE chill_person_accompanying_period DROP user_id');
|
$this->addSql('ALTER TABLE chill_person_accompanying_period DROP user_id');
|
||||||
}
|
}
|
@ -10,7 +10,7 @@ use Doctrine\Migrations\AbstractMigration;
|
|||||||
*/
|
*/
|
||||||
final class Version20191106103452 extends AbstractMigration
|
final class Version20191106103452 extends AbstractMigration
|
||||||
{
|
{
|
||||||
public function up(Schema $schema) : void
|
public function up(Schema $schema): void
|
||||||
{
|
{
|
||||||
$this->addSql("CREATE INDEX phonenumber_trgm_idx
|
$this->addSql("CREATE INDEX phonenumber_trgm_idx
|
||||||
ON public.chill_person_person USING gin
|
ON public.chill_person_person USING gin
|
||||||
@ -22,7 +22,7 @@ final class Version20191106103452 extends AbstractMigration
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function down(Schema $schema) : void
|
public function down(Schema $schema): void
|
||||||
{
|
{
|
||||||
$this->addSql("DROP INDEX phonenumber_trgm_idx");
|
$this->addSql("DROP INDEX phonenumber_trgm_idx");
|
||||||
$this->addSql("DROP INDEX mobilenumber_trgm_idx");
|
$this->addSql("DROP INDEX mobilenumber_trgm_idx");
|
@ -10,7 +10,7 @@ use Doctrine\Migrations\AbstractMigration;
|
|||||||
*/
|
*/
|
||||||
final class Version20200128084445 extends AbstractMigration
|
final class Version20200128084445 extends AbstractMigration
|
||||||
{
|
{
|
||||||
public function up(Schema $schema) : void
|
public function up(Schema $schema): void
|
||||||
{
|
{
|
||||||
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
|
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
|
||||||
|
|
||||||
@ -20,7 +20,7 @@ final class Version20200128084445 extends AbstractMigration
|
|||||||
$this->addSql("ALTER TABLE chill_person_alt_name ADD CONSTRAINT FK_2628668E217BBB47 FOREIGN KEY (person_id) REFERENCES chill_person_person (id) NOT DEFERRABLE INITIALLY IMMEDIATE");
|
$this->addSql("ALTER TABLE chill_person_alt_name ADD CONSTRAINT FK_2628668E217BBB47 FOREIGN KEY (person_id) REFERENCES chill_person_person (id) NOT DEFERRABLE INITIALLY IMMEDIATE");
|
||||||
}
|
}
|
||||||
|
|
||||||
public function down(Schema $schema) : void
|
public function down(Schema $schema): void
|
||||||
{
|
{
|
||||||
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
|
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
|
||||||
|
|
@ -114,7 +114,7 @@ CREATE TRIGGER canonicalize_fullname_on_alt_name_update
|
|||||||
EXECUTE PROCEDURE canonicalize_fullname_on_alt_name_alter();
|
EXECUTE PROCEDURE canonicalize_fullname_on_alt_name_alter();
|
||||||
SQL;
|
SQL;
|
||||||
|
|
||||||
public function up(Schema $schema) : void
|
public function up(Schema $schema): void
|
||||||
{
|
{
|
||||||
// update fullname
|
// update fullname
|
||||||
$this->addSql("ALTER TABLE chill_person_person ALTER fullnamecanonical TYPE TEXT;");
|
$this->addSql("ALTER TABLE chill_person_person ALTER fullnamecanonical TYPE TEXT;");
|
||||||
@ -128,7 +128,7 @@ SQL;
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function down(Schema $schema) : void
|
public function down(Schema $schema): void
|
||||||
{
|
{
|
||||||
$this->addSql("DROP TRIGGER canonicalize_fullname_on_alt_name_update ON chill_person_alt_name;");
|
$this->addSql("DROP TRIGGER canonicalize_fullname_on_alt_name_update ON chill_person_alt_name;");
|
||||||
$this->addSql("DROP TRIGGER canonicalize_fullname_on_alt_name_insert ON chill_person_alt_name;");
|
$this->addSql("DROP TRIGGER canonicalize_fullname_on_alt_name_insert ON chill_person_alt_name;");
|
@ -10,7 +10,7 @@ use Doctrine\Migrations\AbstractMigration;
|
|||||||
*/
|
*/
|
||||||
final class Version20200310090632 extends AbstractMigration
|
final class Version20200310090632 extends AbstractMigration
|
||||||
{
|
{
|
||||||
public function up(Schema $schema) : void
|
public function up(Schema $schema): void
|
||||||
{
|
{
|
||||||
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
|
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
|
||||||
|
|
||||||
@ -21,7 +21,7 @@ final class Version20200310090632 extends AbstractMigration
|
|||||||
$this->addsql("ALTER TABLE chill_person_closingmotive ADD ordering DOUBLE PRECISION DEFAULT '0' NOT NULL;");
|
$this->addsql("ALTER TABLE chill_person_closingmotive ADD ordering DOUBLE PRECISION DEFAULT '0' NOT NULL;");
|
||||||
}
|
}
|
||||||
|
|
||||||
public function down(Schema $schema) : void
|
public function down(Schema $schema): void
|
||||||
{
|
{
|
||||||
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
|
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
|
||||||
|
|
@ -10,7 +10,7 @@ use Doctrine\Migrations\AbstractMigration;
|
|||||||
*/
|
*/
|
||||||
final class Version20200422125935 extends AbstractMigration
|
final class Version20200422125935 extends AbstractMigration
|
||||||
{
|
{
|
||||||
public function up(Schema $schema) : void
|
public function up(Schema $schema): void
|
||||||
{
|
{
|
||||||
$this->addSql('DROP FUNCTION get_last_address(integer, date)');
|
$this->addSql('DROP FUNCTION get_last_address(integer, date)');
|
||||||
$this->addSql(<<<'SQL'
|
$this->addSql(<<<'SQL'
|
||||||
@ -80,7 +80,7 @@ SQL
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function down(Schema $schema) : void
|
public function down(Schema $schema): void
|
||||||
{
|
{
|
||||||
$this->addSql('DROP FUNCTION public.get_last_address_isnoaddress(integer, date);');
|
$this->addSql('DROP FUNCTION public.get_last_address_isnoaddress(integer, date);');
|
||||||
$this->addSql('DROP FUNCTION get_last_address(integer, date)');
|
$this->addSql('DROP FUNCTION get_last_address(integer, date)');
|
Loading…
x
Reference in New Issue
Block a user