migrations/Finance/Version20200511094531_Types.php line 1

  1. <?php
  2. declare(strict_types=1);
  3. namespace DoctrineMigrations\Finance;
  4. use App\Doctrine\Type\Finance\BillType;
  5. use App\Doctrine\Type\Finance\ChargeableType;
  6. use App\Doctrine\Type\Finance\ExpenseType;
  7. use App\Doctrine\Type\Finance\InvoiceType;
  8. use App\Doctrine\Type\Finance\PayableStatus;
  9. use Doctrine\DBAL\Schema\Schema;
  10. use Doctrine\Migrations\AbstractMigration;
  11. /**
  12.  * Auto-generated Migration: Please modify to your needs!
  13.  */
  14. final class Version20200511094531_Types extends AbstractMigration
  15. {
  16.     public function getDescription() : string
  17.     {
  18.         return 'Import all finance related custom types';
  19.     }
  20.     public function up(Schema $schema) : void
  21.     {
  22.         $this->addSql(ChargeableType::getRegistrationSQL());
  23.         $this->addSql(InvoiceType::getRegistrationSQL());
  24.         $this->addSql(BillType::getRegistrationSQL());
  25.         $this->addSql(PayableStatus::getRegistrationSQL());
  26.         $this->addSql(ExpenseType::getRegistrationSQL());
  27.     }
  28.     public function down(Schema $schema) : void
  29.     {
  30.         $this->addSql(ChargeableType::getDeletionSQL());
  31.         $this->addSql(InvoiceType::getDeletionSQL());
  32.         $this->addSql(BillType::getDeletionSQL());
  33.         $this->addSql(PayableStatus::getDeletionSQL());
  34.         $this->addSql(ExpenseType::getDeletionSQL());
  35.     }
  36. }