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'); } }