-
-
Save deeky666/6c4e47a275b1c9e7c068 to your computer and use it in GitHub Desktop.
Doctrine DBAL Sequence comparison issues with CACHE option
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$comparator = new Comparator(); | |
// Oracle | |
$platform = new OraclePlatform(); | |
$sm = new OracleSchemaManager($conn, $platform); | |
$sequence = new Sequence('foo', 1, 1, null); // cache size null | |
$sm->createSequence($sequence); // CREATE SEQUENCE foo START WITH 1 MINVALUE 1 INCREMENT BY 1 | |
$sequences = $sm->listSequences(); | |
$introspectedSequence = $sequences['foo']; | |
$sequence->getCacheSize(); // cache size 20 (default value on Oracle) | |
$comparator->diffSequence($sequence, $introspectedSequence); // returns true (changed) | |
$platform->getAlterSequenceSQL($introspectedSequence); // expected to return '' but returns ALTER SEQUENCE INCREMENT BY 1 CACHE 20 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment