Welcome Guest, Not a member yet? Register   Sign In
Migration stopped working after v3.1.11

(This post was last modified: 10-04-2019, 08:11 PM by dave friend.)

(10-04-2019, 02:38 PM)jreklund Wrote: @davefriend: It haven't always been there, look at the commit. It just got added to system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php

And it won't be able to append $this->database as it's been (probably) left out in @bartMommens script.

You're partly correct - it hasn't always been there since CI v3.0.0

From CodeIgniter version 2.1.3 (the oldest I have handy) pdo_driver.php

PHP Code:
function _list_tables($prefix_limit FALSE)
    $sql "SHOW TABLES FROM `".$this->database."`";

    if ($prefix_limit !== FALSE AND $this->dbprefix != '')
    //$sql .= " LIKE '".$this->escape_like_str($this->dbprefix)."%' ".sprintf($this->_like_escape_str, $this->_like_escape_chr);
      return FALSE// not currently supported
    return $sql;

So, it was there and then it wasn't and now it is again.

For PDO the database name need not be included in the query, but it isn't wrong to provide it. (Though it does need to be a useful value.)

I cannot see that the database property would get set from a DSN string. It seems only to get a value from the /config/database.php file.

If PDO is being used (meaning the connection is via 'dsn') then the connection settings might have 'database' => '', and that might be why the "incorrect database name '' " error is happening.

We don't know if he's using PDO anyway though it seems likely.

It might be possible to stick with CI v3.1.11 by setting a database name in the config.

Messages In This Thread
RE: Migration stopped working after v3.1.11 - by dave friend - 10-04-2019, 08:09 PM

Theme © iAndrew 2016 - Forum software by © MyBB