Skip to content

Schema search path should not be included in schema.rb when a migration is executed. #325

@rapito

Description

@rapito

When executing a migration the schema search path should not be included on the schema.rb since this is Environment dependant and will break on a different configuration:

Example of schema.rb generated because of scenic:

  create_view "my_schema_search_path.foo", materialized: true, sql_definition: <<-SQL
      SELECT * from foo;
  SQL
  add_index "my_schema_search_path.foo", ["bar"], name: "index_on_foo_bar"

Expected schema.rb appendix is:

  create_view "foo", materialized: true, sql_definition: <<-SQL
      SELECT * from foo;
  SQL
  add_index "foo", ["bar"], name: "index_on_foo_bar"

To be more specific, this breaks the following rake task for any env it runs with a different configuration than the one used to generate the schema.rb file.

rake db:schema:load

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions