From bd125545b875b1459164ddc0b08ff9cbc16ec921 Mon Sep 17 00:00:00 2001 From: Polonkai Gergely Date: Tue, 31 Jul 2012 11:13:40 +0200 Subject: [PATCH] Added migrations Signed-off-by: Gergely Polonkai --- .../Version20120723203021.php | 28 +++++++++++++++++++ .../Version20120723204923.php | 28 +++++++++++++++++++ .../Version20120723210859.php | 28 +++++++++++++++++++ 3 files changed, 84 insertions(+) create mode 100644 app/DoctrineMigrations/Version20120723203021.php create mode 100644 app/DoctrineMigrations/Version20120723204923.php create mode 100644 app/DoctrineMigrations/Version20120723210859.php diff --git a/app/DoctrineMigrations/Version20120723203021.php b/app/DoctrineMigrations/Version20120723203021.php new file mode 100644 index 0000000..58db2a5 --- /dev/null +++ b/app/DoctrineMigrations/Version20120723203021.php @@ -0,0 +1,28 @@ +abortIf($this->connection->getDatabasePlatform()->getName() != "mysql"); + + $this->addSql("ALTER TABLE events ADD cancelled TINYINT(1) NOT NULL"); + } + + public function down(Schema $schema) + { + // this down() migration is autogenerated, please modify it to your needs + $this->abortIf($this->connection->getDatabasePlatform()->getName() != "mysql"); + + $this->addSql("ALTER TABLE events DROP cancelled"); + } +} diff --git a/app/DoctrineMigrations/Version20120723204923.php b/app/DoctrineMigrations/Version20120723204923.php new file mode 100644 index 0000000..c5ffac8 --- /dev/null +++ b/app/DoctrineMigrations/Version20120723204923.php @@ -0,0 +1,28 @@ +abortIf($this->connection->getDatabasePlatform()->getName() != "mysql"); + + $this->addSql("ALTER TABLE events ADD start_date DATE NOT NULL, ADD end_date DATE DEFAULT NULL, DROP start_time, DROP end_time"); + } + + public function down(Schema $schema) + { + // this down() migration is autogenerated, please modify it to your needs + $this->abortIf($this->connection->getDatabasePlatform()->getName() != "mysql"); + + $this->addSql("ALTER TABLE events ADD start_time DATETIME NOT NULL, ADD end_time DATETIME DEFAULT NULL, DROP start_date, DROP end_date"); + } +} diff --git a/app/DoctrineMigrations/Version20120723210859.php b/app/DoctrineMigrations/Version20120723210859.php new file mode 100644 index 0000000..10b8688 --- /dev/null +++ b/app/DoctrineMigrations/Version20120723210859.php @@ -0,0 +1,28 @@ +abortIf($this->connection->getDatabasePlatform()->getName() != "mysql"); + + $this->addSql("ALTER TABLE events ADD start_time TIME NOT NULL, ADD end_time TIME DEFAULT NULL"); + } + + public function down(Schema $schema) + { + // this down() migration is autogenerated, please modify it to your needs + $this->abortIf($this->connection->getDatabasePlatform()->getName() != "mysql"); + + $this->addSql("ALTER TABLE events DROP start_time, DROP end_time"); + } +}