From: Evan Prodromou Date: Thu, 2 Jun 2011 17:58:53 +0000 (-0400) Subject: initialize schema_version table after install X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=e1791525e818d7d4276da0fe7e7c526fe8794e7c;p=quix0rs-gnu-social.git initialize schema_version table after install --- diff --git a/plugins/DomainStatusNetwork/domainstatusnetworkinstaller.php b/plugins/DomainStatusNetwork/domainstatusnetworkinstaller.php index efa7784955..b2e988b5e1 100644 --- a/plugins/DomainStatusNetwork/domainstatusnetworkinstaller.php +++ b/plugins/DomainStatusNetwork/domainstatusnetworkinstaller.php @@ -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'); }