private function extract_tables_from_schema($schema, $prefix = '') { preg_match_all('~CREATE TABLE (' . $prefix . '.*) \\(~', $schema, $matches); return empty($matches[1]) ? [] : $matches[1]; }