Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Rotua Panjaitan
yii2
Commits
a977d820
Commit
a977d820
authored
Jun 09, 2013
by
gevik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replaced dropConstraint with dropPrimarykey method.
parent
3796db7d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
QueryBuilder.php
framework/yii/db/QueryBuilder.php
+8
-7
No files found.
framework/yii/db/QueryBuilder.php
View file @
a977d820
...
@@ -288,15 +288,16 @@ class QueryBuilder extends \yii\base\Object
...
@@ -288,15 +288,16 @@ class QueryBuilder extends \yii\base\Object
}
}
/**
/**
* Builds a SQL statement for removing a constraint to an existing table.
* Builds a SQL statement for removing a
primary key
constraint to an existing table.
* @param string $name the name of the constraint to be removed.
* @param string $name the name of the
primary key
constraint to be removed.
* @param string $table the table that constraint will be removed from.
* @param string $table the table that
the primary key
constraint will be removed from.
* @return string the SQL statement for removing
constraint from an existing table.
* @return string the SQL statement for removing
a primary key constraint from an existing table. *
*/
*/
public
function
drop
Constraint
(
$name
,
$table
)
public
function
drop
Primarykey
(
$name
,
$table
)
{
{
return
'ALTER TABLE '
.
$this
->
quoteTableName
(
$table
)
.
' DROP CONSTRAINT '
return
'ALTER TABLE '
.
$this
->
db
->
quoteTableName
(
$table
)
.
$this
->
quoteColumnName
(
$name
);
.
' DROP CONSTRAINT '
.
$this
->
db
->
quoteColumnName
(
$name
);
}
}
/**
/**
...
...
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