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
9430ccd0
Commit
9430ccd0
authored
Jun 12, 2014
by
Carsten Brandt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more robust check for table not exists
should work on HHVM too
parent
87bac4bf
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
Schema.php
extensions/sphinx/Schema.php
+1
-1
Schema.php
framework/db/mysql/Schema.php
+1
-1
No files found.
extensions/sphinx/Schema.php
View file @
9430ccd0
...
@@ -453,7 +453,7 @@ class Schema extends Object
...
@@ -453,7 +453,7 @@ class Schema extends Object
$columns
=
$this
->
db
->
createCommand
(
$sql
)
->
queryAll
();
$columns
=
$this
->
db
->
createCommand
(
$sql
)
->
queryAll
();
}
catch
(
\Exception
$e
)
{
}
catch
(
\Exception
$e
)
{
$previous
=
$e
->
getPrevious
();
$previous
=
$e
->
getPrevious
();
if
(
$previous
instanceof
\PDOException
&&
$previous
->
getCode
()
==
'42S02'
)
{
if
(
$previous
instanceof
\PDOException
&&
strpos
(
$previous
->
getMessage
(),
'SQLSTATE[42S02'
)
!==
false
)
{
// index does not exist
// index does not exist
return
false
;
return
false
;
}
}
...
...
framework/db/mysql/Schema.php
View file @
9430ccd0
...
@@ -188,7 +188,7 @@ class Schema extends \yii\db\Schema
...
@@ -188,7 +188,7 @@ class Schema extends \yii\db\Schema
$columns
=
$this
->
db
->
createCommand
(
$sql
)
->
queryAll
();
$columns
=
$this
->
db
->
createCommand
(
$sql
)
->
queryAll
();
}
catch
(
\Exception
$e
)
{
}
catch
(
\Exception
$e
)
{
$previous
=
$e
->
getPrevious
();
$previous
=
$e
->
getPrevious
();
if
(
$previous
instanceof
\PDOException
&&
$previous
->
getCode
()
==
'42S02'
)
{
if
(
$previous
instanceof
\PDOException
&&
strpos
(
$previous
->
getMessage
(),
'SQLSTATE[42S02'
)
!==
false
)
{
// table does not exist
// table does not exist
return
false
;
return
false
;
}
}
...
...
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