dbal icon indicating copy to clipboard operation
dbal copied to clipboard

MariaDB 10.3+ supports sequences

Open GromNaN opened this issue 5 years ago • 1 comments

Feature Request

MariaDB added support for SEQUENCE in version 10.3. DBAL. https://mariadb.com/kb/en/sequences/

Q A
New Feature yes
RFC no
BC Break no

Summary

Add support for sequences with MariaDB 10.3+ for Id Generator.

GromNaN avatar Oct 19 '20 20:10 GromNaN

I believe that can be done by overriding AbstractPlatform::supportsSequences() and implementing AbstractPlatform::getCreateSequenceSQL() and AbstractPlatform::getAlterSequenceSQL().

https://github.com/doctrine/dbal/blob/b7fd778e20e464ac903c5aed601dacf7ba168f32/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php#L3093-L3101

https://github.com/doctrine/dbal/blob/b7fd778e20e464ac903c5aed601dacf7ba168f32/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php#L1766-L1788

Regarding the tests, there are already some functional tests that should fire if supportsSequences() returns true.

The PR should target 3.0.x or above since 2.12.x is supposed to be last minor branch of the 2.x series.

greg0ire avatar Oct 22 '20 18:10 greg0ire