<?php
 include_once(LIB_PATH . 'migrations' . DIRECTORY_SEPARATOR . 'TCmsMigrationDb.php');
 use TCMS\Migration\MigrationDb;
 class Schema {
 private static $migrationDb = null;
 public static function create(string $tableName, Callable $setColumnFunction) {
 if(self::$migrationDb == null) self::$migrationDb = new MigrationDb();
 return self::$migrationDb->create($tableName, $setColumnFunction);
 }
 public static function update(string $tableName, Callable $setColumnFunction) {
 if(self::$migrationDb == null) self::$migrationDb = new MigrationDb();
 return self::$migrationDb->update($tableName, $setColumnFunction);
 }
 public static function updateOrCreate(string $tableName, Callable $setColumnFunction) {
 if(self::$migrationDb == null) self::$migrationDb = new MigrationDb();
 return self::$migrationDb->updateOrCreate($tableName, $setColumnFunction);
 }
 public static function drop(string $tableName) {
 if(self::$migrationDb == null) self::$migrationDb = new MigrationDb();
 return self::$migrationDb->drop($tableName);
 }
 public static function isColumnExist(string $tableName, string $columnName) {
 if(self::$migrationDb == null) self::$migrationDb = new MigrationDb();
 return self::$migrationDb->isColumnExist($tableName, $columnName);
 }
 public static function isTableExist(string $tableName) {
 if(self::$migrationDb == null) self::$migrationDb = new MigrationDb();
 return self::$migrationDb->isTableExist($tableName);
 }
 public static function dropColumn(string $tableName, string $columnName) {
 if(self::$migrationDb == null) self::$migrationDb = new MigrationDb();
 return self::$migrationDb->dropColumn($tableName, $columnName);
 }
 public static function query(string $queryString, array $prepareData = null) {
 if(self::$migrationDb == null) self::$migrationDb = new MigrationDb();
 return self::$migrationDb->query($queryString, $prepareData);
 }
 }
