|
| 1 | +<?php namespace Database\Migrations\Model; |
| 2 | +/** |
| 3 | + * Copyright 2025 OpenStack Foundation |
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | + * you may not use this file except in compliance with the License. |
| 6 | + * You may obtain a copy of the License at |
| 7 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | + * Unless required by applicable law or agreed to in writing, software |
| 9 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 10 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 11 | + * See the License for the specific language governing permissions and |
| 12 | + * limitations under the License. |
| 13 | + **/ |
| 14 | +use Doctrine\DBAL\Schema\Schema; |
| 15 | +use Doctrine\Migrations\AbstractMigration; |
| 16 | + |
| 17 | +/** |
| 18 | + * Auto-generated Migration: Please modify to your needs! |
| 19 | + */ |
| 20 | +final class Version20260220195027 extends AbstractMigration |
| 21 | +{ |
| 22 | + public function getDescription(): string |
| 23 | + { |
| 24 | + return 'update tax rate precision'; |
| 25 | + } |
| 26 | + |
| 27 | + public function up(Schema $schema): void |
| 28 | + { |
| 29 | + $sql = <<<SQL |
| 30 | +ALTER TABLE `SummitTaxType` CHANGE `Rate` `Rate` DECIMAL(9,5) NOT NULL DEFAULT '0.00000'; |
| 31 | +SQL; |
| 32 | + |
| 33 | + $this->addSql($sql); |
| 34 | + |
| 35 | + $sql = <<<SQL |
| 36 | +ALTER TABLE `SummitAttendeeTicket_Taxes` CHANGE `Rate` `Rate` DECIMAL(9,5) NOT NULL DEFAULT '0.00000'; |
| 37 | +SQL; |
| 38 | + |
| 39 | + $this->addSql($sql); |
| 40 | + |
| 41 | + } |
| 42 | + |
| 43 | + public function down(Schema $schema): void |
| 44 | + { |
| 45 | + $sql = <<<SQL |
| 46 | +ALTER TABLE `SummitTaxType` CHANGE `Rate` `Rate` DECIMAL(9,2) NOT NULL DEFAULT '0.00'; |
| 47 | +SQL; |
| 48 | + |
| 49 | + $this->addSql($sql); |
| 50 | + |
| 51 | + $sql = <<<SQL |
| 52 | +ALTER TABLE `SummitAttendeeTicket_Taxes` CHANGE `Rate` `Rate` DECIMAL(9,2) NOT NULL DEFAULT '0.00'; |
| 53 | +SQL; |
| 54 | + |
| 55 | + $this->addSql($sql); |
| 56 | + |
| 57 | + } |
| 58 | +} |
0 commit comments