-
Notifications
You must be signed in to change notification settings - Fork 257
Migrations that add new field to NpgsqlTsVector SearchVector #3800
Description
Greetings! I was experimenting with NpgsqlTsVector and searching, and actually found it to be pretty straight forward. I did encounter two problems, and I'm not sure how I should actually handle it.
-
If I had a pre-existing entity, and I added say the
SearchVectorproperty ofNpgsqlTsVectortype, and I also added fields to be included in that migration, it seemed like the order with which it tried to apply the migrations was backwards... like the setup of the fields to be included in the TsVector, should be last. It was trying to reference columns that were a part of the same migration, but had yet to be created when trying to apply changes related to the creation of that vector and triggers (if that's how that vector gets populated). (I believe I was able to manually open the migration cs, and re-arrange things and then the migration would run.) -
If I have an entity with a predefined vector, and I added a field, and then wanted to update the vector to also reference this field, it seems like the migration is created no problem, but when trying to apply the migration I get an error:
42P17: generation expression is not immutable
I think I understand what that is saying, and I think I understand why, but is there a migration path there even if I have to handle that migration more manually?