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

Commit ac01e9f

Browse files
committed
refactor: dynamically determine supported db providers in CLI
1 parent 1006081 commit ac01e9f

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • packages/cli/src/actions

packages/cli/src/actions/db.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import {
1616
import { syncEnums, syncRelation, syncTable, type Relation } from './pull';
1717
import { providers } from './pull/provider';
1818
import { getDatasource, getDbName, getRelationFieldsKey, getRelationFkName } from './pull/utils';
19+
import type { DataSourceProviderType } from '@zenstackhq/schema';
1920

2021
type PushOptions = {
2122
schema?: string;
@@ -86,7 +87,7 @@ async function runPull(options: PullOptions) {
8687
config({
8788
ignore: ['MISSING_ENV_FILE'],
8889
});
89-
const SUPPORTED_PROVIDERS = ['sqlite', 'postgresql'];
90+
const SUPPORTED_PROVIDERS = Object.keys(providers) as DataSourceProviderType[];
9091
const datasource = getDatasource(model);
9192
if (!datasource) {
9293
throw new Error('No datasource found in the schema.');

0 commit comments

Comments
 (0)