| Total Complexity | 2 | 
| Total Lines | 21 | 
| Duplicated Lines | 0 % | 
| Changes | 0 | ||
| 1 | <?php  | 
            ||
| 11 | class Version20181105145541 extends AbstractMigration  | 
            ||
| 12 | { | 
            ||
| 13 | /**  | 
            ||
| 14 | * @param Schema $schema  | 
            ||
| 15 | */  | 
            ||
| 16 | public function up(Schema $schema)  | 
            ||
| 17 |     { | 
            ||
| 18 | $this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on \'mysql\'.');  | 
            ||
| 19 | |||
| 20 |         $this->addSql('CREATE TABLE wayforpay_logs (id INT AUTO_INCREMENT NOT NULL, payment_id INT DEFAULT NULL, date DATETIME NOT NULL, status VARCHAR(255) NOT NULL, responseData LONGTEXT NOT NULL, fwdaysResponse LONGTEXT NOT NULL, INDEX IDX_B473FBBB4C3A3BB (payment_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB'); | 
            ||
| 21 |         $this->addSql('ALTER TABLE wayforpay_logs ADD CONSTRAINT FK_B473FBBB4C3A3BB FOREIGN KEY (payment_id) REFERENCES payments (id)'); | 
            ||
| 22 | }  | 
            ||
| 23 | |||
| 24 | /**  | 
            ||
| 25 | * @param Schema $schema  | 
            ||
| 26 | */  | 
            ||
| 27 | public function down(Schema $schema)  | 
            ||
| 28 |     { | 
            ||
| 29 | $this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on \'mysql\'.');  | 
            ||
| 30 | |||
| 31 |         $this->addSql('DROP TABLE wayforpay_logs'); | 
            ||
| 32 | }  | 
            ||
| 34 |