]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
initialize schema_version table after install
authorEvan Prodromou <evan@status.net>
Thu, 2 Jun 2011 17:58:53 +0000 (13:58 -0400)
committerEvan Prodromou <evan@status.net>
Thu, 2 Jun 2011 17:58:53 +0000 (13:58 -0400)
plugins/DomainStatusNetwork/domainstatusnetworkinstaller.php

index efa77849551ad7896b19e55525ba0e2d1662dbd3..b2e988b5e1eca1c9521ea3de318ebee7014ecf71 100644 (file)
@@ -214,6 +214,21 @@ class DomainStatusNetworkInstaller extends Installer
 
         StatusNet::switchSite($this->nickname);
 
+        // We need to initialize the schema_version stuff to make later setup easier
+
+        $schema = array();
+        require INSTALLDIR.'/db/core.php';
+        $tableDefs = $schema;
+
+        $schema = Schema::get();
+        $schemaUpdater = new SchemaUpdater($schema);
+
+        foreach ($tableDefs as $table => $def) {
+            $schemaUpdater->register($table, $def);
+        }
+
+        $schemaUpdater->checkSchema();
+
         Event::handle('CheckSchema');
     }