[BUG]:PostgresError: syntax error at or near "NOT"

i'm using supabase with drizzle
No description
11 Replies
garyaustin
garyaustin3d ago
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.
ibrahim
ibrahim3d ago
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 postgresql
The Amumu
The AmumuOP3d ago
it got fixed automatically now i have this issue
The Amumu
The AmumuOP3d ago
No description
ibrahim
ibrahim3d ago
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
The Amumu
The AmumuOP3d ago
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)
ibrahim
ibrahim3d ago
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?
The Amumu
The AmumuOP3d ago
idk how can i check that?
ibrahim
ibrahim3d ago
I guess it depends on the project, If you are using drizzle does it not produce migratin files somewhere?
The Amumu
The AmumuOP3d ago
i see i have a migration folder that have a lot of files with .sql
garyaustin
garyaustin3d ago
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.

Did you find this page helpful?