Deprecated function table.d.ts(26, 8): The declaration was marked as deprecated here.

import { pgEnum, pgTable as table } from "drizzle-orm/pg-core";
import * as t from "drizzle-orm/pg-core";
import { createInsertSchema, createSelectSchema } from "drizzle-zod";
export const customers = table(
"customers",
{
id: t.bigint({ mode: "number" }).primaryKey().generatedAlwaysAsIdentity(),
email: t.text("email").notNull().unique(),
firstName: t.text("first_name"),
lastName: t.text("last_name"),
state: t.text("state"),
verifiedEmail: t.boolean("verified_email"),
phone: t.text("phone"),
tags: t.text("tags"),
currency: t.text("currency"),
createdAt: t.timestamp("created_at").defaultNow(),
updatedAt: t.timestamp("updated_at").defaultNow(),
},
(tble) => {
return {
emailIndex: t.uniqueIndex("email_idx").on(tble.email),
};
}
);
import { pgEnum, pgTable as table } from "drizzle-orm/pg-core";
import * as t from "drizzle-orm/pg-core";
import { createInsertSchema, createSelectSchema } from "drizzle-zod";
export const customers = table(
"customers",
{
id: t.bigint({ mode: "number" }).primaryKey().generatedAlwaysAsIdentity(),
email: t.text("email").notNull().unique(),
firstName: t.text("first_name"),
lastName: t.text("last_name"),
state: t.text("state"),
verifiedEmail: t.boolean("verified_email"),
phone: t.text("phone"),
tags: t.text("tags"),
currency: t.text("currency"),
createdAt: t.timestamp("created_at").defaultNow(),
updatedAt: t.timestamp("updated_at").defaultNow(),
},
(tble) => {
return {
emailIndex: t.uniqueIndex("email_idx").on(tble.email),
};
}
);
No description
4 Replies
Angelelz
Angelelz3mo ago
The third parameter that returns an object was deprecated in favor of returning an array
Angelelz
Angelelz3mo ago
GitHub
Release 0.36.0 · drizzle-team/drizzle-orm
This version of drizzle-orm requires [email protected] to enable all new features New Features The third parameter in Drizzle ORM becomes an array The object API is still available but deprecate...
Xpecial Poo
Xpecial Poo3mo ago
interesting... my drizzle-kit still generates with the deprecated way, why is that? And all my types are just broken at the moment, what could the reason?
Unknown User
Unknown User2mo ago
Message Not Public
Sign In & Join Server To View

Did you find this page helpful?