'Cake\Database\Connection', 'driver' => 'Cake\Database\Driver\Sqlite', 'database' => TMP . 'debug_kit.sqlite', 'encoding' => 'utf8', 'cacheMetadata' => true, 'quoteIdentifiers' => false, ]); ConnectionManager::alias('test_debug_kit', 'debug_kit'); // Fixate sessionid early on, as php7.2+ // does not allow the sessionid to be set after stdout // has been written to. session_id('cli'); // Load db schema from mysql.sql and run migrations // super hacky way to skip migrations if (!in_array('skip-migrations', $_SERVER['argv'])) { // TODO: Removing mysql.sql and relying only in migrations would be ideal // in the meantime, `'skip' => ['*']`, prevents migrations from droping already created tables (new SchemaLoader())->loadSqlFiles('./INSTALL/mysql.sql', 'test'); $migrator = new Migrator(); $migrator->runMany([ ['connection' => 'test', 'skip' => ['*']], ['plugin' => 'Tags', 'connection' => 'test', 'skip' => ['*']], ['plugin' => 'ADmad/SocialAuth', 'connection' => 'test', 'skip' => ['*']] ]); }else{ echo "[ * ] Skipping migrations ...\n"; }