<?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 Version20250911190342 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 reported_incident DROP FOREIGN KEY FK_17CB030B2576E0FD');
$this->addSql('DROP INDEX IDX_17CB030B2576E0FD ON reported_incident');
$this->addSql('ALTER TABLE reported_incident CHANGE contract_id reported_port_id CHAR(36) DEFAULT NULL COMMENT \'(DC2Type:uuid)\'');
$this->addSql('ALTER TABLE reported_incident ADD CONSTRAINT FK_17CB030BD160AF67 FOREIGN KEY (reported_port_id) REFERENCES reported_port (id)');
$this->addSql('CREATE INDEX IDX_17CB030BD160AF67 ON reported_incident (reported_port_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE additional_cost CHANGE additional_cost additional_cost VARCHAR(191) DEFAULT NULL, CHANGE additional_cost_currency additional_cost_currency VARCHAR(191) DEFAULT NULL, CHANGE additional_type additional_type VARCHAR(191) DEFAULT NULL, CHANGE description description VARCHAR(191) DEFAULT NULL');
$this->addSql('ALTER TABLE berth CHANGE restriction_info_source restriction_info_source VARCHAR(191) DEFAULT NULL');
$this->addSql('ALTER TABLE cargo CHANGE subtype subtype VARCHAR(191) DEFAULT NULL');
$this->addSql('ALTER TABLE checklist CHANGE checklist_name checklist_name VARCHAR(191) NOT NULL');
$this->addSql('ALTER TABLE contract CHANGE contract_type contract_type VARCHAR(191) DEFAULT NULL, CHANGE freight_cost freight_cost VARCHAR(191) DEFAULT NULL, CHANGE freight_cost_currency freight_cost_currency VARCHAR(191) DEFAULT NULL, CHANGE freight_type freight_type VARCHAR(191) DEFAULT NULL, CHANGE demurrage_per_day demurrage_per_day VARCHAR(191) DEFAULT NULL, CHANGE demurrage_per_day_currency demurrage_per_day_currency VARCHAR(191) DEFAULT NULL, CHANGE address_commission address_commission VARCHAR(191) DEFAULT NULL, CHANGE brokerage_commission brokerage_commission VARCHAR(191) DEFAULT NULL, CHANGE demurrage_status demurrage_status VARCHAR(191) DEFAULT NULL, CHANGE final_demurrage_cost final_demurrage_cost VARCHAR(191) DEFAULT NULL, CHANGE final_demurrage_cost_currency final_demurrage_cost_currency VARCHAR(191) DEFAULT NULL, CHANGE demurrage_paid_by_charterer demurrage_paid_by_charterer VARCHAR(191) DEFAULT NULL, CHANGE demurrage_paid_by_charterer_currency demurrage_paid_by_charterer_currency VARCHAR(191) DEFAULT NULL, CHANGE hire_per_day hire_per_day VARCHAR(191) DEFAULT NULL, CHANGE hire_per_day_currency hire_per_day_currency VARCHAR(191) DEFAULT NULL');
$this->addSql('ALTER TABLE contract_cargo CHANGE quantity_m3 quantity_m3 VARCHAR(191) DEFAULT NULL, CHANGE quantity_mt quantity_mt VARCHAR(191) DEFAULT NULL');
$this->addSql('ALTER TABLE delivery_notice CHANGE notice_type notice_type VARCHAR(191) NOT NULL, CHANGE status status VARCHAR(191) NOT NULL');
$this->addSql('ALTER TABLE hire CHANGE fuel_type fuel_type VARCHAR(191) DEFAULT NULL, CHANGE fuel_type2 fuel_type2 VARCHAR(191) DEFAULT NULL, CHANGE fuel_type3 fuel_type3 VARCHAR(191) DEFAULT NULL, CHANGE price price VARCHAR(191) DEFAULT NULL, CHANGE price2 price2 VARCHAR(191) DEFAULT NULL, CHANGE price3 price3 VARCHAR(191) DEFAULT NULL, CHANGE price_currency price_currency VARCHAR(191) DEFAULT NULL, CHANGE price_currency2 price_currency2 VARCHAR(191) DEFAULT NULL, CHANGE price_currency3 price_currency3 VARCHAR(191) DEFAULT NULL, CHANGE off_hire_cost off_hire_cost VARCHAR(191) DEFAULT NULL, CHANGE off_hire_cost_currency off_hire_cost_currency VARCHAR(191) DEFAULT NULL, CHANGE address_commission address_commission VARCHAR(191) DEFAULT NULL, CHANGE extra_costs extra_costs VARCHAR(191) DEFAULT NULL, CHANGE extra_costs_currency extra_costs_currency VARCHAR(191) DEFAULT NULL, CHANGE extra_costs_description extra_costs_description VARCHAR(191) DEFAULT NULL, CHANGE total_invoice total_invoice VARCHAR(191) DEFAULT NULL, CHANGE total_invoice_currency total_invoice_currency VARCHAR(191) DEFAULT NULL, CHANGE invoice_status invoice_status VARCHAR(191) DEFAULT NULL');
$this->addSql('ALTER TABLE payment CHANGE amount amount VARCHAR(191) DEFAULT NULL, CHANGE amount_currency amount_currency VARCHAR(191) DEFAULT NULL, CHANGE description description VARCHAR(191) DEFAULT NULL');
$this->addSql('ALTER TABLE port CHANGE geographic_location geographic_location VARCHAR(191) DEFAULT NULL, CHANGE cost_information_source cost_information_source VARCHAR(191) DEFAULT NULL, CHANGE state state VARCHAR(191) DEFAULT NULL, CHANGE country country VARCHAR(191) NOT NULL');
$this->addSql('ALTER TABLE report CHANGE report_type report_type VARCHAR(191) NOT NULL');
$this->addSql('ALTER TABLE reported_incident DROP FOREIGN KEY FK_17CB030BD160AF67');
$this->addSql('DROP INDEX IDX_17CB030BD160AF67 ON reported_incident');
$this->addSql('ALTER TABLE reported_incident CHANGE category category VARCHAR(191) NOT NULL, CHANGE subcategory subcategory VARCHAR(191) NOT NULL, CHANGE reported_port_id contract_id CHAR(36) DEFAULT NULL COMMENT \'(DC2Type:uuid)\'');
$this->addSql('ALTER TABLE reported_incident ADD CONSTRAINT FK_17CB030B2576E0FD FOREIGN KEY (contract_id) REFERENCES contract (id) ON UPDATE NO ACTION ON DELETE NO ACTION');
$this->addSql('CREATE INDEX IDX_17CB030B2576E0FD ON reported_incident (contract_id)');
$this->addSql('ALTER TABLE vessel CHANGE dwt dwt VARCHAR(191) NOT NULL');
}
}