Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3943148
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T00:44:52+00:00 2026-05-20T00:44:52+00:00

For reasons of synchronizing between 2 different DBs used by different applications, I need

  • 0

For reasons of synchronizing between 2 different DBs used by different applications,
I need to change the unique primary key IDs fields of some of my models.
This is done in order to conform the relevant rows to the other DB (make sure they use the same ID).

Will changing the IDs of most of the models affect the application somehow?
Will it affect the DB? (performance-wise)
I’m assuming we have no hard-coded places in the code with specific ID numbers,
and that I would update the foreign keys with the new IDs in all the referenced tables.

I’m using MySQL.
Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T00:44:52+00:00Added an answer on May 20, 2026 at 12:44 am

    Basically: No, everything should just work.

    Make sure to take into account foreign keys to keep those in sync with your changes to the parent primary key.

    You probably need to make sure that you reset the autoincrement counters on your mysql tables so they’re higher than the highest of your new IDs. ALTER TABLE tbl AUTO_INCREMENT = 100;

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For reasons that are irrelevant to this question I'll need to run several SQLite
For reasons beyond my control, I need to return const char* from a function,
What are some reasons why I wouldn't want to disable IIS logging completely for
For reasons that are a little hard to explain, I need to do the
For reasons I will spare you, I have two weeks to learn some C++.
For reasons that I will gloss over, I need to set aside space of
For reasons I don't wish to get into, nor can I change, I am
For reasons beyond my control, I need to join two tables and I need
For reasons of self-improvement / broadening my horizons I have decided to learn some
Is there an elegant solution for synchronizing sessions across multiple ASP.NET applications? I'm sure

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.