-
Notifications
You must be signed in to change notification settings - Fork 300
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
Cannot specify specific views to dump #185
Comments
I'm not sure if this will fail if you request a view without its parent table. Did you test it? |
IMHO if the user mistakenly provides a non-existing view, program should fail. So I will do some tests and merge this ASAP. |
I was also trying to export just one view "my_view" but didn't succeed. There are no tables in the output (as expected) but also not my view.
|
I think it's not possible to dump a view without its table, there would be
no data neither structure.
El dom., 16 ago. 2020 16:56, smalos <[email protected]> escribió:
… I was also trying to export just one view "my_view" but didn't succeed.
There are no tables in the output (as expected) but also not my view.
$dumpSettings['include-views'][] = 'my_view';
$dumpSettings['exclude-tables'][] = '/.*?/'; // exlude all tables
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#185 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAHMH2B4OIHW4FECQH2FIX3SA7XRXANCNFSM4KD5KMSA>
.
|
Let's take the case when the underlying table(s) of the view already exist in the destination database. |
Where does the code prevent that (only) views can be exported? How to remove the limitation? |
Related to this.... is possible to exclude all the views? |
Problem
The only way I can dump a view is if I DO NOT pass in an
include-tables
setting.This dumps all tables and all views. But if I want to have only a set of tables and a set of views dumped, certain problems arise (as outlined below).
When you don't pass in
include-tables
...When you don't pass in
include-tables
, it causesinclude-views
to be set to an empty array:And when
include-views
is empty, thegetDatabaseStructureViews
method will default to getting all views:If you only want certain tables...
If I only want a certain set of tables and I pass it in as
include-tables
, theinclude-views
is set to default to that same listAs they're not actually tables, but views,
$this->views
remains empty after thegetDatabaseStructureViews
method is ran, and no views are backed up.... you can pass in
include-tables
but notinclude-views
I can't actually pass in
include-views
because it's not listed in the$dumpSettingsDefault
and results in this error:... but even if that is fixed,
include-views
will be overwritten by this declaration:I've spent a lot of time troubleshooting. Hopefully I didn't miss anything and the above makes sense too.
Thanks!
- Brad
The text was updated successfully, but these errors were encountered: