Schema filter not working

As can been seen in the pic I have provided the filter but when i run the drizzle-kit introspect command it still does not take filter the schema
No description
12 Replies
rphlmr âš¡
rphlmr ⚡•2mo ago
👋 the 15 fetched tables are not in the public schema?
maverickdoge
maverickdoge•2mo ago
@rphlmr âš¡ so basically its fetching too much. So for example its pulling enums from other schemas
rphlmr âš¡
rphlmr ⚡•2mo ago
GitHub
introspect schemaFilter doesn't work for data types · Issue #407 · ...
I'm filtering out a schema using schemaFilter in the config. It seems to work for everything except data types - it's still including those from the filtered out schema. drizzle-kit version...
maverickdoge
maverickdoge•2mo ago
@rphlmr âš¡ ok. I mean its not hurting so I am fine with that. But I am using supabase auth and as per this discussion https://github.com/supabase/supabase/issues/19883 it should create a a users table for refrencing to the auth schema. const authSchema = pgSchema("auth"); export const Users = authSchema.table("users", { id: uuid("id").primaryKey(), }); but its not doing that.
GitHub
When using Supabase Auth, how do you relate to other tables using D...
Improve documentation https://supabase.com/docs/guides/database/connecting-to-postgres#connecting-with-drizzle Describe the problem When using Supabase Auth, how do you relate to other tables using...
maverickdoge
maverickdoge•2mo ago
Like its creating userInAuth for the relations but that table is not in the schema
No description
rphlmr âš¡
rphlmr ⚡•2mo ago
I have hacked that in my schema.ts
/* -- Supabase -- */
// 💡 We are not creating any schema here, just declaring it to be able to reference user id

const SupabaseAuthSchema = pgSchema("auth");

const SupabaseAuthUsers = SupabaseAuthSchema.table("users", {
id: uuid("id").primaryKey().notNull(),
});
/* -- Supabase -- */
// 💡 We are not creating any schema here, just declaring it to be able to reference user id

const SupabaseAuthSchema = pgSchema("auth");

const SupabaseAuthUsers = SupabaseAuthSchema.table("users", {
id: uuid("id").primaryKey().notNull(),
});
Not exporting these 2 objects is important. We can use them later in tables without messing up our migrations.
/* -- User -- */

const user = pgTable("user", {
id: uuid("id")
.$type<UserId>()
.primaryKey()
.notNull()
.references(() => SupabaseAuthUsers.id, { onDelete: "cascade" }),
});
/* -- User -- */

const user = pgTable("user", {
id: uuid("id")
.$type<UserId>()
.primaryKey()
.notNull()
.references(() => SupabaseAuthUsers.id, { onDelete: "cascade" }),
});
I am also using Supabase for https://drizzle.run
maverickdoge
maverickdoge•2mo ago
@rphlmr âš¡ thanks! Last one. So as per this discussion https://discord.com/channels/1043890932593987624/1263501087055413294 gemoetry type should be added when doing introspect if u have the latest version of drizzle. So actually i have it but still its creating unknown type. Need any extra config?
rphlmr âš¡
rphlmr ⚡•2mo ago
Drizzle ORM - PostGIS geometry point
Drizzle ORM is a lightweight and performant TypeScript ORM with developer experience in mind.
rphlmr âš¡
rphlmr ⚡•2mo ago
I am not sure how it works 😬
maverickdoge
maverickdoge•2mo ago
@rphlmr âš¡ But as per my understanding. It is only relevant when creating postgis related tables. But I am justing doing the introspect so shouldn't that geometry type be refrenced in the schema.ts by the cli?
rphlmr âš¡
rphlmr ⚡•2mo ago
@Andrii Sherman I don't know :sweating: , if you have some info about what should be expected here?
Andrii Sherman
Andrii Sherman•2mo ago
it should work actually, so definitely a bug you still can manually add it to unblock you, but we will fix it
Want results from more Discord servers?
Add your server