当前位置: 首页>>代码示例>>PHP>>正文


PHP Migration::migrate方法代码示例

本文整理汇总了PHP中Migration::migrate方法的典型用法代码示例。如果您正苦于以下问题:PHP Migration::migrate方法的具体用法?PHP Migration::migrate怎么用?PHP Migration::migrate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Migration的用法示例。


在下文中一共展示了Migration::migrate方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getInstance

    public static function getInstance($conexao, $tabela=NULL){

        // Verifica se existe uma instância da classe
        if(!isset(self::$migrate)):
            try {
                self::$migrate = new Migration($conexao, $tabela);
            } catch (Exception $e) {
                echo "Erro " . $e->getMessage();
            }
        endif;

        return self::$migrate;
    }
开发者ID:viniciusgoliver,项目名称:ModeloCrud,代码行数:13,代码来源:Migration.php

示例2: PearDatabase

        $new_dbname = $dbconfig['db_name'];
        $new_mysql_username = $dbconfig['db_username'];
        $new_mysql_password = $dbconfig['db_password'];
        $conn = new PearDatabase("mysql", $new_host_name, $new_dbname, $new_mysql_username, $new_mysql_password);
        $conn->connect();
        $migrationlog->debug("MICKIE ==> Option = Dump File. Selected Dump File will be applied to the new database");
        @session_unregister('migration_log');
        $_SESSION['migration_log'] = $migration_log;
        if ($conn) {
            $migrationlog->debug("Pear Database object created. Going to create migration object.");
            $obj = new Migration('', $conn);
            $new_host = explode(":", $new_host_name);
            $temp_new_host_name = $new_host[0];
            $new_mysql_port = $new_host[1];
            $obj->setNewDatabaseParams($new_host[0], $new_host[1], $new_mysql_username, $new_mysql_password, $new_dbname);
            $obj->migrate(0, 'dumpsource', $old_dump_filename);
        }
    }
} elseif ($_REQUEST['migration_option'] == 'alter_db_details') {
    //old database values
    $old_host_name = $_REQUEST['alter_old_host_name'];
    $old_mysql_port = $_REQUEST['alter_old_port_no'];
    $old_mysql_username = $_REQUEST['alter_old_mysql_username'];
    $old_mysql_password = $_REQUEST['alter_old_mysql_password'];
    $old_dbname = $_REQUEST['alter_old_dbname'];
    $migrationlog->debug("old host name = " . $old_host_name);
    $migrationlog->debug("old MySQL port = " . $old_mysql_port);
    $migrationlog->debug("old MySQL username = " . $old_mysql_username);
    $migrationlog->debug("old MySQL password = " . $old_mysql_password);
    $migrationlog->debug("old db name = " . $old_dbname);
    //make a connection with the old database
开发者ID:sacredwebsite,项目名称:vtigercrm,代码行数:31,代码来源:MigrationCheck.php

示例3: migrate

 public function migrate()
 {
     $migration = new Migration();
     $migration->migrate();
 }
开发者ID:FMTCco,项目名称:fmtc-php,代码行数:5,代码来源:Database.php


注:本文中的Migration::migrate方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。