WIP: Extend and improve profile editing
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
<?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 Version20230930150355 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 disposition_requirement DROP FOREIGN KEY FK_F3C6374CC26E160B');
|
||||
$this->addSql('ALTER TABLE assignment_pickup DROP FOREIGN KEY FK_79BF19E0C26E160B');
|
||||
$this->addSql('ALTER TABLE assignment_pickup DROP FOREIGN KEY FK_79BF19E0D19302F8');
|
||||
$this->addSql('DROP TABLE pickup');
|
||||
$this->addSql('DROP TABLE assignment_pickup');
|
||||
$this->addSql('DROP INDEX IDX_F3C6374CC26E160B ON disposition_requirement');
|
||||
$this->addSql('ALTER TABLE disposition_requirement DROP pickup_id');
|
||||
$this->addSql('ALTER TABLE job_profile CHANGE required_licenses required_licenses JSON NOT NULL COMMENT \'(DC2Type:json)\'');
|
||||
$this->addSql('ALTER TABLE teamer ADD pickups JSON NOT NULL COMMENT \'(DC2Type:json)\'');
|
||||
$this->addSql('ALTER TABLE user CHANGE roles roles JSON NOT NULL COMMENT \'(DC2Type:json)\'');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('CREATE TABLE pickup (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, bus_pro_id INT NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
|
||||
$this->addSql('CREATE TABLE assignment_pickup (assignment_id INT NOT NULL, pickup_id INT NOT NULL, INDEX IDX_79BF19E0D19302F8 (assignment_id), INDEX IDX_79BF19E0C26E160B (pickup_id), PRIMARY KEY(assignment_id, pickup_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
|
||||
$this->addSql('ALTER TABLE assignment_pickup ADD CONSTRAINT FK_79BF19E0C26E160B FOREIGN KEY (pickup_id) REFERENCES pickup (id) ON DELETE CASCADE');
|
||||
$this->addSql('ALTER TABLE assignment_pickup ADD CONSTRAINT FK_79BF19E0D19302F8 FOREIGN KEY (assignment_id) REFERENCES assignment (id) ON DELETE CASCADE');
|
||||
$this->addSql('ALTER TABLE user CHANGE roles roles JSON NOT NULL COMMENT \'(DC2Type:json)\'');
|
||||
$this->addSql('ALTER TABLE teamer DROP pickups');
|
||||
$this->addSql('ALTER TABLE disposition_requirement ADD pickup_id INT DEFAULT NULL');
|
||||
$this->addSql('ALTER TABLE disposition_requirement ADD CONSTRAINT FK_F3C6374CC26E160B FOREIGN KEY (pickup_id) REFERENCES pickup (id)');
|
||||
$this->addSql('CREATE INDEX IDX_F3C6374CC26E160B ON disposition_requirement (pickup_id)');
|
||||
$this->addSql('ALTER TABLE job_profile CHANGE required_licenses required_licenses JSON NOT NULL COMMENT \'(DC2Type:json)\'');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
<?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 Version20230930150821 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 teamer ADD language VARCHAR(255) NOT NULL, ADD size VARCHAR(2) NOT NULL');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE teamer DROP language, DROP size');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user