Remove deadcode
This commit is contained in:
parent
74016666c1
commit
6145e61718
24
lib/db.php
24
lib/db.php
|
@ -376,18 +376,6 @@ class OC_DB {
|
|||
public static function createDbFromStructure( $file ) {
|
||||
self::connectDoctrine();
|
||||
return OC_DB_Schema::createDbFromStructure(self::$DOCTRINE, $file);
|
||||
/* FIXME: use CURRENT_TIMESTAMP for all databases. mysql supports it as a default for DATETIME since 5.6.5 [1]
|
||||
* as a fallback we could use <default>0000-01-01 00:00:00</default> everywhere
|
||||
* [1] http://bugs.mysql.com/bug.php?id=27645
|
||||
* http://dev.mysql.com/doc/refman/5.0/en/timestamp-initialization.html
|
||||
* http://www.postgresql.org/docs/8.1/static/functions-datetime.html
|
||||
* http://www.sqlite.org/lang_createtable.html
|
||||
* http://docs.oracle.com/cd/B19306_01/server.102/b14200/functions037.htm
|
||||
*/
|
||||
if( $CONFIG_DBTYPE == 'pgsql' ) { //mysql support it too but sqlite doesn't
|
||||
$content = str_replace( '<default>0000-00-00 00:00:00</default>',
|
||||
'<default>CURRENT_TIMESTAMP</default>', $content );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -405,18 +393,6 @@ class OC_DB {
|
|||
throw $e;
|
||||
}
|
||||
return $result;
|
||||
/* FIXME: use CURRENT_TIMESTAMP for all databases. mysql supports it as a default for DATETIME since 5.6.5 [1]
|
||||
* as a fallback we could use <default>0000-01-01 00:00:00</default> everywhere
|
||||
* [1] http://bugs.mysql.com/bug.php?id=27645
|
||||
* http://dev.mysql.com/doc/refman/5.0/en/timestamp-initialization.html
|
||||
* http://www.postgresql.org/docs/8.1/static/functions-datetime.html
|
||||
* http://www.sqlite.org/lang_createtable.html
|
||||
* http://docs.oracle.com/cd/B19306_01/server.102/b14200/functions037.htm
|
||||
*/
|
||||
if( $CONFIG_DBTYPE == 'pgsql' ) { //mysql support it too but sqlite doesn't
|
||||
$content = str_replace( '<default>0000-00-00 00:00:00</default>',
|
||||
'<default>CURRENT_TIMESTAMP</default>', $content );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -26,9 +26,6 @@ class OC_DB_MDB2SchemaReader {
|
|||
foreach($xml->children() as $child) {
|
||||
switch($child->getName()) {
|
||||
case 'name':
|
||||
$name = (string)$child;
|
||||
$name = str_replace( '*dbname*', self::$DBNAME, $name );
|
||||
break;
|
||||
case 'create':
|
||||
case 'overwrite':
|
||||
case 'charset':
|
||||
|
|
|
@ -7,9 +7,6 @@
|
|||
*/
|
||||
|
||||
class OC_DB_Schema {
|
||||
private static $DBNAME;
|
||||
private static $DBTABLEPREFIX;
|
||||
|
||||
/**
|
||||
* @brief saves database scheme to xml file
|
||||
* @param \Doctrine\DBAL\Connection $conn
|
||||
|
|
Loading…
Reference in New Issue