Skip to content

Commit

Permalink
chore: add user roles column
Browse files Browse the repository at this point in the history
  • Loading branch information
KagChi committed Apr 27, 2024
1 parent 6d4ae79 commit 3cfe47d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/db/schema.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { Role } from "@/constants/enum";
import { HasDefault, NotNull } from "drizzle-orm";
import { pgTable, PgTimestampBuilderInitial, timestamp, uuid, varchar } from "drizzle-orm/pg-core";

Expand All @@ -21,6 +22,8 @@ export const User = pgTable("user", {

avatar: varchar("avatar"),

roles: varchar("roles").default(Role.User.toString()),

createdAt: createdAt("created_at"),
updatedAt: updatedAt("updated_at")
});

0 comments on commit 3cfe47d

Please sign in to comment.