export const userToAccount = pgTable(
'user_to_account', // This was changed from something else
{
accountId: uuid('account_id')
.references(() => accounts.id)
.notNull(),
userId: uuid('user_id')
.references(() => users.id)
.notNull(),
createdAt: timestamp('created_at').defaultNow().notNull(),
},
(table) => ({
pk: primaryKey({ columns: [table.userId, table.accountId] }),
}),
);
export const userToAccount = pgTable(
'user_to_account', // This was changed from something else
{
accountId: uuid('account_id')
.references(() => accounts.id)
.notNull(),
userId: uuid('user_id')
.references(() => users.id)
.notNull(),
createdAt: timestamp('created_at').defaultNow().notNull(),
},
(table) => ({
pk: primaryKey({ columns: [table.userId, table.accountId] }),
}),
);