<?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 Version20240612122928 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('CREATE TABLE vat_rate_extra (id INT AUTO_INCREMENT NOT NULL, hotel_id INT DEFAULT NULL, rate_cyprus INT DEFAULT NULL, accounting_income_current_code_cyprus VARCHAR(255) DEFAULT NULL, accounting_expense_current_code_cyprus VARCHAR(255) DEFAULT NULL, percentage_sales_amount_cyprus NUMERIC(10, 2) DEFAULT NULL, percentage_sales_income_current_code_cyprus VARCHAR(255) DEFAULT NULL, percentage_sales_expense_current_code_cyprus VARCHAR(255) DEFAULT NULL, rate_domestic INT DEFAULT NULL, accounting_income_current_code_domestic VARCHAR(255) DEFAULT NULL, accounting_expense_current_code_domestic VARCHAR(255) DEFAULT NULL, percentage_sales_amount_domestic NUMERIC(10, 2) DEFAULT NULL, percentage_sales_income_current_code_domestic VARCHAR(255) DEFAULT NULL, percentage_sales_expense_current_code_domestic VARCHAR(255) DEFAULT NULL, rate_abroad INT DEFAULT NULL, accounting_income_current_code_abroad VARCHAR(255) DEFAULT NULL, accounting_expense_current_code_abroad VARCHAR(255) DEFAULT NULL, percentage_sales_amount_abroad NUMERIC(10, 2) DEFAULT NULL, percentage_sales_income_current_code_abroad VARCHAR(255) DEFAULT NULL, percentage_sales_expense_current_code_abroad VARCHAR(255) DEFAULT NULL, UNIQUE INDEX UNIQ_E28C6DB63243BB18 (hotel_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE vat_rate_extra ADD CONSTRAINT FK_E28C6DB63243BB18 FOREIGN KEY (hotel_id) REFERENCES hotel (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE vat_rate_extra DROP FOREIGN KEY FK_E28C6DB63243BB18');
$this->addSql('DROP TABLE vat_rate_extra');
}
}