Skip to content

Commit 6617f6a

Browse files
[Drizzle Kit]: Drizzle Studio support for SQLite Cloud and Bun (#5058)
* feat: Add sqlite-cloud driver * feat: Add support for @tursodatabase/database in SQLite connections * feat: Add bun support * dprint * refactor: Rename job 'detect' to 'switch' for clarity in workflow * revert some changes * fix: Update SQLite connection message to reflect supported packages * fix: Update Singlestore Docker image version to 0.2.67 in workflow and tests
1 parent ff4b5b5 commit 6617f6a

File tree

19 files changed

+689
-121
lines changed

19 files changed

+689
-121
lines changed

.github/workflows/release-feature-branch.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ jobs:
9999
ports:
100100
- 33306:3306
101101
singlestore:
102-
image: ghcr.io/singlestore-labs/singlestoredb-dev:latest
102+
image: ghcr.io/singlestore-labs/singlestoredb-dev:0.2.67
103103
env:
104104
ROOT_PASSWORD: singlestore
105105
ports:

.github/workflows/release-latest.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ jobs:
9797
ports:
9898
- 33306:3306
9999
singlestore:
100-
image: ghcr.io/singlestore-labs/singlestoredb-dev:latest
100+
image: ghcr.io/singlestore-labs/singlestoredb-dev:0.2.67
101101
env:
102102
ROOT_PASSWORD: singlestore
103103
ports:

.github/workflows/router.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
workflow_dispatch:
99

1010
jobs:
11-
detect:
11+
switch:
1212
runs-on: ubuntu-latest
1313
outputs:
1414
target: ${{ steps.route.outputs.target }}
@@ -23,8 +23,8 @@ jobs:
2323
fi
2424
2525
run-feature:
26-
needs: detect
27-
if: needs.detect.outputs.target == 'feature'
26+
needs: switch
27+
if: needs.switch.outputs.target == 'feature'
2828
uses: ./.github/workflows/release-feature-branch.yaml
2929
secrets:
3030
PLANETSCALE_CONNECTION_STRING: ${{ secrets.PLANETSCALE_CONNECTION_STRING }}
@@ -38,8 +38,8 @@ jobs:
3838
SQLITE_CLOUD_CONNECTION_STRING: ${{ secrets.SQLITE_CLOUD_CONNECTION_STRING }}
3939

4040
run-latest:
41-
needs: detect
42-
if: needs.detect.outputs.target == 'latest'
41+
needs: switch
42+
if: needs.switch.outputs.target == 'latest'
4343
uses: ./.github/workflows/release-latest.yaml
4444
secrets:
4545
PLANETSCALE_CONNECTION_STRING: ${{ secrets.PLANETSCALE_CONNECTION_STRING }}

drizzle-kit/build.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ const driversPackages = [
1818
'@libsql/client',
1919
'better-sqlite3',
2020
'bun:sqlite',
21+
'@sqlitecloud/drivers',
22+
'@tursodatabase/database',
23+
'bun',
2124
];
2225

2326
esbuild.buildSync({

drizzle-kit/package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,17 @@
5353
"@aws-sdk/client-rds-data": "^3.556.0",
5454
"@cloudflare/workers-types": "^4.20230518.0",
5555
"@electric-sql/pglite": "^0.2.12",
56+
"@hono/bun-compress": "^0.1.0",
5657
"@hono/node-server": "^1.9.0",
5758
"@hono/zod-validator": "^0.2.1",
5859
"@libsql/client": "^0.10.0",
5960
"@neondatabase/serverless": "^0.9.1",
6061
"@originjs/vite-plugin-commonjs": "^1.0.3",
6162
"@planetscale/database": "^1.16.0",
63+
"@sqlitecloud/drivers": "^1.0.653",
64+
"@tursodatabase/database": "0.2.1",
6265
"@types/better-sqlite3": "^7.6.13",
66+
"@types/bun": "^1.3.2",
6367
"@types/dockerode": "^3.3.28",
6468
"@types/glob": "^8.1.0",
6569
"@types/json-diff": "^1.0.3",
@@ -76,7 +80,7 @@
7680
"@vercel/postgres": "^0.8.0",
7781
"ava": "^5.1.0",
7882
"better-sqlite3": "^11.9.1",
79-
"bun-types": "^0.6.6",
83+
"bun-types": "^1.3.2",
8084
"camelcase": "^7.0.1",
8185
"chalk": "^5.2.0",
8286
"commander": "^12.1.0",

drizzle-kit/src/cli/commands/libSqlPushUtils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import chalk from 'chalk';
22

33
import { JsonStatement } from 'src/jsonStatements';
4-
import { findAddedAndRemoved, SQLiteDB } from 'src/utils';
4+
import { findAddedAndRemoved, type SQLiteDB } from 'src/utils';
55
import { SQLiteSchemaInternal, SQLiteSchemaSquashed, SQLiteSquasher } from '../../serializer/sqliteSchema';
66
import {
77
CreateSqliteIndexConvertor,

drizzle-kit/src/cli/commands/sqliteIntrospect.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { renderWithTask } from 'hanji';
22
import { Minimatch } from 'minimatch';
3+
import type { SQLiteDB } from 'src/utils';
34
import { originUUID } from '../../global';
45
import { schemaToTypeScript } from '../../introspect-sqlite';
56
import type { SQLiteSchema } from '../../serializer/sqliteSchema';
67
import { fromDatabase } from '../../serializer/sqliteSerializer';
7-
import type { SQLiteDB } from '../../utils';
88
import { Casing } from '../validations/common';
99
import type { SqliteCredentials } from '../validations/sqlite';
1010
import { IntrospectProgress, ProgressView } from '../views';

0 commit comments

Comments
 (0)