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
|
If I have a property of type String, and it is non-nullable, when I migrate this new property into our live DB, will the values all be "" by default? |
|
|
If you are using LightSpeed migrations, yes, the ALTER TABLE statement will include a DEFAULT '' clause. If you are writing your own SQL scripts, of course, the new column will have whatever default you supply in your SQL. A handy tip is that, if you're not sure exactly what a migration is going to do in the database, you can preview the migration SQL using the Migrations > Run Migrations command. Use the Change... button to set the "Generate SQL that I can later apply to a database" option: the generated SQL will be sent to a Visual Studio window so you can examine it, save it as a SQL script file, or whatever. |
|