From 18fb777b89c6cca529979ab1202eb1af5458bd5d Mon Sep 17 00:00:00 2001 From: adev Date: Fri, 3 Nov 2017 00:41:47 +0100 Subject: Add an initial migration --- app/DoctrineMigrations/Version20160401000000.php | 181 +++++++++++++++++++++++ 1 file changed, 181 insertions(+) create mode 100644 app/DoctrineMigrations/Version20160401000000.php (limited to 'app/DoctrineMigrations/Version20160401000000.php') diff --git a/app/DoctrineMigrations/Version20160401000000.php b/app/DoctrineMigrations/Version20160401000000.php new file mode 100644 index 00000000..34d97d16 --- /dev/null +++ b/app/DoctrineMigrations/Version20160401000000.php @@ -0,0 +1,181 @@ +version->getConfiguration()->getNumberOfExecutedMigrations() > 0) { + $this->version->markMigrated(); + $this->skipIf(true, 'Database already initialized'); + } + + switch ($this->connection->getDatabasePlatform()->getName()) { + case 'sqlite': + $sql = <<addSql($query); + } + + break; + case 'mysql': + $sql = <<addSql($query); + } + break; + + case 'postgresql': + $sql = <<addSql($query); + } + break; + } + } + + /** + * @param Schema $schema + */ + public function down(Schema $schema) + { + //TODO: drop tables + } +} -- cgit v1.2.3