migrations/Version20241011050910.php line 1

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace DoctrineMigrations;
  4. use Doctrine\DBAL\Schema\Schema;
  5. use Doctrine\Migrations\AbstractMigration;
  6. /**
  7.  * Auto-generated Migration: Please modify to your needs!
  8.  */
  9. final class Version20241011050910 extends AbstractMigration
  10. {
  11.     public function getDescription(): string
  12.     {
  13.         return '';
  14.     }
  15.     public function up(Schema $schema): void
  16.     {
  17.         // this up() migration is auto-generated, please modify it to your needs
  18.         $this->addSql(
  19.             'CREATE TABLE payment_process (
  20.                     id BIGINT UNSIGNED AUTO_INCREMENT NOT NULL,
  21.                     user_id BIGINT UNSIGNED DEFAULT NULL,
  22.                     email VARCHAR(255) NOT NULL,
  23.                     amount DOUBLE PRECISION NOT NULL,
  24.                     artist VARCHAR(255) NOT NULL,
  25.                     amount_to_invoice DOUBLE PRECISION DEFAULT NULL,
  26.                     notes VARCHAR(255) DEFAULT NULL,
  27.                     po_invoice VARCHAR(255) DEFAULT NULL,
  28.                     status VARCHAR(255) DEFAULT NULL,
  29.                     sequence SMALLINT UNSIGNED NOT NULL DEFAULT 0,
  30.                     INDEX IDX_BD9A2AFEA76ED395 (user_id),
  31.                     PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci`
  32.                 ENGINE = InnoDB'
  33.         );
  34.         $this->addSql('ALTER TABLE payment_process ADD CONSTRAINT FK_BD9A2AFEA76ED395 FOREIGN KEY (user_id) REFERENCES user (id)');
  35.     }
  36.     public function down(Schema $schema): void
  37.     {
  38.         // this down() migration is auto-generated, please modify it to your needs
  39.         $this->addSql('ALTER TABLE payment_process DROP FOREIGN KEY FK_BD9A2AFEA76ED395');
  40.         $this->addSql('DROP TABLE payment_process');
  41.     }
  42. }