Skip to content

Commit

Permalink
Removing redundant not nulls from primary key rows for drizzle/sqlite…
Browse files Browse the repository at this point in the history
… docs and adapter (#1690)
  • Loading branch information
tef20 authored Sep 7, 2024
1 parent 53ddee3 commit a2d0333
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/pages/database/drizzle.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,11 @@ const sqliteDB = sqlite(":memory:");
const db = drizzle(sqliteDB);

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

const sessionTable = sqliteTable("session", {
id: text("id").notNull().primaryKey(),
id: text("id").primaryKey(),
userId: text("user_id")
.notNull()
.references(() => userTable.id),
Expand Down
4 changes: 2 additions & 2 deletions packages/adapter-drizzle/tests/sqlite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ sqliteDB
.run(databaseUser.id, databaseUser.attributes.username);

const userTable = sqliteTable("user", {
id: text("id").notNull().primaryKey(),
id: text("id").primaryKey(),
username: text("username").notNull().unique()
});

const sessionTable = sqliteTable("user_session", {
id: text("id").notNull().primaryKey(),
id: text("id").primaryKey(),
userId: text("user_id")
.notNull()
.references(() => userTable.id),
Expand Down

0 comments on commit a2d0333

Please sign in to comment.