Bug confirmed, will be fixed in Servoy 2.0 rc7, thanks for reporting.
IT2BE:
That is I can not uncheck the property ‘allow null’…
Correct it is impossible to add columns to a table without allowing null values (all values are null when column is added) so only possible on create of table.
Correct it is impossible to add columns to a table without allowing null values (all values are null when column is added) so only possible on create of table.
Why is that Jan? Is it because you otherwise would have to recalculate the existing rows?
Marcel, just think about this:
you already have 10.000 rows of data in the table and then you add a string column that can’t be null. What kind of data should there be in the column for those 10.000 rows?? Because it can’t be null, so it has to fill all the columns with something.. that’s why the database don’t allow it.
Example 1:
I designed the database and found out (while designing…) that I want the value not to be nullable. I now have to create the tables again (three of them with something like 50 fields)…
Example 2:
The customers askes for extra functionality. I now not only have to create the table again but also export import all data…
Example 3:
I am working with a FireBird database and wait for the ASA Sybase database to come. While designing the application I haven’t thought of nullable fields or not. When I now go from the FireBird database to the ASA database I have to define the tables again while it would have been a matter of minutes in the situation I just could have exported/imported the solution…
As you probably understand these 3 examples are all life ones!!!
You can solve all these problem fairly easy on the database side. There are tons of tools that will generate a CREATE TABLE statement from a table that you already have. You take that code, make your alterations, rename the old table and create your altered table. Then you write a simple INSERT INTO … SELECT *… from old table to the new table. While you are doing that you can also take care of values that are NULL in your original table but not supposed to contain null values in your altered table.