X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=app%2FDoctrineMigrations%2FVersion20161122144743.php;h=388a0e4b0346fdb278f222e4a9bc025fc233010e;hb=eef47c0ead8e7aa754f5160d077aaaa9f16937c9;hp=536b833993539f2f3755c529042d8016dd15c2e8;hpb=24becc9717423748e6ef06c6cf1c499435af66b9;p=github%2Fwallabag%2Fwallabag.git diff --git a/app/DoctrineMigrations/Version20161122144743.php b/app/DoctrineMigrations/Version20161122144743.php index 536b8339..388a0e4b 100644 --- a/app/DoctrineMigrations/Version20161122144743.php +++ b/app/DoctrineMigrations/Version20161122144743.php @@ -32,6 +32,13 @@ class Version20161122144743 extends AbstractMigration implements ContainerAwareI */ public function up(Schema $schema) { + $access = $this->container + ->get('doctrine.orm.default_entity_manager') + ->getConnection() + ->fetchArray('SELECT * FROM '.$this->getTable('craue_config_setting')." WHERE name = 'restricted_access'"); + + $this->skipIf(false !== $access, 'It seems that you already played this migration.'); + $this->addSql('INSERT INTO '.$this->getTable('craue_config_setting')." (name, value, section) VALUES ('restricted_access', 0, 'entry')"); }