TFS build Error - DB sync step

Hi,

My build ended in Time out error during “Synchronize” step.

On doing manual sync in the environment, i found sync error in one of the table.

Reason for this error - A field in the table was changed from string to INT64. When the table was initially created, the table was checked-in with this field as string type. Later to address “foreign key constraint” BP, it was changed to INT64 and checked in.( New field and old field have the same name)

The sync issue doesnt occur in development environment. Everytime when the build is trigerred, old field type is referred by the model and this results in sync error.

I checked in DB and it still shows the old field type .

Any idea how to handle this issue

Changing field type isn’t a good idea, because you necessarily have to run into this problem.

Drop the field from database and run database synchronization again.

I tried this step as well. Since this is build process, the db is dropped everytime when a new build is queued.

I cross checked in TFS too and it has latest change(which refers int64 type).

Issue here is new field also has the same name of old field when it is created.

I am thinking to rename the field in this table and trigger a new build.

Not sure why the build is not taking the latest change in the table.

Any idea how to handle this issue.

You’ll have to explain me your build process, because I don’t know what you’re doing there.

I always start with a complete clean environment, therefore I can’t get into troubles with any old code.

Briefed the steps for build process:

  1. I have 2 clean DBs - Base DB (Data DB and Model DB) and Staging DB (replica of base DB). Saved these bak files in a path
  2. Base DB is dropped and restored with the base DB from the above path
  3. Combined XPO is generated
  4. AxModel is created and is exported to Binaries folder
  5. Restore staging DB
    6.Import Ax model
    7.Compile
  6. Start AOS
    9.Generate Inc IL
  7. Sync
  8. Generate model store

If the databases are clean, without any customizations, importing the combined .xpo simply add a brand new Int64 field. You can’t get into any issue with the old string field, because it never existed in this AX instance.

Also, restoring Staging DB wouldn’t make sense, if it was the same as the Base DB.

I assume that at least the staging DB isn’t clean; it contains the old string field. And that’s the problem. You’ll have to drop the field from there.