© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Drizzle TeamDT
Drizzle Team•2y ago•
1 reply
Shiba Bop

Drizzle Kit studio error

When I visit studio page, it keeps showing the spinner and the console has
There is not enough information to infer relation "__public__.users_table.sessions_tables_user_id"
There is not enough information to infer relation "__public__.users_table.sessions_tables_user_id"
error.
my schema:
export const appSchema = pgSchema(process.env.SECURE_DB_SCHEMA);

export const userTable = pgTable('users_table', {
    id: text('id').notNull().primaryKey(),
    name: text('name').notNull(),
    email: text('email').notNull().unique(),
    password_hash: text('password_hash').notNull()
});

export const sessionTable = appSchema.table('sessions_table', {
    id: text('id').primaryKey(),
    userId: text('user_id')
        .notNull()
        .references(() => userTable.id),
    expiresAt: timestamp('expires_at', {
        withTimezone: true,
        mode: 'date'
    }).notNull()
});
export const appSchema = pgSchema(process.env.SECURE_DB_SCHEMA);

export const userTable = pgTable('users_table', {
    id: text('id').notNull().primaryKey(),
    name: text('name').notNull(),
    email: text('email').notNull().unique(),
    password_hash: text('password_hash').notNull()
});

export const sessionTable = appSchema.table('sessions_table', {
    id: text('id').primaryKey(),
    userId: text('user_id')
        .notNull()
        .references(() => userTable.id),
    expiresAt: timestamp('expires_at', {
        withTimezone: true,
        mode: 'date'
    }).notNull()
});
Drizzle TeamJoin
The official Discord for all Drizzle related projects, such as Drizzle ORM, Drizzle Kit, Drizzle Studio and more!
11,879Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

drizzle-kit studio
Drizzle TeamDTDrizzle Team / help
9mo ago
Error using drizzle-kit studio
Drizzle TeamDTDrizzle Team / help
2y ago
Help Drizzle-kit studio
Drizzle TeamDTDrizzle Team / help
8mo ago
drizzle kit studio proble help ???
Drizzle TeamDTDrizzle Team / help
14mo ago