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
e1c36ace
Commit
e1c36ace
authored
Feb 04, 2014
by
Bart Visscher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code the primary key ordering so it works with sqlite before version 3.7.16
parent
30b286cd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
SqliteSchemaManager.php
lib/Doctrine/DBAL/Schema/SqliteSchemaManager.php
+4
-2
No files found.
lib/Doctrine/DBAL/Schema/SqliteSchemaManager.php
View file @
e1c36ace
...
...
@@ -166,9 +166,12 @@ class SqliteSchemaManager extends AbstractSchemaManager
// fetch primary
$stmt
=
$this
->
_conn
->
executeQuery
(
"PRAGMA TABLE_INFO ('
$tableName
')"
);
$indexArray
=
$stmt
->
fetchAll
(
\PDO
::
FETCH_ASSOC
);
usort
(
$indexArray
,
function
(
$a
,
$b
)
{
return
$a
[
'pk'
]
-
$b
[
'pk'
];
});
foreach
(
$indexArray
as
$indexColumnRow
)
{
if
(
$indexColumnRow
[
'pk'
]
!=
"0"
)
{
$indexBuffer
[
$indexColumnRow
[
'pk'
]
]
=
array
(
$indexBuffer
[]
=
array
(
'key_name'
=>
'primary'
,
'primary'
=>
true
,
'non_unique'
=>
false
,
...
...
@@ -176,7 +179,6 @@ class SqliteSchemaManager extends AbstractSchemaManager
);
}
}
ksort
(
$indexBuffer
);
// fetch regular indexes
foreach
(
$tableIndexes
as
$tableIndex
)
{
...
...
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