forked from legacyfighter/cabs-php
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVersion20220212082639.php
37 lines (31 loc) · 1.32 KB
/
Version20220212082639.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?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 Version20220212082639 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 awarded_miles ADD account_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE awarded_miles ADD CONSTRAINT FK_43471B899B6B5FBA FOREIGN KEY (account_id) REFERENCES awards_account (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('CREATE INDEX IDX_43471B899B6B5FBA ON awarded_miles (account_id)');
$this->addSql('COMMENT ON COLUMN awarded_miles.miles IS \'(DC2Type:miles)\'');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE awarded_miles DROP CONSTRAINT FK_43471B899B6B5FBA');
$this->addSql('DROP INDEX IDX_43471B899B6B5FBA');
$this->addSql('ALTER TABLE awarded_miles DROP account_id');
$this->addSql('COMMENT ON COLUMN awarded_miles.miles IS NULL');
}
}