Eko
Eko
DTDrizzle Team
Created by sevenwestonroads on 5/12/2023 in #help
Deploying Next.js w/ Drizzle on Vercel with Turborepo
I did not have to do the skipLibCheck tho
21 replies
DTDrizzle Team
Created by sevenwestonroads on 5/12/2023 in #help
Deploying Next.js w/ Drizzle on Vercel with Turborepo
Thanks got it working 🙂
21 replies
DTDrizzle Team
Created by sevenwestonroads on 5/12/2023 in #help
Deploying Next.js w/ Drizzle on Vercel with Turborepo
Hey Andrew, Could you maybe help me out here?
21 replies
DTDrizzle Team
Created by sevenwestonroads on 5/12/2023 in #help
Deploying Next.js w/ Drizzle on Vercel with Turborepo
@jeanhdev Can I ask if and how exactly you got this issue resolved? I couldn't get it to work
21 replies
DTDrizzle Team
Created by Eko on 5/23/2023 in #help
Select with relation
@Andrew Sherman I seem to have had quite a few issues with an outdated config for drizzle now it's been cleared up but one question tho, what is the correct order of drizzle-kit commands and how can I make it automatically push schemas to the db?
21 replies
DTDrizzle Team
Created by Eko on 5/23/2023 in #help
Select with relation
Ill update in a bit
21 replies
DTDrizzle Team
Created by Eko on 5/23/2023 in #help
Select with relation
I might have fixed it...
21 replies
DTDrizzle Team
Created by Eko on 5/23/2023 in #help
Select with relation
I got multiple tables but nothing else
21 replies
DTDrizzle Team
Created by Eko on 5/23/2023 in #help
Select with relation
is it possible that I did not properly push my schemas?
21 replies
DTDrizzle Team
Created by Eko on 5/23/2023 in #help
Select with relation
yes
21 replies
DTDrizzle Team
Created by Eko on 5/23/2023 in #help
Select with relation
And my schema for question looks like this
export const question = pgTable(
"question",
{
id: serial("id").notNull(),
title: varchar("title", { length: 100 }).notNull(),
desc: varchar("desc", { length: 100 }),
createdAt: timestamp("createdAt", {
precision: 6,
mode: "string",
}).defaultNow(),
option1: varchar("option1", { length: 30 }).notNull(),
option2: varchar("option2", { length: 30 }).notNull(),
ownerId: text("ownerId").notNull(),
image1: text("image1"),
image2: text("image2"),
isDeleted: boolean("isDeleted").notNull(),
},
(table) => {
return {
questionPkey: primaryKey(table.id, table.id),
};
}
);

export const questionRelations = relations(question, ({ many })=>({
votes: many(questionVotes),
likes: many(questionLikes),
}))
export const question = pgTable(
"question",
{
id: serial("id").notNull(),
title: varchar("title", { length: 100 }).notNull(),
desc: varchar("desc", { length: 100 }),
createdAt: timestamp("createdAt", {
precision: 6,
mode: "string",
}).defaultNow(),
option1: varchar("option1", { length: 30 }).notNull(),
option2: varchar("option2", { length: 30 }).notNull(),
ownerId: text("ownerId").notNull(),
image1: text("image1"),
image2: text("image2"),
isDeleted: boolean("isDeleted").notNull(),
},
(table) => {
return {
questionPkey: primaryKey(table.id, table.id),
};
}
);

export const questionRelations = relations(question, ({ many })=>({
votes: many(questionVotes),
likes: many(questionLikes),
}))
21 replies
DTDrizzle Team
Created by Eko on 5/23/2023 in #help
Select with relation
This is what I had setup
import { drizzle } from "drizzle-orm/postgres-js";
import postgres from 'postgres'
import * as schema from "@/db/migrations/schema"

const connectionString: string | undefined = process.env.DATABASE_URL

const client = postgres(connectionString!, { max: 1 })
const db = drizzle(client, {schema});
import { drizzle } from "drizzle-orm/postgres-js";
import postgres from 'postgres'
import * as schema from "@/db/migrations/schema"

const connectionString: string | undefined = process.env.DATABASE_URL

const client = postgres(connectionString!, { max: 1 })
const db = drizzle(client, {schema});
21 replies
DTDrizzle Team
Created by Eko on 5/23/2023 in #help
Select with relation
Basically whenever I try following the docs I get an error like postgreserror: unrecognized configuration parameter "schema"
21 replies