aboutsummaryrefslogtreecommitdiffhomepage
path: root/app/DoctrineMigrations/Version20160410190541.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/DoctrineMigrations/Version20160410190541.php')
-rw-r--r--app/DoctrineMigrations/Version20160410190541.php16
1 files changed, 8 insertions, 8 deletions
diff --git a/app/DoctrineMigrations/Version20160410190541.php b/app/DoctrineMigrations/Version20160410190541.php
index 5e5cae35..55c12ce1 100644
--- a/app/DoctrineMigrations/Version20160410190541.php
+++ b/app/DoctrineMigrations/Version20160410190541.php
@@ -22,11 +22,6 @@ class Version20160410190541 extends AbstractMigration implements ContainerAwareI
22 $this->container = $container; 22 $this->container = $container;
23 } 23 }
24 24
25 private function getTable($tableName)
26 {
27 return $this->container->getParameter('database_table_prefix').$tableName;
28 }
29
30 /** 25 /**
31 * @param Schema $schema 26 * @param Schema $schema
32 */ 27 */
@@ -44,10 +39,10 @@ class Version20160410190541 extends AbstractMigration implements ContainerAwareI
44 $sharePublic = $this->container 39 $sharePublic = $this->container
45 ->get('doctrine.orm.default_entity_manager') 40 ->get('doctrine.orm.default_entity_manager')
46 ->getConnection() 41 ->getConnection()
47 ->fetchArray('SELECT * FROM '.$this->getTable('craue_config_setting')." WHERE name = 'share_public'"); 42 ->fetchArray('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'share_public'");
48 43
49 if (false === $sharePublic) { 44 if (false === $sharePublic) {
50 $this->addSql('INSERT INTO '.$this->getTable('craue_config_setting')." (name, value, section) VALUES ('share_public', '1', 'entry')"); 45 $this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('share_public', '1', 'entry')");
51 } 46 }
52 } 47 }
53 48
@@ -59,6 +54,11 @@ class Version20160410190541 extends AbstractMigration implements ContainerAwareI
59 $entryTable = $schema->getTable($this->getTable('entry')); 54 $entryTable = $schema->getTable($this->getTable('entry'));
60 $entryTable->dropColumn('uid'); 55 $entryTable->dropColumn('uid');
61 56
62 $this->addSql('DELETE FROM '.$this->getTable('craue_config_setting')." WHERE name = 'share_public'"); 57 $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'share_public'");
58 }
59
60 private function getTable($tableName)
61 {
62 return $this->container->getParameter('database_table_prefix') . $tableName;
63 } 63 }
64} 64}