why does `alias()` create a new table?
this is my user_followers table and i have created table alias for joins. but for some reason it is creating 2 tables called followers and following which is a copy of users table.
In the 3rd screenshot, that's how i am planning to use the alias
My question is why is a new table getting created? is this correct usage of
alias()
?1 Reply
you don't need to export it from the schema file, since each table exported from there will be generated in your migrations folder
you can create separate file, e.g aliases.ts (which is not part of schema you export to drizzle.config.ts) and put them there