[BUG]:PostgresError: syntax error at or near "NOT"
i'm using supabase with drizzle

11 Replies
Seems like your migration file has a Postgres syntax error.
You don't show the migration line that is failing. This is not a Supabase error and is something your Drizzle is doing or you did in the SQL (not sure how it works). Postgres does not "lie" on its errors and there won't be bugs in Postgres around this.
You don't show the migration line that is failing. This is not a Supabase error and is something your Drizzle is doing or you did in the SQL (not sure how it works). Postgres does not "lie" on its errors and there won't be bugs in Postgres around this.
This may not be the issue but a user came by the other day with the same error and the issue was they had
CREATE POLICY IF NOT EXISTS which is not valid postgresqlit got fixed automatically
now i have this issue

do any of your tables have this column or/and are you creating some kind of foreign relationship between two tables where this column must exist
no i don't have a column for is_active on my tables (it's an open source project that i want to contribute to)
i just watched the whole video, you have quite a few columns that are missing. Looking inside of your migrations for the columns it says it is missing and then examine if the queries you are making require those columns?
idk
how can i check that?
I guess it depends on the project, If you are using drizzle does it not produce migratin files somewhere?
i see
i have a migration folder that have a lot of files with .sql
You should probably start a new Post and have Drizzle in the title. Not many users here use Drizzle but there are some.
Also normally you don't run on a topic with new questions as other users won't likely look.