TravisTravis
TravisTravis
DTDrizzle Team
Created by roze789 on 11/30/2024 in #help
DrizzleKit won't regenerate my schemas because of index keys
It's interesting that the relations docs don't mention indexes, although it makes sense that it would add one. I kind of wonder if this is a bug in drizzle, or a very poorly written error message at the least.
44 replies
DTDrizzle Team
Created by roze789 on 11/30/2024 in #help
DrizzleKit won't regenerate my schemas because of index keys
What ended up fixing it? It's not exactly a fix to just remove the relations.
44 replies
DTDrizzle Team
Created by roze789 on 11/30/2024 in #help
DrizzleKit won't regenerate my schemas because of index keys
Yeah, that error message is weirdly vague.
44 replies
DTDrizzle Team
Created by roze789 on 11/30/2024 in #help
DrizzleKit won't regenerate my schemas because of index keys
Well if generate fails, that means it's definitely a problem with your schema (or at least drizzle)
44 replies
DTDrizzle Team
Created by roze789 on 11/30/2024 in #help
DrizzleKit won't regenerate my schemas because of index keys
(I don't really use push, so maybe there's a better way to view the SQL it's running)
44 replies
DTDrizzle Team
Created by roze789 on 11/30/2024 in #help
DrizzleKit won't regenerate my schemas because of index keys
You could maybe try running drizzle-kit generate just to see if there is anything weird in the SQL.
44 replies
DTDrizzle Team
Created by roze789 on 11/30/2024 in #help
DrizzleKit won't regenerate my schemas because of index keys
So to clarify, the DB is completely deleted, created new, and this error occurs when you run push?
44 replies
DTDrizzle Team
Created by roze789 on 11/30/2024 in #help
DrizzleKit won't regenerate my schemas because of index keys
Now that I think about it, you didn't just give two indexes the same name in your schema, did you? It's weird that the error tells you only one of the tables and doesn't tell you the index name.
44 replies
DTDrizzle Team
Created by roze789 on 11/30/2024 in #help
DrizzleKit won't regenerate my schemas because of index keys
So it's trying to create an already existing index.
44 replies
DTDrizzle Team
Created by roze789 on 11/30/2024 in #help
DrizzleKit won't regenerate my schemas because of index keys
As in drizzle thinks you haven't run the migration that adds that index.
44 replies
DTDrizzle Team
Created by roze789 on 11/30/2024 in #help
DrizzleKit won't regenerate my schemas because of index keys
Well it's telling you what to do. Although I'm guessing it's a case of your DB being out of sync with either the drizzle migrations table in your DB or the data in your drizzle/meta directory.
44 replies