Skip to content

Commit

Permalink
Update drizzle-orm.md (#1744)
Browse files Browse the repository at this point in the history
  • Loading branch information
Boby900 authored Nov 23, 2024
1 parent 029bd4c commit f9a85e0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pages/sessions/basic-api/drizzle-orm.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ import type { InferSelectModel } from "drizzle-orm";
const pool = new pg.Pool();
const db = drizzle(pool);

const userTable = pgTable("user", {
export const userTable = pgTable("user", {
id: serial("id").primaryKey()
});

const sessionTable = pgTable("session", {
export const sessionTable = pgTable("session", {
id: text("id").primaryKey(),
userId: integer("user_id")
.notNull()
Expand All @@ -83,11 +83,11 @@ import type { InferSelectModel } from "drizzle-orm";
const sqliteDB = sqlite(":memory:");
const db = drizzle(sqliteDB);

const userTable = sqliteTable("user", {
export const userTable = sqliteTable("user", {
id: integer("id").primaryKey()
});

const sessionTable = sqliteTable("session", {
export const sessionTable = sqliteTable("session", {
id: text("id").primaryKey(),
userId: integer("user_id")
.notNull()
Expand Down

0 comments on commit f9a85e0

Please sign in to comment.