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
bbd004c1
Unverified
Commit
bbd004c1
authored
Jan 06, 2019
by
Sergei Morozov
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'bpo/2.9/#3420' into 2.9
parents
f1926101
5fe8b795
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
1 deletion
+14
-1
MySqlSchemaManager.php
lib/Doctrine/DBAL/Schema/MySqlSchemaManager.php
+1
-1
MySqlSchemaManagerTest.php
...e/Tests/DBAL/Functional/Schema/MySqlSchemaManagerTest.php
+13
-0
No files found.
lib/Doctrine/DBAL/Schema/MySqlSchemaManager.php
View file @
bbd004c1
...
@@ -68,7 +68,7 @@ class MySqlSchemaManager extends AbstractSchemaManager
...
@@ -68,7 +68,7 @@ class MySqlSchemaManager extends AbstractSchemaManager
}
elseif
(
strpos
(
$v
[
'index_type'
],
'SPATIAL'
)
!==
false
)
{
}
elseif
(
strpos
(
$v
[
'index_type'
],
'SPATIAL'
)
!==
false
)
{
$v
[
'flags'
]
=
[
'SPATIAL'
];
$v
[
'flags'
]
=
[
'SPATIAL'
];
}
}
$v
[
'length'
]
=
$v
[
'sub_part'
]
??
null
;
$v
[
'length'
]
=
isset
(
$v
[
'sub_part'
])
?
(
int
)
$v
[
'sub_part'
]
:
null
;
$tableIndexes
[
$k
]
=
$v
;
$tableIndexes
[
$k
]
=
$v
;
}
}
...
...
tests/Doctrine/Tests/DBAL/Functional/Schema/MySqlSchemaManagerTest.php
View file @
bbd004c1
...
@@ -107,6 +107,19 @@ class MySqlSchemaManagerTest extends SchemaManagerFunctionalTestCase
...
@@ -107,6 +107,19 @@ class MySqlSchemaManagerTest extends SchemaManagerFunctionalTestCase
self
::
assertTrue
(
$indexes
[
's_index'
]
->
hasFlag
(
'spatial'
));
self
::
assertTrue
(
$indexes
[
's_index'
]
->
hasFlag
(
'spatial'
));
}
}
public
function
testIndexWithLength
()
:
void
{
$table
=
new
Table
(
'index_length'
);
$table
->
addColumn
(
'text'
,
'string'
,
[
'length'
=>
255
]);
$table
->
addIndex
([
'text'
],
'text_index'
,
[],
[
'lengths'
=>
[
128
]]);
$this
->
schemaManager
->
dropAndCreateTable
(
$table
);
$indexes
=
$this
->
schemaManager
->
listTableIndexes
(
'index_length'
);
self
::
assertArrayHasKey
(
'text_index'
,
$indexes
);
self
::
assertSame
([
128
],
$indexes
[
'text_index'
]
->
getOption
(
'lengths'
));
}
/**
/**
* @group DBAL-400
* @group DBAL-400
*/
*/
...
...
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