From 3b68f6ca727f52f9dc84fa1a134c092b44c49103 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Sat, 16 Jun 2018 11:40:00 +0200 Subject: Add ldap --- app/DoctrineMigrations/Version20170710113900.php | 54 ++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 app/DoctrineMigrations/Version20170710113900.php (limited to 'app/DoctrineMigrations') diff --git a/app/DoctrineMigrations/Version20170710113900.php b/app/DoctrineMigrations/Version20170710113900.php new file mode 100644 index 00000000..7be83110 --- /dev/null +++ b/app/DoctrineMigrations/Version20170710113900.php @@ -0,0 +1,54 @@ +container = $container; + } + + private function getTable($tableName) + { + return $this->container->getParameter('database_table_prefix').$tableName; + } + + /** + * @param Schema $schema + */ + public function up(Schema $schema) + { + $usersTable = $schema->getTable($this->getTable('user')); + + $this->skipIf($usersTable->hasColumn('dn'), 'It seems that you already played this migration.'); + + $usersTable->addColumn('dn', 'text', [ + 'default' => null, + 'notnull' => false, + ]); + } + + /** + * @param Schema $schema + */ + public function down(Schema $schema) + { + $usersTable = $schema->getTable($this->getTable('user')); + $usersTable->dropColumn('dn'); + } +} + -- cgit v1.2.3