Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tomáš Trávníček
doctrine-dbal
Commits
9e6ea208
Commit
9e6ea208
authored
Jan 25, 2007
by
zYne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated export drivers + removed unnecessary exceptions
parent
b6575631
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
29 additions
and
265 deletions
+29
-265
Firebird.php
lib/Doctrine/Export/Firebird.php
+17
-15
Exception.php
lib/Doctrine/Export/Firebird/Exception.php
+0
-34
Exception.php
lib/Doctrine/Export/Informix/Exception.php
+0
-34
Mssql.php
lib/Doctrine/Export/Mssql.php
+1
-2
Exception.php
lib/Doctrine/Export/Mssql/Exception.php
+0
-34
Mysql.php
lib/Doctrine/Export/Mysql.php
+4
-4
Exception.php
lib/Doctrine/Export/Mysql/Exception.php
+0
-34
Oracle.php
lib/Doctrine/Export/Oracle.php
+5
-5
Exception.php
lib/Doctrine/Export/Oracle/Exception.php
+0
-34
Pgsql.php
lib/Doctrine/Export/Pgsql.php
+2
-2
Exception.php
lib/Doctrine/Export/Pgsql/Exception.php
+0
-33
Exception.php
lib/Doctrine/Export/Sqlite/Exception.php
+0
-34
No files found.
lib/Doctrine/Export/Firebird.php
View file @
9e6ea208
...
@@ -42,7 +42,7 @@ class Doctrine_Export_Firebird extends Doctrine_Export
...
@@ -42,7 +42,7 @@ class Doctrine_Export_Firebird extends Doctrine_Export
*/
*/
public
function
createDatabase
(
$name
)
public
function
createDatabase
(
$name
)
{
{
throw
new
Doctrine_Export_
Firebird_
Exception
(
throw
new
Doctrine_Export_Exception
(
'PHP Interbase API does not support direct queries. You have to '
.
'PHP Interbase API does not support direct queries. You have to '
.
'create the db manually by using isql command or a similar program'
);
'create the db manually by using isql command or a similar program'
);
}
}
...
@@ -54,7 +54,7 @@ class Doctrine_Export_Firebird extends Doctrine_Export
...
@@ -54,7 +54,7 @@ class Doctrine_Export_Firebird extends Doctrine_Export
*/
*/
public
function
dropDatabase
(
$name
)
public
function
dropDatabase
(
$name
)
{
{
throw
new
Doctrine_Export_
Firebird_
Exception
(
throw
new
Doctrine_Export_Exception
(
'PHP Interbase API does not support direct queries. You have '
.
'PHP Interbase API does not support direct queries. You have '
.
'to drop the db manually by using isql command or a similar program'
);
'to drop the db manually by using isql command or a similar program'
);
}
}
...
@@ -112,8 +112,9 @@ class Doctrine_Export_Firebird extends Doctrine_Export
...
@@ -112,8 +112,9 @@ class Doctrine_Export_Firebird extends Doctrine_Export
//remove autoincrement trigger associated with the table
//remove autoincrement trigger associated with the table
$table
=
$this
->
conn
->
quote
(
strtoupper
(
$table
));
$table
=
$this
->
conn
->
quote
(
strtoupper
(
$table
));
$trigger_name
=
$this
->
conn
->
quote
(
strtoupper
(
$table
)
.
'_AUTOINCREMENT_PK'
);
$triggerName
=
$this
->
conn
->
quote
(
strtoupper
(
$table
)
.
'_AUTOINCREMENT_PK'
);
return
$this
->
conn
->
exec
(
"DELETE FROM RDB
\$
TRIGGERS WHERE UPPER(RDB
\$
RELATION_NAME)=
$table
AND UPPER(RDB
\$
TRIGGER_NAME)=
$trigger_name
"
);
return
$this
->
conn
->
exec
(
"DELETE FROM RDB
\$
TRIGGERS WHERE UPPER(RDB
\$
RELATION_NAME)="
.
$table
.
" AND UPPER(RDB
\$
TRIGGER_NAME)="
.
$triggerName
);
}
}
/**
/**
* create a new table
* create a new table
...
@@ -177,9 +178,9 @@ class Doctrine_Export_Firebird extends Doctrine_Export
...
@@ -177,9 +178,9 @@ class Doctrine_Export_Firebird extends Doctrine_Export
foreach
(
$changes
as
$change_name
=>
$change
)
{
foreach
(
$changes
as
$change_name
=>
$change
)
{
switch
(
$change_name
)
{
switch
(
$change_name
)
{
case
'notnull'
:
case
'notnull'
:
throw
new
Doctrine_DataDict_
Firebird_
Exception
(
'it is not supported changes to field not null constraint'
);
throw
new
Doctrine_DataDict_Exception
(
'it is not supported changes to field not null constraint'
);
case
'default'
:
case
'default'
:
throw
new
Doctrine_DataDict_
Firebird_
Exception
(
'it is not supported changes to field default value'
);
throw
new
Doctrine_DataDict_Exception
(
'it is not supported changes to field default value'
);
case
'length'
:
case
'length'
:
/*
/*
return throw new Doctrine_DataDict_Firebird_Exception('it is not supported changes to field default length');
return throw new Doctrine_DataDict_Firebird_Exception('it is not supported changes to field default length');
...
@@ -190,7 +191,7 @@ class Doctrine_Export_Firebird extends Doctrine_Export
...
@@ -190,7 +191,7 @@ class Doctrine_Export_Firebird extends Doctrine_Export
case
'definition'
:
case
'definition'
:
break
;
break
;
default
:
default
:
throw
new
Doctrine_DataDict_
Firebird_
Exception
(
'it is not supported change of type'
.
$change_name
);
throw
new
Doctrine_DataDict_Exception
(
'it is not supported change of type'
.
$change_name
);
}
}
}
}
return
true
;
return
true
;
...
@@ -313,7 +314,7 @@ class Doctrine_Export_Firebird extends Doctrine_Export
...
@@ -313,7 +314,7 @@ class Doctrine_Export_Firebird extends Doctrine_Export
}
}
break
;
break
;
default
:
default
:
throw
new
Doctrine_DataDict_
Firebird_
Exception
(
'change type '
.
$change_name
.
' not yet supported'
);
throw
new
Doctrine_DataDict_Exception
(
'change type '
.
$change_name
.
' not yet supported'
);
}
}
}
}
if
(
$check
)
{
if
(
$check
)
{
...
@@ -325,7 +326,7 @@ class Doctrine_Export_Firebird extends Doctrine_Export
...
@@ -325,7 +326,7 @@ class Doctrine_Export_Firebird extends Doctrine_Export
if
(
$query
)
{
if
(
$query
)
{
$query
.=
', '
;
$query
.=
', '
;
}
}
$query
.=
'ADD '
.
$this
->
conn
->
getDeclaration
(
$field
[
'type'
],
$field_name
,
$field
,
$name
);
$query
.=
'ADD '
.
$this
->
getDeclaration
(
$field
[
'type'
],
$field_name
,
$field
,
$name
);
}
}
}
}
...
@@ -358,7 +359,7 @@ class Doctrine_Export_Firebird extends Doctrine_Export
...
@@ -358,7 +359,7 @@ class Doctrine_Export_Firebird extends Doctrine_Export
}
}
$this
->
conn
->
loadModule
(
'Datatype'
,
null
,
true
);
$this
->
conn
->
loadModule
(
'Datatype'
,
null
,
true
);
$field_name
=
$this
->
conn
->
quoteIdentifier
(
$field_name
,
true
);
$field_name
=
$this
->
conn
->
quoteIdentifier
(
$field_name
,
true
);
$query
.=
'ALTER '
.
$field_name
.
' TYPE '
.
$this
->
conn
->
datatype
->
getTypeDeclaration
(
$field
[
'definition'
]);
$query
.=
'ALTER '
.
$field_name
.
' TYPE '
.
$this
->
getTypeDeclaration
(
$field
[
'definition'
]);
}
}
}
}
...
@@ -501,14 +502,15 @@ class Doctrine_Export_Firebird extends Doctrine_Export
...
@@ -501,14 +502,15 @@ class Doctrine_Export_Firebird extends Doctrine_Export
/**
/**
* drop existing sequence
* drop existing sequence
*
*
* @param string $seq
_n
ame name of the sequence to be dropped
* @param string $seq
N
ame name of the sequence to be dropped
* @return void
* @return void
*/
*/
public
function
dropSequence
(
$seq
_n
ame
)
public
function
dropSequence
(
$seq
N
ame
)
{
{
$sequence_name
=
$this
->
conn
->
getSequenceName
(
$seq_name
);
$sequenceName
=
$this
->
conn
->
getSequenceName
(
$seqName
);
$sequence_name
=
$this
->
conn
->
quote
(
$sequence_name
);
$sequenceName
=
$this
->
conn
->
quote
(
$sequenceName
);
$query
=
"DELETE FROM RDB
\$
GENERATORS WHERE UPPER(RDB
\$
GENERATOR_NAME)=
$sequence_name
"
;
$query
=
"DELETE FROM RDB
\$
GENERATORS WHERE UPPER(RDB
\$
GENERATOR_NAME)="
.
$sequenceName
;
return
$this
->
conn
->
exec
(
$query
);
return
$this
->
conn
->
exec
(
$query
);
}
}
}
}
lib/Doctrine/Export/Firebird/Exception.php
deleted
100644 → 0
View file @
b6575631
<?php
/*
* $Id$
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* This software consists of voluntary contributions made by many individuals
* and is licensed under the LGPL. For more information, see
* <http://www.phpdoctrine.com>.
*/
Doctrine
::
autoload
(
'Doctrine_Export_Exception'
);
/**
* Doctrine_Export_Firebird_Exception
*
* @package Doctrine
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @category Object Relational Mapping
* @link www.phpdoctrine.com
* @since 1.0
* @version $Revision$
* @author Konsta Vesterinen <kvesteri@cc.hut.fi>
*/
class
Doctrine_Export_Firebird_Exception
extends
Doctrine_Export_Exception
{
}
lib/Doctrine/Export/Informix/Exception.php
deleted
100644 → 0
View file @
b6575631
<?php
/*
* $Id$
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* This software consists of voluntary contributions made by many individuals
* and is licensed under the LGPL. For more information, see
* <http://www.phpdoctrine.com>.
*/
Doctrine
::
autoload
(
'Doctrine_Export_Exception'
);
/**
* Doctrine_Export_Informix_Exception
*
* @package Doctrine
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @category Object Relational Mapping
* @link www.phpdoctrine.com
* @since 1.0
* @version $Revision$
* @author Konsta Vesterinen <kvesteri@cc.hut.fi>
*/
class
Doctrine_Export_Informix_Exception
extends
Doctrine_Export_Exception
{
}
lib/Doctrine/Export/Mssql.php
View file @
9e6ea208
...
@@ -162,8 +162,7 @@ class Doctrine_Export_Mssql extends Doctrine_Export
...
@@ -162,8 +162,7 @@ class Doctrine_Export_Mssql extends Doctrine_Export
case
'rename'
:
case
'rename'
:
case
'change'
:
case
'change'
:
default
:
default
:
return
$this
->
conn
->
raiseError
(
Doctrine
::
ERR_CANNOT_ALTER
,
null
,
null
,
throw
new
Doctrine_Export_Exception
(
'alterTable: change type "'
.
$change_name
.
'" not yet supported'
);
'alterTable: change type "'
.
$change_name
.
'" not yet supported'
);
}
}
}
}
...
...
lib/Doctrine/Export/Mssql/Exception.php
deleted
100644 → 0
View file @
b6575631
<?php
/*
* $Id$
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* This software consists of voluntary contributions made by many individuals
* and is licensed under the LGPL. For more information, see
* <http://www.phpdoctrine.com>.
*/
Doctrine
::
autoload
(
'Doctrine_Export_Exception'
);
/**
* Doctrine_Export_Mssql_Exception
*
* @package Doctrine
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @category Object Relational Mapping
* @link www.phpdoctrine.com
* @since 1.0
* @version $Revision$
* @author Konsta Vesterinen <kvesteri@cc.hut.fi>
*/
class
Doctrine_Export_Mssql_Exception
extends
Doctrine_Export_Exception
{
}
lib/Doctrine/Export/Mysql.php
View file @
9e6ea208
...
@@ -257,7 +257,7 @@ class Doctrine_Export_Mysql extends Doctrine_Export
...
@@ -257,7 +257,7 @@ class Doctrine_Export_Mysql extends Doctrine_Export
if
(
$query
)
{
if
(
$query
)
{
$query
.=
', '
;
$query
.=
', '
;
}
}
$query
.=
'ADD '
.
$this
->
dbh
->
getDeclaration
(
$field
[
'type'
],
$field_name
,
$field
);
$query
.=
'ADD '
.
$this
->
getDeclaration
(
$field
[
'type'
],
$field_name
,
$field
);
}
}
}
}
...
@@ -290,7 +290,7 @@ class Doctrine_Export_Mysql extends Doctrine_Export
...
@@ -290,7 +290,7 @@ class Doctrine_Export_Mysql extends Doctrine_Export
$old_field_name
=
$field_name
;
$old_field_name
=
$field_name
;
}
}
$old_field_name
=
$this
->
conn
->
quoteIdentifier
(
$old_field_name
,
true
);
$old_field_name
=
$this
->
conn
->
quoteIdentifier
(
$old_field_name
,
true
);
$query
.=
"CHANGE
$old_field_name
"
.
$this
->
dbh
->
getDeclaration
(
$field
[
'definition'
][
'type'
],
$field_name
,
$field
[
'definition'
]);
$query
.=
"CHANGE
$old_field_name
"
.
$this
->
getDeclaration
(
$field
[
'definition'
][
'type'
],
$field_name
,
$field
[
'definition'
]);
}
}
}
}
...
@@ -301,7 +301,7 @@ class Doctrine_Export_Mysql extends Doctrine_Export
...
@@ -301,7 +301,7 @@ class Doctrine_Export_Mysql extends Doctrine_Export
}
}
$field
=
$changes
[
'rename'
][
$renamed_field
];
$field
=
$changes
[
'rename'
][
$renamed_field
];
$renamed_field
=
$this
->
conn
->
quoteIdentifier
(
$renamed_field
,
true
);
$renamed_field
=
$this
->
conn
->
quoteIdentifier
(
$renamed_field
,
true
);
$query
.=
'CHANGE '
.
$renamed_field
.
' '
.
$this
->
dbh
->
getDeclaration
(
$field
[
'definition'
][
'type'
],
$field
[
'name'
],
$field
[
'definition'
]);
$query
.=
'CHANGE '
.
$renamed_field
.
' '
.
$this
->
getDeclaration
(
$field
[
'definition'
][
'type'
],
$field
[
'name'
],
$field
[
'definition'
]);
}
}
}
}
...
@@ -310,7 +310,7 @@ class Doctrine_Export_Mysql extends Doctrine_Export
...
@@ -310,7 +310,7 @@ class Doctrine_Export_Mysql extends Doctrine_Export
}
}
$name
=
$this
->
conn
->
quoteIdentifier
(
$name
,
true
);
$name
=
$this
->
conn
->
quoteIdentifier
(
$name
,
true
);
return
$this
->
conn
->
exec
(
"ALTER TABLE
$name
$query
"
);
return
$this
->
conn
->
exec
(
'ALTER TABLE '
.
$name
.
' '
.
$query
);
}
}
/**
/**
* create sequence
* create sequence
...
...
lib/Doctrine/Export/Mysql/Exception.php
deleted
100644 → 0
View file @
b6575631
<?php
/*
* $Id$
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* This software consists of voluntary contributions made by many individuals
* and is licensed under the LGPL. For more information, see
* <http://www.phpdoctrine.com>.
*/
Doctrine
::
autoload
(
'Doctrine_Export_Exception'
);
/**
* Doctrine_Export_Mysql_Exception
*
* @package Doctrine
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @category Object Relational Mapping
* @link www.phpdoctrine.com
* @since 1.0
* @version $Revision$
* @author Konsta Vesterinen <kvesteri@cc.hut.fi>
*/
class
Doctrine_Export_Mysql_Exception
extends
Doctrine_Export_Exception
{
}
lib/Doctrine/Export/Oracle.php
View file @
9e6ea208
...
@@ -44,7 +44,7 @@ class Doctrine_Export_Oracle extends Doctrine_Export
...
@@ -44,7 +44,7 @@ class Doctrine_Export_Oracle extends Doctrine_Export
public
function
createDatabase
(
$name
)
public
function
createDatabase
(
$name
)
{
{
if
(
!
$this
->
conn
->
getAttribute
(
Doctrine
::
ATTR_EMULATE_DATABASE
))
if
(
!
$this
->
conn
->
getAttribute
(
Doctrine
::
ATTR_EMULATE_DATABASE
))
throw
new
Doctrine_Export_
Oracle_
Exception
(
'database creation is only supported if the "emulate_database" attribute is enabled'
);
throw
new
Doctrine_Export_Exception
(
'database creation is only supported if the "emulate_database" attribute is enabled'
);
$username
=
sprintf
(
$this
->
conn
->
getAttribute
(
Doctrine
::
ATTR_DB_NAME_FORMAT
),
$name
);
$username
=
sprintf
(
$this
->
conn
->
getAttribute
(
Doctrine
::
ATTR_DB_NAME_FORMAT
),
$name
);
$password
=
$this
->
conn
->
dsn
[
'password'
]
?
$this
->
conn
->
dsn
[
'password'
]
:
$name
;
$password
=
$this
->
conn
->
dsn
[
'password'
]
?
$this
->
conn
->
dsn
[
'password'
]
:
$name
;
...
@@ -75,7 +75,7 @@ class Doctrine_Export_Oracle extends Doctrine_Export
...
@@ -75,7 +75,7 @@ class Doctrine_Export_Oracle extends Doctrine_Export
public
function
dropDatabase
(
$name
)
public
function
dropDatabase
(
$name
)
{
{
if
(
!
$this
->
conn
->
getAttribute
(
Doctrine
::
ATTR_EMULATE_DATABASE
))
if
(
!
$this
->
conn
->
getAttribute
(
Doctrine
::
ATTR_EMULATE_DATABASE
))
throw
new
Doctrine_Export_
Oracle_
Exception
(
'database dropping is only supported if the
throw
new
Doctrine_Export_Exception
(
'database dropping is only supported if the
"emulate_database" option is enabled'
);
"emulate_database" option is enabled'
);
$username
=
sprintf
(
$this
->
conn
->
getAttribute
(
Doctrine
::
ATTR_DB_NAME_FORMAT
),
$name
);
$username
=
sprintf
(
$this
->
conn
->
getAttribute
(
Doctrine
::
ATTR_DB_NAME_FORMAT
),
$name
);
...
@@ -150,8 +150,8 @@ END;
...
@@ -150,8 +150,8 @@ END;
public
function
dropAutoincrement
(
$table
)
public
function
dropAutoincrement
(
$table
)
{
{
$table
=
strtoupper
(
$table
);
$table
=
strtoupper
(
$table
);
$trigger
_n
ame
=
$table
.
'_AI_PK'
;
$trigger
N
ame
=
$table
.
'_AI_PK'
;
$trigger_name_quoted
=
$this
->
conn
->
getDbh
()
->
quote
(
$trigger_n
ame
);
$trigger_name_quoted
=
$this
->
conn
->
quote
(
$triggerN
ame
);
$query
=
'SELECT trigger_name FROM user_triggers'
;
$query
=
'SELECT trigger_name FROM user_triggers'
;
$query
.=
' WHERE trigger_name='
.
$trigger_name_quoted
.
' OR trigger_name='
.
strtoupper
(
$trigger_name_quoted
);
$query
.=
' WHERE trigger_name='
.
$trigger_name_quoted
.
' OR trigger_name='
.
strtoupper
(
$trigger_name_quoted
);
$trigger
=
$this
->
conn
->
fetchOne
(
$query
);
$trigger
=
$this
->
conn
->
fetchOne
(
$query
);
...
@@ -333,7 +333,7 @@ END;
...
@@ -333,7 +333,7 @@ END;
case
'rename'
:
case
'rename'
:
break
;
break
;
default
:
default
:
throw
new
Doctrine_Export_
Oracle_
Exception
(
'change type "'
.
$changeName
.
'" not yet supported'
);
throw
new
Doctrine_Export_Exception
(
'change type "'
.
$changeName
.
'" not yet supported'
);
}
}
}
}
...
...
lib/Doctrine/Export/Oracle/Exception.php
deleted
100644 → 0
View file @
b6575631
<?php
/*
* $Id$
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* This software consists of voluntary contributions made by many individuals
* and is licensed under the LGPL. For more information, see
* <http://www.phpdoctrine.com>.
*/
Doctrine
::
autoload
(
'Doctrine_Export_Exception'
);
/**
* Doctrine_Export_Oracle_Exception
*
* @package Doctrine
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @category Object Relational Mapping
* @link www.phpdoctrine.com
* @since 1.0
* @version $Revision$
* @author Konsta Vesterinen <kvesteri@cc.hut.fi>
*/
class
Doctrine_Export_Oracle_Exception
extends
Doctrine_Export_Exception
{
}
lib/Doctrine/Export/Pgsql.php
View file @
9e6ea208
...
@@ -157,7 +157,7 @@ class Doctrine_Export_Pgsql extends Doctrine_Export
...
@@ -157,7 +157,7 @@ class Doctrine_Export_Pgsql extends Doctrine_Export
case
'rename'
:
case
'rename'
:
break
;
break
;
default
:
default
:
throw
new
Doctrine_Export_
Pgsql_
Exception
(
'change type "'
.
$change_name
.
'\" not yet supported'
);
throw
new
Doctrine_Export_Exception
(
'change type "'
.
$change_name
.
'\" not yet supported'
);
}
}
}
}
...
@@ -187,7 +187,7 @@ class Doctrine_Export_Pgsql extends Doctrine_Export
...
@@ -187,7 +187,7 @@ class Doctrine_Export_Pgsql extends Doctrine_Export
$server_info
=
$this
->
conn
->
getServerVersion
();
$server_info
=
$this
->
conn
->
getServerVersion
();
if
(
is_array
(
$server_info
)
&&
$server_info
[
'major'
]
<
8
)
{
if
(
is_array
(
$server_info
)
&&
$server_info
[
'major'
]
<
8
)
{
throw
new
Doctrine_Export_
Pgsql_
Exception
(
'changing column type for "'
.
$change_name
.
'\" requires PostgreSQL 8.0 or above'
);
throw
new
Doctrine_Export_Exception
(
'changing column type for "'
.
$change_name
.
'\" requires PostgreSQL 8.0 or above'
);
}
}
$query
=
"ALTER
$field_name
TYPE "
.
$this
->
conn
->
datatype
->
getTypeDeclaration
(
$field
[
'definition'
]);
$query
=
"ALTER
$field_name
TYPE "
.
$this
->
conn
->
datatype
->
getTypeDeclaration
(
$field
[
'definition'
]);
$this
->
conn
->
exec
(
"ALTER TABLE
$name
$query
"
);
$this
->
conn
->
exec
(
"ALTER TABLE
$name
$query
"
);
...
...
lib/Doctrine/Export/Pgsql/Exception.php
deleted
100644 → 0
View file @
b6575631
<?php
/*
* $Id$
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* This software consists of voluntary contributions made by many individuals
* and is licensed under the LGPL. For more information, see
* <http://www.phpdoctrine.com>.
*/
Doctrine
::
autoload
(
'Doctrine_Export_Exception'
);
/**
* Doctrine_Export_Pgsql_Exception
*
* @package Doctrine
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @category Object Relational Mapping
* @link www.phpdoctrine.com
* @since 1.0
* @version $Revision$
* @author Konsta Vesterinen <kvesteri@cc.hut.fi>
*/
class
Doctrine_Export_Pgsql_Exception
extends
Doctrine_Export_Exception
{
}
lib/Doctrine/Export/Sqlite/Exception.php
deleted
100644 → 0
View file @
b6575631
<?php
/*
* $Id$
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* This software consists of voluntary contributions made by many individuals
* and is licensed under the LGPL. For more information, see
* <http://www.phpdoctrine.com>.
*/
Doctrine
::
autoload
(
'Doctrine_Export_Exception'
);
/**
* Doctrine_Export_Sqlite_Exception
*
* @package Doctrine
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @category Object Relational Mapping
* @link www.phpdoctrine.com
* @since 1.0
* @version $Revision$
* @author Konsta Vesterinen <kvesteri@cc.hut.fi>
*/
class
Doctrine_Export_Sqlite_Exception
extends
Doctrine_Export_Exception
{
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment