Conditions | 1 |
Paths | 1 |
Total Lines | 13 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
11 | public function up(Schema $schema): void |
||
12 | { |
||
13 | $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); |
||
14 | |||
15 | $this->addSql('UPDATE account SET balance = 100 * balance'); |
||
16 | $this->addSql('UPDATE transaction_line SET balance = 100 * balance'); |
||
17 | $this->addSql('UPDATE expense_claim SET amount = 100 * amount'); |
||
18 | $this->addSql('UPDATE bookable SET initial_price = 100 * initial_price, periodic_price = 100 * periodic_price, purchase_price = 100 * purchase_price;'); |
||
19 | |||
20 | $this->addSql('ALTER TABLE account CHANGE balance balance INT DEFAULT 0 NOT NULL COMMENT \'(DC2Type:Money)\''); |
||
21 | $this->addSql('ALTER TABLE transaction_line CHANGE balance balance INT UNSIGNED NOT NULL COMMENT \'(DC2Type:Money)\''); |
||
22 | $this->addSql('ALTER TABLE expense_claim CHANGE amount amount INT UNSIGNED NOT NULL COMMENT \'(DC2Type:Money)\''); |
||
23 | $this->addSql('ALTER TABLE bookable CHANGE initial_price initial_price INT DEFAULT 0 NOT NULL COMMENT \'(DC2Type:Money)\', CHANGE periodic_price periodic_price INT DEFAULT 0 NOT NULL COMMENT \'(DC2Type:Money)\', CHANGE purchase_price purchase_price INT UNSIGNED DEFAULT 0 NOT NULL COMMENT \'(DC2Type:Money)\';'); |
||
24 | } |
||
26 |