How can we help you today? How can we help you today?

Table primary keys are dropped

When I ignore Indexes, the primary keys are dropped after syncing the table schema.

I have a table with 5 primary keys. It is initially there before the sync, but they are gone after syncing.

Please let me know if this is a bug and if theres a workaround for now.

Thanks
mtran
0

Comments

8 comments

  • mtran
    We are actually using the SDK, not the UI version. But when we compare using the UI, it does not show any differences even tho the primary keys are not there.
    mtran
    0
  • Brian Donahue
    Hello Meng,

    I'm sure that the problem lies with not setting your options in all of the right places. There are two places where you can specify the options used in the comparison, one on the Register method, and the second on the BuildFromDifferences method. If you omit the second set of options, or use the default, the keys will be compared and synchronized. Please see our code samples for an example.
    Brian Donahue
    0
  • mtran
    Thanks, I will take a look at the code again.

    How come when I use the UI, it does not show any differences in the table structure but the primary keys are not set in the destination database?
    mtran
    0
  • Brian Donahue
    Your are ignoring keys and indexes in the options?
    Brian Donahue
    0
  • mtran
    There is an ignore Indexes option.

    I do not see one for keys. There is Foreign keys but no primary keys.
    mtran
    0
  • Brian Donahue
    You can only ignore indexes. The API options don't distinguish Primary Keys from other kinds of indexes.
    Brian Donahue
    0
  • mtran
    So you mean I will have to sync the indexes if I also want the primary keys to move?

    This has never happened before though. Previous versions did not remove primary keys.

    I believe there is a max of 200 indexes that can by synced. We have run into this previously where it will error if there are more than 200 indexes. I think that was the reason why we ignored indexes during syncing.
    mtran
    0
  • Brian Donahue
    The behavior in the API has not changed. We may have to pick this case up and work it via email because it's starting to look like we may have to investigate/debug the API.
    Brian Donahue
    0

Add comment

Please sign in to leave a comment.