Add migrations and update config
This commit is contained in:
39
migrations/Version20241128014243.php
Normal file
39
migrations/Version20241128014243.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?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 Version20241128014243 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('ALTER TABLE company ADD owner_id BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\', DROP poc');
|
||||
$this->addSql('ALTER TABLE company ADD CONSTRAINT FK_4FBF094F7E3C61F9 FOREIGN KEY (owner_id) REFERENCES user (id)');
|
||||
$this->addSql('CREATE UNIQUE INDEX UNIQ_4FBF094F7E3C61F9 ON company (owner_id)');
|
||||
$this->addSql('ALTER TABLE member_case ADD level VARCHAR(255) NOT NULL');
|
||||
$this->addSql('ALTER TABLE user ADD level VARCHAR(255) NOT NULL, CHANGE company_id company_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\'');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE company DROP FOREIGN KEY FK_4FBF094F7E3C61F9');
|
||||
$this->addSql('DROP INDEX UNIQ_4FBF094F7E3C61F9 ON company');
|
||||
$this->addSql('ALTER TABLE company ADD poc VARCHAR(255) NOT NULL, DROP owner_id');
|
||||
$this->addSql('ALTER TABLE member_case DROP level');
|
||||
$this->addSql('ALTER TABLE user DROP level, CHANGE company_id company_id BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\'');
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user