Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create a fulltext catalog in an entity framework database migration? [duplicate]

I'm trying to create a fulltext catalog on a entity framework migration but if I do a migration with:

migrationBuilder.Sql("CREATE FULLTEXT CATALOG[CatalogName]");

I get the following:

CREATE FULLTEXT CATALOG statement cannot be used inside a user transaction.

If I try to do it at the seed function I get the same result. I've searched about this and all issues I found the author either decided to do it manually on the DB or some other solution that is not applicable to me.

Any ideas on how I may get this to work?

like image 954
RicardoSBA Avatar asked May 05 '16 14:05

RicardoSBA


1 Answers

Now I feel dumb. I didn't notice that Sql() function has an optional parameter to suppress the transaction :\ Passing true ended up solving my problem.

like image 76
RicardoSBA Avatar answered Sep 23 '22 15:09

RicardoSBA