<?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 Version20240403092257 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 `school_payments` (
`id` INT NOT NULL AUTO_INCREMENT,
`create_date` DATE NOT NULL,
`school_id` INT NOT NULL,
`payment_date` DATE NULL,
`amount` FLOAT NOT NULL,
`comment` VARCHAR(255) NULL DEFAULT NULL,
`created_by` VARCHAR(100) NOT NULL,
PRIMARY KEY (`id`));");
$this->addSql("CREATE TABLE `school_invoice_details` (
`id` INT NOT NULL AUTO_INCREMENT,
`create_date` DATE NOT NULL,
`school_id` INT NOT NULL,
`registration_id` INT NULL,
`amount` FLOAT NOT NULL,
PRIMARY KEY (`id`))");
$this->addSql("update schools set member_pricePerCredit=45,nonmember_pricePerCredit=45 where id = 209;");
$this->addSql("update schools set member_pricePerCredit=40,nonmember_pricePerCredit=40 where id = 212;");
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql("DROP TABLE `school_payments`;");
$this->addSql("DROP TABLE `school_invoice_details`;");
$this->addSql("update schools set member_pricePerCredit=0,nonmember_pricePerCredit=0 where id = 209;");
$this->addSql("update schools set member_pricePerCredit=0,nonmember_pricePerCredit=0 where id = 212;");
}
}