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

add the -o omit_view_definitions=1 option to remove the view definitions from server side views #14

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

fobispo-link
Copy link

No description provided.

@adherzog
Copy link

adherzog commented Mar 2, 2018

+1 for this.

MySQL includes the database name in the view definition, making the view undeployable to a database with a different name (which I do when running tests, for example.)

Right now, I simply redefine the view later in the file, after the md5sum, and that works fine. But I'd like to be able to omit the dumped definition for clarity.

@@ -2626,8 +2631,8 @@ sub _setup_src_meta {
$self->_dbic_stmt($table_class, 'table', $table->dbic_name);

# Must come after ->table
if ($is_view and my $view_def = $self->_view_definition($table)) {
$self->_dbic_stmt($table_class, 'result_source_instance->view_definition', $view_def);
if ( $is_view and my $view_def = $self->_view_definition( $table ) and not $self->omit_view_definitions ){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no point in getting the view definition if we're not going to emit it, so please move the check before the ->_view_definition call. Also, please refrain from unrelated whitespace changes.

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

Successfully merging this pull request may close these issues.

None yet

3 participants