-1

I took an open source product (applicant tracking system) and forked the code, and had some extra features added, which amounted to some extra tables in the MySQL database.

Now, I would like to load my data back into the mainstream product. How would I do that?

Compare the databases somehow, and delete the extra tables then run some command to restore? Does anyone have a high level suggestion on how to do this?

0

I took an open source product ... and forked the code, and ... added ... some extra tables in the MySQL database ... I would like to load my data back into the mainstream product. How would I do that?

If I understand you correctly, you took a project and modified the database locally as you worked with it. Now you want to take your changes and apply them to what's, presumably, a running instance in production that doesn't have the changes yet.

Very briefly, since there's not that much info, you'll need to do the following:

  • schedule some downtime for the current production instance;
  • make the changes to the production database (i.e. run the SQL queries);
  • apply the code changes that make use of the updated database;
  • add/move any table data as necessary, if needed/applicable;
  • verify that things are working correctly;

If what you're trying to do is get your changes into the upstream project itself (i.e. have your code merged into their codebase, etc), then you'll have to consult with the contribution guidelines for that particular project.

  • Both instances are off line. I was asking if there is an automated way to compare two MySQL database schema, and pare down one, to comply with the other... as I try to retrofit my forked application's database to the mainstream. – zoomiest Nov 29 '18 at 12:30
  • @zoomiest Then your original question wasn't clear. I'm not aware of a way to compare the actual databases (i.e. the binary files, etc). However, if you have the files with the SQL statements defining both schemas and you have them under version control, then you could use git diff to see the differences. – code_dredd Nov 29 '18 at 16:15

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.