Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions Symfony/app/DoctrineMigrations/Version20160331141711.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?php

namespace Application\Migrations;

use Doctrine\DBAL\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;

/**
* Auto-generated Migration: Please modify to your needs!
*/
class Version20160331141711 extends AbstractMigration
{
/**
* @param Schema $schema
*/
public function up(Schema $schema)
{
// this up() migration is auto-generated, please modify it to your needs
$this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on \'mysql\'.');

$this->addSql('ALTER TABLE Example DROP FOREIGN KEY FK_A151A203FE2541D7');
$this->addSql('DROP TABLE Example');
$this->addSql('DROP TABLE ExternalLibrary');
}

/**
* @param Schema $schema
*/
public function down(Schema $schema)
{
// this down() migration is auto-generated, please modify it to your needs
$this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on \'mysql\'.');

$this->addSql('CREATE TABLE Example (id INT AUTO_INCREMENT NOT NULL, library_id INT DEFAULT NULL, name VARCHAR(255) NOT NULL, path VARCHAR(255) NOT NULL, boards VARCHAR(2048) DEFAULT NULL, INDEX IDX_A151A203FE2541D7 (library_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB');
$this->addSql('CREATE TABLE ExternalLibrary (id INT AUTO_INCREMENT NOT NULL, humanName VARCHAR(255) NOT NULL, machineName VARCHAR(255) NOT NULL, description VARCHAR(2048) NOT NULL, owner VARCHAR(255) DEFAULT NULL, repo VARCHAR(255) DEFAULT NULL, verified TINYINT(1) NOT NULL, active TINYINT(1) NOT NULL, lastCommit VARCHAR(255) DEFAULT NULL, url VARCHAR(512) DEFAULT NULL, branch VARCHAR(255) DEFAULT NULL, in_repo_path VARCHAR(255) DEFAULT NULL, notes LONGTEXT DEFAULT NULL, source_url VARCHAR(512) DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB');
$this->addSql('ALTER TABLE Example ADD CONSTRAINT FK_A151A203FE2541D7 FOREIGN KEY (library_id) REFERENCES ExternalLibrary (id)');
}
}

This file was deleted.

This file was deleted.

Loading