Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: implement database subseting for MySQL #69

Open
evoxmusic opened this issue Apr 29, 2022 · 1 comment
Open

Feature: implement database subseting for MySQL #69

evoxmusic opened this issue Apr 29, 2022 · 1 comment
Labels
feature New feature request

Comments

@evoxmusic
Copy link
Contributor

Implement database subsetting for MySQL as we did for PostgreSQL.

@evoxmusic evoxmusic added the feature New feature request label Apr 29, 2022
@fabriceclementz
Copy link
Contributor

Hi @benny-n

I looked at the dump_header and dump_footer functions and they can't work with MySQL as the dump format is not the same as for PostgreSQL.

In Postgres, we have all the CREATE TABLE statement first, then INSERT INTO and ALTER TABLE.

For MySQL, we have:

  • CREATE TABLE (which contains the constraints to extract from which we can extract foreign keys)
  • INSERT INTO corresponding to the precedent table and so on

Maybe one possible solution that might work could be to extract only the database structure first via mysqldump --no-data ... and then make the full dump and add the INSERT INTO statement at the end of the previously created dump?

There may be a better solution but I have no other idea at the moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature request
Projects
None yet
Development

No branches or pull requests

2 participants