This project is read-only.

Upgrade installer fails with new release (4.1.0.203)

Aug 30, 2011 at 10:54 PM

I just thought I would mention an issue that I had Yesterday.

I downloaded the updated release.

I regenerated the db installer and the NHDAL, and then attempted to run the db installer.

The installer failed on a single default for a table.

That table was originally IMPORTED into the model.  The default was added before the table became a part of the model.  SQL SERVER named the default in Pascal Case.

The newly generated schema creation script did an if exists based on the name in UPPERCASE.  Therefore, didn't find it and could not create it because one existed for the column already.

Solution I came up with:

  1. step through the installer code until I found the name of the offending default constraint.
  2. remove the default from the database (was a bit field), by 'designing' the table in SQL management studio
  3. run the installer, which put the default back for me.

I just thought I would let people know what I did to work around this issue incase it happens to them.

Steve

Sep 8, 2011 at 1:28 AM

Yes the nHydrate platform is designed to manage the tables, fields, constraints, indexes, defaults, etc of a database. If you add stuff it does not know about there could be conflicts. All defaults are given a strong name so if you remove it from the model, the generated SQL knows what to remove. If you already have a default on a field you will need to add the code manually in the installer script to remove it by old name so the new one can be created.

Sep 8, 2011 at 3:40 PM

Chris,

The only reason I mention it was because the default was added before the database was imported into the model for the first time.  It was my belief that the model new the default was there.

Either way, once I found the name of the offending default it was easily removed.

Steve