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

Dump Views turn into tables #246

Closed
JohnWE opened this issue May 19, 2021 · 2 comments · Fixed by #247
Closed

Dump Views turn into tables #246

JohnWE opened this issue May 19, 2021 · 2 comments · Fixed by #247
Milestone

Comments

@JohnWE
Copy link

JohnWE commented May 19, 2021

When using the dump command, Views in the MySQL database turn into tables in the dump file. I'm not sure what is a good fix for this.

I personally modified the dump file to create views through straight SQL, and I don't expect that this library needs to create views.

Maybe a note of this somewhere would be nice? My ideal behavior would be that the dump command would skip the views and leave a warning for every view not converted so that the end user could handle however they like.

Last issue, I promise :)

@lulco
Copy link
Owner

lulco commented May 19, 2021

Hi :) no worry, if you find issue I can fix quickly it's my pleasure. I am happy somebody uses Phoenix and if it helps.

I don't use views personally, so I need to study something about them. How it works in mysql and also in pgsql. Then I can design something and implement it. I would be happy if it could be some structural way like creating tables is, not just plain queries because they are different in mysql vs pgsql. Dump command was created as a tool for dumping existing structure but also as a tool for migrating from one db engine to another.

So for now we can just add some note to dump command docs. Would you prepare PR?

@lulco
Copy link
Owner

lulco commented May 19, 2021

I've created PR with skipping VIEWs and SYSTEM VIEWs in dump command. Unfortunately I can't provide notice for them in dump file, because I don't load them anymore. But I've created separated issue for views #248

@lulco lulco added this to the 1.8.0 milestone May 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants