Skip to content

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.

3 participants