Merge branch 'main' of https://gitea.dev.digital-medicine.org/mjovanovic/sms_scheduler
This commit is contained in:
commit
7eb2a525df
38
migrations/Version20260708071521.php
Normal file
38
migrations/Version20260708071521.php
Normal file
|
|
@ -0,0 +1,38 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace DoctrineMigrations;
|
||||||
|
|
||||||
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Doctrine\Migrations\AbstractMigration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Auto-generated Migration: Please modify to your needs!
|
||||||
|
*/
|
||||||
|
final class Version20260708071521 extends AbstractMigration
|
||||||
|
{
|
||||||
|
public function getDescription(): string
|
||||||
|
{
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function up(Schema $schema): void
|
||||||
|
{
|
||||||
|
// this up() migration is auto-generated, please modify it to your needs
|
||||||
|
$this->addSql('DROP INDEX unique_quartal');
|
||||||
|
$this->addSql('ALTER TABLE contacts ADD ambu_code VARCHAR(20) DEFAULT NULL');
|
||||||
|
$this->addSql('ALTER TABLE contacts ADD ambulance VARCHAR(50) DEFAULT NULL');
|
||||||
|
$this->addSql('CREATE UNIQUE INDEX unique_quartal ON contacts (phone_number, due_quartal) WHERE due_quartal IS NOT NULL');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down(Schema $schema): void
|
||||||
|
{
|
||||||
|
// this down() migration is auto-generated, please modify it to your needs
|
||||||
|
$this->addSql('CREATE SCHEMA public');
|
||||||
|
$this->addSql('DROP INDEX unique_quartal');
|
||||||
|
$this->addSql('ALTER TABLE contacts DROP ambu_code');
|
||||||
|
$this->addSql('ALTER TABLE contacts DROP ambulance');
|
||||||
|
$this->addSql('CREATE UNIQUE INDEX unique_quartal ON contacts (phone_number, due_quartal) WHERE (due_quartal IS NOT NULL)');
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user