dbal
dbal copied to clipboard
MariaDB: Tables with System Versioning are not listed in listTables()
Bug Report
| Q | A |
|---|---|
| Version | 3.6.6 |
Summary
On MariaDB, tables set up with System Versioning are not returned in listTables() or listTableNames(), nor work with introspectTable().
Current behaviour
System Versioned tables are basically hidden to SchemaManager due to queries in MySQLSchemaManager filtering them out with TABLE_TYPE = 'BASE TABLE'.
How to reproduce
CREATE TABLE `accounts` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`account_number` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB WITH SYSTEM VERSIONING;
$schemaManager->listTableNames(); // []
$schemaManager->listTables(); // []
$schemaManager->introspectTable('accounts'); // throws TableDoesNotExist There is no table with name "accounts" in the schema.
Expected behaviour
Expect that these tables would still be returned as tables, or that there is some other way to list/inspect them.
I can take a stab at a PR if desired.
Thank you. I'd like to reclassify this issue as a feature request.
Full support for versioned tables would mean that the schema manager is not only able to introspect them, but also create and compare them.
If you want to work on this feature, please give it a try.
Fair point. Probably a bit more than I can bite off at this point, but who knows.
Hello, Will this fix will be accepted? We use this functionality extensively MariaDB (system versioning)
Will this fix will be accepted?
There is no fix I could accept, is there? :shrug: