Issue #33 resolved

Support of schemas is absent for most of operations

dvbogomolov avatardvbogomolov created an issue

No description provided.

Comments (6)

  1. Mike Bayer

    somewhat intentional. I typically run migrations for a remote schema in terms of that schema, i.e. set the "search_path" as needed. That would be your workaround for now.

    Anyway, can you list out areas where "schema" specification is needed along with links to correct format ? I gather we're just talking about Postgresql here as well.

  2. Anonymous

    For example, in _produce_net_changes (in autogenerate) there is this line:

    metadata_table_names = OrderedSet([ for table in metadata.sorted_tables])

    the items from this operation are then compared (in _compare_tables) via these lines:

    for tname in metadata_table_names.difference(conn_table_names):
            diffs.append(("add_table", metadata.tables[tname]))

    metadata.tables is keyed using "<schema>.<name>" if schema exists, so the lookup for metadata.tables[tname] will fail on any result with a schema specified.

    The problems run deeper than that though, as I patched that function to fix the lookup issue, and the autogenerated revision omits all schema info, so all tables are created in the default schema for the connection.

  3. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.