1 | <?php |
||
2 | |||
3 | /** |
||
4 | * Copyright 2024 SURFnet bv |
||
5 | * |
||
6 | * Licensed under the Apache License, Version 2.0 (the "License"); |
||
7 | * you may not use this file except in compliance with the License. |
||
8 | * You may obtain a copy of the License at |
||
9 | * |
||
10 | * http://www.apache.org/licenses/LICENSE-2.0 |
||
11 | * |
||
12 | * Unless required by applicable law or agreed to in writing, software |
||
13 | * distributed under the License is distributed on an "AS IS" BASIS, |
||
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||
15 | * See the License for the specific language governing permissions and |
||
16 | * limitations under the License. |
||
17 | */ |
||
0 ignored issues
–
show
Coding Style
introduced
by
![]() |
|||
18 | |||
19 | declare(strict_types=1); |
||
20 | |||
21 | namespace Surfnet\Migrations; |
||
22 | |||
23 | use Doctrine\DBAL\Schema\Schema; |
||
24 | use Doctrine\Migrations\AbstractMigration; |
||
25 | |||
26 | /** |
||
27 | * Auto-generated Migration: Please modify to your needs! |
||
28 | */ |
||
0 ignored issues
–
show
|
|||
29 | final class Version20241128131107 extends AbstractMigration |
||
30 | { |
||
31 | public function getDescription(): string |
||
32 | { |
||
33 | return ''; |
||
34 | } |
||
35 | |||
36 | public function up(Schema $schema): void |
||
37 | { |
||
38 | // this up() migration is auto-generated, please modify it to your needs |
||
39 | $this->addSql('DROP TABLE institution_with_ra_locations'); |
||
40 | $this->addSql('ALTER TABLE institution_configuration_options CHANGE number_of_tokens_per_identity_option number_of_tokens_per_identity_option INT DEFAULT 0 NOT NULL'); |
||
41 | $this->addSql('ALTER TABLE vetted_second_factor CHANGE vetting_type vetting_type VARCHAR(255) DEFAULT NULL'); |
||
42 | $this->addSql('CREATE INDEX idx_vetted_second_factor_vetting_type ON vetted_second_factor (vetting_type)'); |
||
43 | $this->addSql('ALTER TABLE vetting_type_hint CHANGE hints hints JSON NOT NULL COMMENT \'(DC2Type:stepup_vetting_type_hints)\''); |
||
44 | } |
||
45 | |||
46 | public function down(Schema $schema): void |
||
47 | { |
||
48 | // this down() migration is auto-generated, please modify it to your needs |
||
49 | $this->addSql('CREATE TABLE institution_with_ra_locations (institution VARCHAR(255) CHARACTER SET utf8mb3 NOT NULL COLLATE `utf8mb3_unicode_ci`, PRIMARY KEY(institution)) DEFAULT CHARACTER SET utf8mb3 COLLATE `utf8mb3_unicode_ci` ENGINE = InnoDB COMMENT = \'\' '); |
||
50 | $this->addSql('ALTER TABLE institution_configuration_options CHANGE number_of_tokens_per_identity_option number_of_tokens_per_identity_option TINYINT(1) DEFAULT 0 NOT NULL'); |
||
51 | $this->addSql('DROP INDEX idx_vetted_second_factor_vetting_type ON vetted_second_factor'); |
||
52 | $this->addSql('ALTER TABLE vetted_second_factor CHANGE vetting_type vetting_type VARCHAR(255) DEFAULT \'unknown\''); |
||
53 | $this->addSql('ALTER TABLE vetting_type_hint CHANGE hints hints LONGTEXT NOT NULL'); |
||
54 | } |
||
55 | } |
||
56 |