File tree Expand file tree Collapse file tree 3 files changed +10
-6
lines changed
Expand file tree Collapse file tree 3 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,6 @@ export async function sendReportAction(data: SendReportSchema) {
3434 const [ report ] = await db
3535 . insert ( reportsTable )
3636 . values ( {
37- id : crypto . randomUUID ( ) ,
3837 message : body . message ,
3938 repoAuthor : body . repoAuthor ,
4039 repoId : body . repoId ,
Original file line number Diff line number Diff line change @@ -18,8 +18,6 @@ export const env = createEnv({
1818 NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME :
1919 process . env . NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME ,
2020 NEXT_PUBLIC_ANALYTICS_WEBSITE_ID :
21- process . env . NEXT_PUBLIC_ANALYTICS_WEBSITE_ID ,
22- DATABASE_URL : process . env . DATABASE_URL ,
23- AUTH_DRIZZLE_URL : process . env . AUTH_DRIZZLE_URL
21+ process . env . NEXT_PUBLIC_ANALYTICS_WEBSITE_ID
2422 }
2523} ) ;
Original file line number Diff line number Diff line change @@ -111,7 +111,11 @@ export const sessionsTable = pgTable('nextauth_sessions', {
111111} ) ;
112112
113113export const bookmarksTable = pgTable ( 'bookmarks' , {
114- id : text ( ) . primaryKey ( ) . notNull ( ) ,
114+ id : text ( )
115+ . primaryKey ( )
116+ . notNull ( )
117+ . notNull ( )
118+ . $defaultFn ( ( ) => crypto . randomUUID ( ) ) ,
115119 userId : text ( 'user_id' ) . references ( ( ) => usersTable . id , {
116120 onDelete : 'cascade'
117121 } ) ,
@@ -128,7 +132,10 @@ export const bookmarksTable = pgTable('bookmarks', {
128132} ) ;
129133
130134export const reportsTable = pgTable ( 'reports' , {
131- id : text ( ) . primaryKey ( ) . notNull ( ) ,
135+ id : text ( )
136+ . primaryKey ( )
137+ . notNull ( )
138+ . $defaultFn ( ( ) => crypto . randomUUID ( ) ) ,
132139 repoId : integer ( ) . unique ( ) ,
133140 repoAuthor : varchar ( { length : 255 } ) ,
134141 message : text ( ) . default ( 'No Message' ) . notNull ( ) ,
You can’t perform that action at this time.
0 commit comments