Skip to content
This repository was archived by the owner on Mar 1, 2026. It is now read-only.

Commit c2d4b36

Browse files
committed
feat(cli): add MySQL support for schema introspection
Introduces a MySQL-specific introspection provider to support pulling existing database schemas into ZenStack. The implementation includes logic for mapping MySQL data types to ZenStack types, handling auto-incrementing fields, and parsing MySQL-specific enum definitions. It utilizes dynamic imports for database drivers to minimize the CLI footprint for users not targeting MySQL.
1 parent 9c484df commit c2d4b36

2 files changed

Lines changed: 426 additions & 0 deletions

File tree

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
import type { DataSourceProviderType } from '@zenstackhq/schema';
22
export * from './provider';
33

4+
import { mysql } from './mysql';
45
import { postgresql } from './postgresql';
56
import type { IntrospectionProvider } from './provider';
67
import { sqlite } from './sqlite';
78

89
export const providers: Record<DataSourceProviderType, IntrospectionProvider> = {
10+
mysql,
911
postgresql,
1012
sqlite,
1113
};

0 commit comments

Comments
 (0)