This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Is there a way to specify the default value for a new column? I want to add a boolean to a table and want the value to be true. Or do I have to add code to the migration to update the column after the AddColumn.
Thanks, Nick |
|
|
It's not currently possible. You'd need to use an ExecuteNativeCommand call to do an ALTER TABLE. It would be a very useful enhancement, though, and I'll log a feature request for it. |
|
|
I've got exactly the same problem as wannern has. Is there anything new in this topic ? Are there any other workarounds than using ExecuteNativeCommand call?. |
|
|
No, you will still need to use ExecuteNativeCommand to handle this.
|
|
|
Thanks for the answer. Are You planning to add this feature in near future? |
|
|
No, there has been interest in this from a few people so it is something we are definitely looking at as part of generally improving the migration framework but it will not be in the near future.
|
|
|
+1 additional interest. |
|