Project

General

Profile

Actions

bug #8702

closed

Remove Not null constraint for uuid in AUD tables

Added by Andreas Müller over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Priority14
Category:
cdm
Target version:
Start date:
Due date:
% Done:

80%

Estimated time:
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 nullClosedAndreas Müller

Actions
Actions #1

Updated by Andreas Müller over 4 years ago

  • Description updated (diff)
Actions #2

Updated by Andreas Müller over 4 years ago

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

Updated by Andreas Müller over 4 years ago

  • Target version changed from Release 5.12 to CDM UML 5.15
Actions #4

Updated by Andreas Müller over 4 years ago

I updated most production DBs manually already.

Actions #5

Updated by Andreas Müller over 4 years 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
Actions #6

Updated by Andreas Müller over 4 years ago

  • Description updated (diff)
Actions #7

Updated by Andreas Müller over 4 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 80
Actions #8

Updated by Andreas Müller over 4 years ago

  • Target version changed from CDM UML 5.15 to Release 5.12
Actions #9

Updated by Andreas Müller over 4 years ago

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

Updated by Andreas Müller over 4 years ago

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

Also available in: Atom PDF