CodePlexProject Hosting for Open Source Software
Is it possible to define declarative alternative keys/uniques for a table which is created in the migrations?
What do you mean? Do you mean this?
SchemaBuilder.AlterTable("ThreadPartRecord", t => t.DropColumn("IsAnswered"));
SchemaBuilder.AlterTable("PostPartRecord", t => t.AddColumn<int>("MarkedAs"));
Yes, when you create a column, you can pass in a Lambda that adds to the column:
Yes i saw that but how can i combine this unique to multiple columns? with a alternative key name. So you can have multiple alternative keys for one table.
I don't think you can do that.
Too bad. Are there plan to make this possible in the near future? Because i think this is quiet important. This makes sure we can do this declarative instead of maintaining this in code.
If you need it, implement it and submit a patch.
That's a good idea but first i have to dig (learn some stuff) in to the fundamentals of Orchard before i can create this kind of low level functionalities.
Sure, I wish I could give you a better answer :)
I've opened an issue for this
Are you sure you want to delete this post? You will not be able to recover it later.
Are you sure you want to delete this thread? You will not be able to recover it later.