-
-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Official Drizzle Studio for D1 support
- Loading branch information
Timothy Miller
committed
Nov 10, 2023
1 parent
56d5f15
commit 72b733c
Showing
7 changed files
with
21 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,13 @@ | ||
import * as dotenv from 'dotenv' | ||
import type { Config } from 'drizzle-kit' | ||
dotenv.config({ path: './.dev.vars' }) | ||
|
||
const DATABASE_ID = process.env.DATABASE_ID | ||
if (DATABASE_ID === undefined) { | ||
throw new Error('DATABASE_ID is undefined') | ||
} | ||
|
||
export default { | ||
driver: 'better-sqlite', | ||
dbCredentials: { | ||
url: `./.wrangler/state/v3/d1/${DATABASE_ID}/db.sqlite`, | ||
}, | ||
schema: './src/db/schema.ts', | ||
out: './migrations', | ||
driver: 'd1', | ||
dbCredentials: { | ||
wranglerConfigPath: 'wrangler.toml', | ||
dbName: 'production', | ||
}, | ||
verbose: false, | ||
strict: true, | ||
} satisfies Config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
72b733c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✔ EAS production build completed