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
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
PSDI Army
yii2
Commits
39a358c2
Commit
39a358c2
authored
Nov 15, 2014
by
wenbin1989
Committed by
Qiang Xue
Nov 15, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oracle db doesn't support `ON UPDATE` in FOREIGN KEY. remove `ON UPDATE` section…
oracle db doesn't support `ON UPDATE` in FOREIGN KEY. remove `ON UPDATE` section in method `addForeignKey`.
parent
b733a189
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
QueryBuilder.php
framework/db/oci/QueryBuilder.php
+17
-0
No files found.
framework/db/oci/QueryBuilder.php
View file @
39a358c2
...
...
@@ -138,4 +138,21 @@ EOD;
return
"DROP SEQUENCE
\"
{
$tableSchema
->
name
}
_SEQ
\"
;"
.
"CREATE SEQUENCE
\"
{
$tableSchema
->
name
}
_SEQ
\"
START WITH
{
$value
}
INCREMENT BY 1 NOMAXVALUE NOCACHE"
;
}
/**
* @inheritdoc
*/
public
function
addForeignKey
(
$name
,
$table
,
$columns
,
$refTable
,
$refColumns
,
$delete
=
null
,
$update
=
null
)
{
$sql
=
'ALTER TABLE '
.
$this
->
db
->
quoteTableName
(
$table
)
.
' ADD CONSTRAINT '
.
$this
->
db
->
quoteColumnName
(
$name
)
.
' FOREIGN KEY ('
.
$this
->
buildColumns
(
$columns
)
.
')'
.
' REFERENCES '
.
$this
->
db
->
quoteTableName
(
$refTable
)
.
' ('
.
$this
->
buildColumns
(
$refColumns
)
.
')'
;
if
(
$delete
!==
null
)
{
$sql
.=
' ON DELETE '
.
$delete
;
}
return
$sql
;
}
}
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