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

Commit 00a8db0

Browse files
andrew-farriesxata-botgithub-merge-queue[bot]
authored
Set postgres enabled state via request body in E2E and drizzle next tests (#1570)
Co-authored-by: Xata Bot <97746683+xata-bot@users.noreply.github.com> Co-authored-by: github-merge-queue[bot] <github-merge-queue[bot]@users.noreply.github.com>
1 parent eed3363 commit 00a8db0

3 files changed

Lines changed: 8 additions & 4 deletions

File tree

packages/client/src/api/controlPlaneComponents.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1494,6 +1494,12 @@ export type CreateDatabaseRequestBody = {
14941494
* @minLength 1
14951495
*/
14961496
region: string;
1497+
/**
1498+
* Enable postgres access for this database
1499+
*
1500+
* @default false
1501+
*/
1502+
postgresEnabled?: boolean;
14971503
/**
14981504
* The dedicated cluster where branches from this database will be created. Defaults to 'shared-cluster'.
14991505
*

packages/plugin-client-drizzle/test/drizzle.test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,7 @@ describe.concurrent.each([{ type: 'pg' }, { type: 'http' }])('Drizzle $type', ({
8080
beforeAll(async () => {
8181
await api.databases.createDatabase({
8282
pathParams: { workspaceId: workspace, dbName: database },
83-
body: { region, branchName: 'main' },
84-
headers: { 'X-Features': 'feat-pgroll-migrations=1' }
83+
body: { region, branchName: 'main', postgresEnabled: true }
8584
});
8685

8786
await waitForReplication();

test/utils/setup.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,7 @@ export async function setUpTestEnvironment(
8080

8181
const { databaseName: database } = await api.databases.createDatabase({
8282
pathParams: { workspaceId: workspace, dbName: `sdk-integration-test-${prefix}-${id}` },
83-
body: { region, defaultClusterID: clusterId },
84-
headers: { 'X-Features': 'feat-pgroll-migrations=1' }
83+
body: { region, defaultClusterID: clusterId, postgresEnabled: true }
8584
});
8685

8786
const workspaceUrl = getHostUrl(host, 'workspaces').replace('{workspaceId}', workspace).replace('{region}', region);

0 commit comments

Comments
 (0)