ERROR: operator does not exist: uuid = character varying
export const hubPost = pgTable("HubPost", {
id: uuid("Id").defaultRandom().primaryKey(),
text: text("Text").notNull(),
title: varchar("Title", { length: 256 }).notNull(),
hub: varchar("Hub", { length: 128 }).notNull(),
authorId: uuid("AuthorId").notNull(),
});
export const hub = pgTable("Hub", {
id: uuid("Id").defaultRandom().primaryKey(),
name: varchar("Name", { length: 128 }).notNull(),
createdAt: timestamp("CreatedAt").defaultNow(),
creatorId: varchar("CreatorId").notNull(),
});
export const hubRelationsToHubPost = relations(hub, ({ many }) => ({
hubPosts: many(hubPost),
}));
export const hubPostRelationsToHub = relations(hubPost, ({ one }) => ({
hub: one(hub, {
fields: [hubPost.hub],
references: [hub.id],
}),
}));export const hubPost = pgTable("HubPost", {
id: uuid("Id").defaultRandom().primaryKey(),
text: text("Text").notNull(),
title: varchar("Title", { length: 256 }).notNull(),
hub: varchar("Hub", { length: 128 }).notNull(),
authorId: uuid("AuthorId").notNull(),
});
export const hub = pgTable("Hub", {
id: uuid("Id").defaultRandom().primaryKey(),
name: varchar("Name", { length: 128 }).notNull(),
createdAt: timestamp("CreatedAt").defaultNow(),
creatorId: varchar("CreatorId").notNull(),
});
export const hubRelationsToHubPost = relations(hub, ({ many }) => ({
hubPosts: many(hubPost),
}));
export const hubPostRelationsToHub = relations(hubPost, ({ one }) => ({
hub: one(hub, {
fields: [hubPost.hub],
references: [hub.id],
}),
}));Here is my relation, and when I tried to run a relational query, it shows this error