Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turso setup things #20

Merged
merged 6 commits into from
Jun 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions drizzle.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import type { Config } from "drizzle-kit";
import * as dotenv from "dotenv";

dotenv.config({
path: ".env.local",
});

export default {
schema: "./drizzle/schema.ts",
out: "./drizzle/migrations",
dialect: "sqlite",
driver: "turso",
dbCredentials: {
url: process.env.TURSO_DB_URL,
authToken: process.env.TURSO_AUTH_TOKEN,
},
} satisfies Config;
5 changes: 5 additions & 0 deletions drizzle/schema.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { sqliteTable, text } from "drizzle-orm/sqlite-core";

export const fooTable = sqliteTable("foo", {
bar: text("bar").notNull().default("Hey!"),
});
3 changes: 3 additions & 0 deletions environment.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ declare global {
MESSAGING_SENDER_ID: string;
APP_ID: string;

TURSO_AUTH_TOKEN: string;
TURSO_DB_URL: string;

FIREBASE_SERVICE_ACCOUNT_KEY: string;
}
}
Expand Down
Loading