Null values on table testprojects column prefix

LATEST Official version.
Questions and discussions - NO ISSUES
FOR ISSUES => http://mantis.testlink.org

Moderators: Amaradana, TurboPT, TL Developers

Post Reply
itamare
TestLink user
Posts: 3
Joined: Sun Sep 09, 2012 3:02 pm

Null values on table testprojects column prefix

Post by itamare »

Hi to all,
I get a strange situation, on table testprojects column prefix which should be not nullable, I have null values. I think they have came from old version of the application which upgraded with the time. I order to merge two DB, I had need to convert this column to nullable so I can insert into it the rows with the null values. Obviously, after my changes I can't convert it back.
I wonder if this change can affect the activity of the DB and the application?

Thanks in advance
fman
Member of TestLink Community
Posts: 3123
Joined: Tue Nov 15, 2005 7:19 am

Re: Null values on table testprojects column prefix

Post by fman »

yes, you have to fix this manually
itamare
TestLink user
Posts: 3
Joined: Sun Sep 09, 2012 3:02 pm

Re: Null values on table testprojects column prefix

Post by itamare »

Sorry but I don't understand your answer, I did change the column configuration manually but I asked about the consequences of those change. Do anybody know?
StephenP
Advanced user
Posts: 16
Joined: Fri Jun 03, 2011 12:55 pm

Re: Null values on table testprojects column prefix

Post by StephenP »

In any database-based application, if a column has been defined to be non-nullable, but you make it nullable and introduce null values, then you should expect things to break somewhere. But the programmers may not be able to tell you exactly what will break and when - the column was defined non-nullable precisely so they could avoid worrying about that.

So you have to fix it. In other words: insert unique values for all rows which are currently null and set the column back to non-nullable.

Hope this helps.
Post Reply