10.2.100 Upgrade Data Model Error

It’s a separate sandbox VM.
We move over a copy of the 10.1.500 from live and then practice the upgrade.

@Bart_Elia, just as a data point for your team, I tried doing a step upgrade: from 10.1.500.16 to 10.1.600.0 and then from 10.1.600 to 10.2.100.0. The upgrade from 10.1.500 to 10.1.600 works just fine through the whole process. The upgrade from 10.1.600 to 10.2.100 generates the same error during the data model regen, however.

Also, 10.2.200 fails with the same issue.

I went from 10.1.500.31 to 10.2.100.12 without a problem. FYI.

We also encountered this same “schema” error trying to upgrade from 10.1.400 to 10.2.100 (and 10.2.200). Any assistance would be greatly appreciated.

I don’t have anything to offer you just yet. I’m still waiting for the dev team to find a solution.
It’s attached to this problem case if you want to follow it: PRB0192191

I’ve identified the issue and a fix is in process. In the meantime I can offer a workaround.
The issue occurs when this specific set of conditions is met:

  1. Customer has created a view.
  2. The view contains a date/datetime column
  3. The view is in an Epicor schema name (for example Erp).

To find any such views, you can use this query:

select t.TABLE_SCHEMA, t.TABLE_NAME
from information_schema.Tables t
where t.TABLE_TYPE = ‘VIEW’
and t.TABLE_SCHEMA <> ‘dbo’
and exists(SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS c WHERE c.TABLE_SCHEMA = t.TABLE_SCHEMA and c.TABLE_NAME = t.TABLE_NAME and c.DATA_TYPE like ‘%date%’)

Until this is fixed, you can exclude those views from the DM generation by changing this file:
C:\Program Files (x86)\Common Files\Epicor Software\Database Manager Extensions\3.2.200\DataModelGenerator\Ice.Tool.DataModelGenerator.UI.exe.config

Append the affected views to the ignore list. For example:

Ice.SysSequence,Ice.DBMigrationLog,Erp.MyViewWithADateColumn

5 Likes

Ok, circling around on this one…First, my apologies on the delay.

It looks like a view was probably added to the Epicor database. We can work around this if you need the view by the above mentioned work around.

The data model generator will pick up everything in the db unless you tell it not to include tables and views in the datamodel. If you do want them included into the data model, you have to adhere to some design guidelines we provide in the SDK - that’s the validation errors that were shown. We run into this from time to time when a partner wants to add their content alongside of the ERP content for example.

The details on which table or view has issues should be in the logs behind the generator but I think we can do better displaying all that to folks so I’ll see what we can visualize to make the error more obvious.

Let us (and @aidacra) know if you need further assistance.

3 Likes

@Epic_Santiago, @aidacra, @Bart_Elia You guys rock! I will try this out ASAP. Thanks for all your hard work tracking it down.

So–I ran the SQL query and it did not come back with any results.
I found 2 Erp.* views and I excluded both of them, but I still received the same error.
We have a number of dbo.* views–do those need to be excluded as well?

No, the dbo schema is not included in the DM regen. Can you post your log file or at least the section after the “Error Generating the Data Models:” string?

Here’s the log:

DataModelLog.txt (23.2 KB)

For science, in your test database can you delete the views in question in the Erp schema you can script them to clipboard/query window in SSMS so you can add them back afterwards), then rerun the regen data model?. Does that work? If so, add the views back.

NOTE: if this works, it’s likely an issue with C:\Program Files (x86)\Common Files\Epicor Software\Database Manager Extensions\3.2.200\DataModelGenerator\Ice.Tool.DataModelGenerator.UI.exe.config and how the views were added to the .config file. Case matters for the schema and object name :confused:

2 Likes

It worked!

Case matters for the schema and object name

I typed it in exactly as it was shown in SSMS.

Did you have a space between the comma and the next object? This list cannot have spaces after the comma separator

THOMASDOLBY8-425x320

1 Like

No sir.

The issue is that ExcludeTables will exclude… tables. It does not work for excluding views. That’s why the workaround I suggested didn’t help.
So Nathan’s workaround is the way to go or wait for an upcoming update that will include this fix.

May I throw out the possibility of being able to add views from within the Entity Framework?

:wink:

u can use the external BAQ’s to get “VIEWS” into Epicor @Mark_Wonsil

SaaS user wonders what is this trickery External BAQs?

:wink:

Ugh SaaS … Ugh :face_vomiting::face_vomiting: