private static function database_get_version($package) {
		if (!class_exists('\Skeleton\Database\Database')) {
			throw new \Exception('Skeleton database is not active');
		}
		$table = Config::$database_table;
		$db = \Skeleton\Database\Database::get();
		try {
			$result = $db->query('DESC ' . $table);
		} catch (\Exception $e) {
			$db->query('
				CREATE TABLE `' . $table . '` (
				  `package` varchar(32) NOT NULL,
				  `version` datetime NOT NULL
				);
			', []);

			$all_packages = [];
			$all_packages[] = 'project';
			foreach (\Skeleton\Core\Skeleton::get_all() as $skeleton_package) {
				$all_packages[] = $skeleton_package->name;
			}
			$migrations = [];
			foreach ($all_packages as $migration_package) {
				$version = self::file_get_version($migration_package);
				if ($version !== null) {
					self::set_version($migration_package, $version);
				}
			}
		}

		$version = $db->get_one('SELECT version FROM `' . $table . '` WHERE package=?', [ $package ]);
		if ($version === null) {
			return null;
		}
		return \DateTime::createFromFormat('Y-m-d H:i:s', $version);
	}