On 9/22/15 7:38 PM, Sergi Pons Freixes wrote:
2015-09-22 16:24 GMT-07:00 Mike Bayer <mike...@zzzcomputing.com <mailto:mike...@zzzcomputing.com>>:

    Revision runs fine, but now when I run the upgrade it does not
    find the alembic_version table (attached logs)... I suspect that
    the search_path is restored so that it takes notifications again
    by default?

    yes


    Would this issue be solved just by $user!=$schema, or is there
    something else behind (as you were saying, not even $user should
    be on the search path)?

    yes that would also solve it.


    the issue is that PG doesn't give us the schema name of a foreign
    key when that schema is in the search path. that's what the whole
    explanation at
    
http://docs.sqlalchemy.org/en/rel_1_0/dialects/postgresql.html#remote-schema-table-introspection-and-postgresql-search-path
    is about.


Setting the database search_path to 'public' permanently using pgAdmin solved the problem:

ALTER DATABASE notifications
  SET search_path = public;

Now it remains always as 'public', and everything seems to run fine. I'll now apply that to the other databases that were also having this issue. I guess this issue can be declared close, thank you very much for all your help!

well what I learned here is:

1. that $user thing in public_schema is important !  :)

2. how to better diagnose this for users b.c. you're not the first to stumble on this.

ideally I should add a documentation note re: postgresql on this.



Regards,
Sergi
--
You received this message because you are subscribed to the Google Groups "sqlalchemy-alembic" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy-alembic+unsubscr...@googlegroups.com <mailto:sqlalchemy-alembic+unsubscr...@googlegroups.com>.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups 
"sqlalchemy-alembic" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy-alembic+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to