diff --git a/src/lib/connectors/mysql/index.ts b/src/lib/connectors/mysql/index.ts index 193bf14..76bde3d 100644 --- a/src/lib/connectors/mysql/index.ts +++ b/src/lib/connectors/mysql/index.ts @@ -88,7 +88,8 @@ const getTableSchema = async (connection: Connection, databaseName: string): Pro const conn = await getMySQLConnection(connection); // get All tableList from database const [rows] = await conn.query( - `SELECT TABLE_NAME as table_name FROM information_schema.tables WHERE TABLE_SCHEMA=? AND TABLE_TYPE='BASE TABLE';`, + // SYSTEM VERSIONED is a special table for MariaDB https://mariadb.com/kb/en/system-versioned-tables/ + `SELECT TABLE_NAME as table_name FROM information_schema.tables WHERE TABLE_SCHEMA=? AND (TABLE_TYPE='BASE TABLE' || TABLE_TYPE='SYSTEM VERSIONED');`, [databaseName] ); const tableList = [];