Compare commits
No commits in common. "42ec5faa4aa856b2119297128c7bf280c6acd773" and "5d752f6ee349cd693ce4b68d258367c5d979b8a4" have entirely different histories.
42ec5faa4a
...
5d752f6ee3
|
@ -8,4 +8,4 @@ user = ""
|
|||
pass = ""
|
||||
port = ""
|
||||
database = ""
|
||||
file = "anime_collection.sqlite3"
|
||||
file = "anime_collection.sqlite"
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
paths:
|
||||
migrations: '%%PHINX_CONFIG_DIR%%/migrations'
|
||||
migrations: %%PHINX_CONFIG_DIR%%/migrations
|
||||
|
||||
environments:
|
||||
default_migration_table: phinxlog
|
||||
default_database: development
|
||||
development:
|
||||
adapter: sqlite
|
||||
name: ./anime_collection # Phinx will add a .sqlite3 suffix
|
||||
name: ./anime_collection.sqlite
|
||||
|
|
|
@ -25,12 +25,6 @@ use PDOException;
|
|||
*/
|
||||
class Collection extends DB {
|
||||
|
||||
/**
|
||||
* The query builder object
|
||||
* @var \Query\Query_Builder_Interface
|
||||
*/
|
||||
protected $db;
|
||||
|
||||
/**
|
||||
* Whether the database is valid for querying
|
||||
* @var boolean
|
||||
|
@ -49,7 +43,6 @@ class Collection extends DB {
|
|||
try
|
||||
{
|
||||
$this->db = \Query($this->dbConfig);
|
||||
$this->validDatabase = TRUE;
|
||||
}
|
||||
catch (PDOException $e) {}
|
||||
|
||||
|
@ -69,9 +62,9 @@ class Collection extends DB {
|
|||
$this->validDatabase = FALSE;
|
||||
}
|
||||
}
|
||||
else if ($this->db === NULL)
|
||||
else
|
||||
{
|
||||
$this->validDatabase = FALSE;
|
||||
$this->validDatabase = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -24,6 +24,12 @@ use Aviat\Ion\Di\{ContainerAware, ContainerInterface};
|
|||
class DB {
|
||||
use ContainerAware;
|
||||
|
||||
/**
|
||||
* The query builder object
|
||||
* @var \Query\Query_Builder_Interface
|
||||
*/
|
||||
protected $db;
|
||||
|
||||
/**
|
||||
* The database connection information array
|
||||
* @var array $dbConfig
|
||||
|
|
Loading…
Reference in New Issue