| Author |
Message |
alibulut2006
Joined: 23 Dec 2010 Posts: 17 Location: 218
|
Posted: Thu Dec 23, 2010 3:08 pm Post subject: Error on Getting Latest Version after adding new column |
|
|
I am getting these warnings while getting lastest version and then it fails with below error while applying changes to database step. What should I do ?
Cannot insert the value NULL into column 'DeviceId', table 'TestForRG.dbo.tmp_rg_xx_DemDeviceType'; column does not allow nulls. INSERT fails.
Warnings :
Severity: High
Object: DemDeviceType
Title: The column [DeviceDtcId] on table [dbo].[DemDeviceType] must be added but has no default and does not allow NULL values. The table must be rebuilt. If the table contains data then the migration script will not work. To avoid this, add a default to the column or mark it as allowing NULL values.
----------------------------------------------------
Severity: High
Object: DemDeviceType
Title: The column [DeviceDtfId] on table [dbo].[DemDeviceType] must be added but has no default and does not allow NULL values. The table must be rebuilt. If the table contains data then the migration script will not work. To avoid this, add a default to the column or mark it as allowing NULL values.
----------------------------------------------------
Severity: High
Object: DemDeviceType
Title: The column [DeviceId] on table [dbo].[DemDeviceType] must be added but has no default and does not allow NULL values. The table must be rebuilt. If the table contains data then the migration script will not work. To avoid this, add a default to the column or mark it as allowing NULL values.
----------------------------------------------------
Severity: High
Object: DemDeviceType
Title: The column [DeviceName] on table [dbo].[DemDeviceType] must be added but has no default and does not allow NULL values. The table must be rebuilt. If the table contains data then the migration script will not work. To avoid this, add a default to the column or mark it as allowing NULL values.
----------------------------------------------------
Severity: Medium
Object: DemDeviceType
Title: Column [DtyDtcId] on table [dbo].[DemDeviceType] could not be matched to a column in the source table. The data in this column will be lost.
----------------------------------------------------
Severity: Medium
Object: DemDeviceType
Title: Column [DtyDtfId] on table [dbo].[DemDeviceType] could not be matched to a column in the source table. The data in this column will be lost.
----------------------------------------------------
Severity: Medium
Object: DemDeviceType
Title: Column [DtyId] on table [dbo].[DemDeviceType] could not be matched to a column in the source table. The data in this column will be lost.
----------------------------------------------------
Severity: Medium
Object: DemDeviceType
Title: Column [DtyName] on table [dbo].[DemDeviceType] could not be matched to a column in the source table. The data in this column will be lost.
---------------------------------------------------- _________________ Ali Bulut
Senior Database Administrator & Project Manager
a.bulut@triodor.eu |
|
| Back to top |
|
 |
David Atkinson
Joined: 05 Dec 2005 Posts: 1080
|
Posted: Thu Dec 23, 2010 11:27 pm Post subject: |
|
|
You are trying to 'get' a column that is set to NOT NULL so the script will fail due to it not knowing how to populate the column's data as your local table has existing data.
What might be worth doing is to edit the table in source control and set the column to allow null values? Or you can remove the data in your dev DB, although this could be problematic. Alternatively you'd need to make the change manually rather than relying on 'get latest'.
We hope to improve the user experience for this in future. Can I ask you how you'd like the software to behave in this instance?
David Atkinson
Red Gate Software |
|
| Back to top |
|
 |
alibulut2006
Joined: 23 Dec 2010 Posts: 17 Location: 218
|
Posted: Tue Dec 28, 2010 12:30 pm Post subject: |
|
|
Hi David;
Thanks for your explanations. I think you are right. We can'T manage this stiuation "automatically".. When we try same case empty table; we didn'T have any error about NULL data. So; it seems we have to manage manually this case in our database development process. Or; we have to indicate "default value" for this column while creating.
Thanks and Regards. _________________ Ali Bulut
Senior Database Administrator & Project Manager
a.bulut@triodor.eu |
|
| Back to top |
|
 |
David Atkinson
Joined: 05 Dec 2005 Posts: 1080
|
Posted: Tue Dec 28, 2010 11:22 pm Post subject: |
|
|
We're considering a feature that:
1) will prompt users for a default value when it detects this scenario
2) will allow the user to commit their own script that would be used when another user does 'get latest' on that specific change.
Any feedback on these ideas would be welcome.
David |
|
| Back to top |
|
 |
|
|
All times are GMT + 1 Hour
|
| Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group