Giter VIP home page Giter VIP logo

Comments (6)

dhui avatar dhui commented on May 21, 2024

Have you tried specifying the search_path?

Docs:

from migrate.

gadumitrachioaiei avatar gadumitrachioaiei commented on May 21, 2024

I don't understand how this would solve the problem. The migration scripts work with several schemas inside the same database. The library code assumes that after a migration script run, the initial current schema remains the same as before the script was run. To work for me, I just set the search path to be public schema again. But I don't think the code should make such an assumption in the first place.

from migrate.

dhui avatar dhui commented on May 21, 2024

I don't understand the issue you're having. You should be able to work with multiple schemas in your migration files w/o any issue. Are your migrations setting the search_path? The search_path should be specified as an option to migrate.

from migrate.

gadumitrachioaiei avatar gadumitrachioaiei commented on May 21, 2024

Yes, they are. One script can do that multiple times, switching between schemas.
If I understand correctly, using search_path as part of dsn, this would mean that all operations would consider that to be the current schema, including everything the migrate library does ?

from migrate.

dhui avatar dhui commented on May 21, 2024

If you're setting the search_path in your migration files, you'll need to "revert"/reset it. migrate cannot track DB state changes made in migrations.

Instead of setting the search_path in your migration files, you could also specify the schema explicitly.

Setting the search_path in the DSN will affect migrate and the migrations it runs. Keep in mind that multiple schemas can be specified in the search_path.

from migrate.

gadumitrachioaiei avatar gadumitrachioaiei commented on May 21, 2024

Thanks. I did revert the schema back to public ( initial schema ) in migration script. I just thought that I make an issue in case this is not intended behavior.

from migrate.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.