bit type goes to postgresql as a string

Hello! I was recently creating my schemas for a project (I am using postgresql) and I set a column as bit(10), but drizzle-kit push passes it to postgresql as a string so that postgresql gives an error.
export const users = pgTable(
"user",
{
id: bigint("id", { mode: "bigint" }).primaryKey(),
test: bit("test", { dimensions: 10 }),
}
);
export const users = pgTable(
"user",
{
id: bigint("id", { mode: "bigint" }).primaryKey(),
test: bit("test", { dimensions: 10 }),
}
);
->
CREATE TABLE IF NOT EXISTS "formatting" (
"id" bigint PRIMARY KEY NOT NULL,
"test" "bit(10)",
);
CREATE TABLE IF NOT EXISTS "formatting" (
"id" bigint PRIMARY KEY NOT NULL,
"test" "bit(10)",
);
ERROR: type "bit(10)" does not exist at character 161
8 Replies
Dr. Pure
Dr. PureOP•6mo ago
please have a look 😭
rphlmr âš¡
rphlmr ⚡•6mo ago
Cc @Andrew Sherman 🫶
Andrii Sherman
Andrii Sherman•6mo ago
that's a bug if you can create a GH issue for it, would be helpful
Dr. Pure
Dr. PureOP•6mo ago
GitHub
bit type goes to postgresql as a string · Issue #509 · drizzle-team...
When drizzle-kit generate is ran on the following code, the sql code it creates has the bit type as a string that it gives an error. export const users = pgTable( "user", { id: bigint(&qu...
Dr. Pure
Dr. PureOP•4mo ago
any news? is this issue resolved? why is it deleted?
Mario564
Mario564•4mo ago
Doesn't seem deleted on my end. Regardless, this is an issue affecting a few other types too. We'll get it patched soon.
Dr. Pure
Dr. PureOP•3mo ago
:drizzle:
Want results from more Discord servers?
Add your server