DRVGO
DRVGO
DTDrizzle Team
Created by DRVGO on 10/22/2024 in #help
Error in relational queries
Thanks a lot!
18 replies
DTDrizzle Team
Created by DRVGO on 10/22/2024 in #help
Error in relational queries
XD
18 replies
DTDrizzle Team
Created by DRVGO on 10/22/2024 in #help
Error in relational queries
Damn! this is what I actually needed
18 replies
DTDrizzle Team
Created by DRVGO on 10/22/2024 in #help
Error in relational queries
I never tried it, wait let me check
18 replies
DTDrizzle Team
Created by DRVGO on 10/22/2024 in #help
Error in relational queries
Removing the table name generator function works
18 replies
DTDrizzle Team
Created by DRVGO on 10/22/2024 in #help
Error in relational queries
Apparently the function is blocking the intellisense
18 replies
DTDrizzle Team
Created by DRVGO on 10/22/2024 in #help
Error in relational queries
Weird
18 replies
DTDrizzle Team
Created by DRVGO on 10/22/2024 in #help
Error in relational queries
Hmm
18 replies
DTDrizzle Team
Created by DRVGO on 10/22/2024 in #help
Error in relational queries
This is the db instance
18 replies
DTDrizzle Team
Created by DRVGO on 10/22/2024 in #help
Error in relational queries
Also
import { drizzle } from "drizzle-orm/postgres-js";
import postgres from "postgres";
import * as schema from "./schema";

export const connection = postgres(process.env.DATABASE_URL!);
export const db = drizzle(connection, {
schema,
});
import { drizzle } from "drizzle-orm/postgres-js";
import postgres from "postgres";
import * as schema from "./schema";

export const connection = postgres(process.env.DATABASE_URL!);
export const db = drizzle(connection, {
schema,
});
18 replies
DTDrizzle Team
Created by DRVGO on 10/22/2024 in #help
Error in relational queries
export function generateTableName(prefix?: string) {
return (name: string) => {
return prefix ? prefix + "__" + name : name;
};
}
export function generateTableName(prefix?: string) {
return (name: string) => {
return prefix ? prefix + "__" + name : name;
};
}
It's just a simple function
18 replies
DTDrizzle Team
Created by DRVGO on 8/11/2023 in #help
Error While db-push
Guess I fixed it, for some reason defaultNow() is generating (now()) instead of current_timestamp(). I just checked the table in the db. I changed it to,
.default(sql`current_timestamp()`)
.default(sql`current_timestamp()`)
And it worked
2 replies