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
a14db264
Commit
a14db264
authored
Oct 20, 2007
by
romanb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reapplied my changes to Export.php that were (accidently?) reverted by jonwage
parent
2d1b5cc6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
2 deletions
+13
-2
Export.php
lib/Doctrine/Export.php
+12
-1
ExportTestCase.php
tests/ExportTestCase.php
+1
-1
No files found.
lib/Doctrine/Export.php
View file @
a14db264
...
@@ -128,10 +128,21 @@ class Doctrine_Export extends Doctrine_Connection_Module
...
@@ -128,10 +128,21 @@ class Doctrine_Export extends Doctrine_Connection_Module
public
function
dropConstraint
(
$table
,
$name
,
$primary
=
false
)
public
function
dropConstraint
(
$table
,
$name
,
$primary
=
false
)
{
{
$table
=
$this
->
conn
->
quoteIdentifier
(
$table
);
$table
=
$this
->
conn
->
quoteIdentifier
(
$table
);
$name
=
$this
->
conn
->
quoteIdentifier
(
$
this
->
conn
->
formatter
->
getIndexName
(
$name
)
);
$name
=
$this
->
conn
->
quoteIdentifier
(
$
name
);
return
$this
->
conn
->
exec
(
'ALTER TABLE '
.
$table
.
' DROP CONSTRAINT '
.
$name
);
return
$this
->
conn
->
exec
(
'ALTER TABLE '
.
$table
.
' DROP CONSTRAINT '
.
$name
);
}
}
/**
* drop existing foreign key
*
* @param string $table name of table that should be used in method
* @param string $name name of the foreign key to be dropped
* @return void
*/
public
function
dropForeignKey
(
$table
,
$name
)
{
return
$this
->
dropConstraint
(
$table
,
$name
);
}
/**
/**
* dropSequenceSql
* dropSequenceSql
* drop existing sequence
* drop existing sequence
...
...
tests/ExportTestCase.php
View file @
a14db264
...
@@ -56,7 +56,7 @@ class Doctrine_Export_TestCase extends Doctrine_UnitTestCase
...
@@ -56,7 +56,7 @@ class Doctrine_Export_TestCase extends Doctrine_UnitTestCase
{
{
$this
->
export
->
dropConstraint
(
'sometable'
,
'relevancy'
);
$this
->
export
->
dropConstraint
(
'sometable'
,
'relevancy'
);
$this
->
assertEqual
(
$this
->
adapter
->
pop
(),
'ALTER TABLE sometable DROP CONSTRAINT relevancy
_idx
'
);
$this
->
assertEqual
(
$this
->
adapter
->
pop
(),
'ALTER TABLE sometable DROP CONSTRAINT relevancy'
);
}
}
public
function
testCreateIndexExecutesSql
()
public
function
testCreateIndexExecutesSql
()
{
{
...
...
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