Project

General

Profile

bug #8702

Remove Not null constraint for uuid in AUD tables

Added by Andreas Müller 10 months ago. Updated 10 months ago.

Status:
Closed
Priority:
Priority14
Category:
cdm
Target version:
Start date:
11/19/2019
Due date:
% Done:

80%

Severity:
normal
Found in Version:

Description

Some databases do have uuid NOT NULL contraints in some _AUD tables. In caryo_spp I found the following tables with this problem, which is probably created by the model update script for these tables:

AmplificationResult_AUD
CdmLink_AUD
DnaQuality_AUD
Identifier_AUD
Registration_AUD

In other DBs also:

SingleReadAlignment_AUD
TaxonNodeAgentRelation_AUD

The strange thing is that for caryo_nepenthes CdmLink_AUD does allow NULL for CdmLink_AUD (a very new model update) while in caryo_spp it is NOT NULL. While it is not very likely that someone changed this manually already it is not clear why the 2 databases were updated in a different way. This is not so strange as CdmLink_AUD was only renamed, it was IntextReference before.

The exception that is thrwon otherwise is:

com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Column 'uuid' cannot be null is thrown.


Related issues

Related to Edit - bug #7683: external links Audit table should allow uuid to be null Closed 08/27/2018

Associated revisions

Revision dc5a41f6 (diff)
Added by Andreas Müller 10 months ago

ref #8738 , ref #8702 add update script to remove null constraints from AUD.uuid and CdmLing.endPos

Revision cdaeac9a (diff)
Added by Andreas Müller 10 months ago

ref #8738 , ref #8702 add update script to remove null constraints from AUD.uuid and CdmLing.endPos (II)

Revision b9b25534 (diff)
Added by Andreas Müller 10 months ago

ref #8738 , ref #8702 , ref #8468 last changes for 5.12 update script

Revision 86493549 (diff)
Added by Andreas Müller 10 months ago

ref #8738 , ref #8702 , ref #8468 update vaadin test DB

Revision 03d98738 (diff)
Added by Andreas Müller 10 months ago

ref #8738 , ref #8702 , ref #8468 update TaxEditor test DB

History

#1 Updated by Andreas Müller 10 months ago

  • Description updated (diff)

#2 Updated by Andreas Müller 10 months ago

  • Related to bug #7683: external links Audit table should allow uuid to be null added

#3 Updated by Andreas Müller 10 months ago

  • Target version changed from Release 5.12 to CDM UML 5.15

#4 Updated by Andreas Müller 10 months ago

I updated most production DBs manually already.

#5 Updated by Andreas Müller 10 months ago

  • Description updated (diff)

query in information_schema to find such columns

SELECT *
FROM COLUMNS c 
WHERE c.COLUMN_NAME = 'uuid' AND c.TABLE_NAME LIKE '%_AUD' AND c.IS_NULLABLE = 'No'
ORDER BY c.COLUMN_NAME

#6 Updated by Andreas Müller 10 months ago

  • Description updated (diff)

#7 Updated by Andreas Müller 10 months ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 80

#8 Updated by Andreas Müller 10 months ago

  • Target version changed from CDM UML 5.15 to Release 5.12

#9 Updated by Andreas Müller 10 months ago

  • Subject changed from Not null constraint for uuid in AUD tables to Remove Not null constraint for uuid in AUD tables

#10 Updated by Andreas Müller 10 months ago

  • Status changed from Resolved to Closed
  • Priority changed from New to Priority14

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 40 MB)