Git Product home page Git Product logo

Comments (7)

ephys avatar ephys commented on May 24, 2024

Note for when someone starts working on this task: there are some information about this in #17256

from sequelize.

aamir-alii avatar aamir-alii commented on May 24, 2024

What if we delete all the constraint of particular table before hand as it is already creating that constraint again look into following code.
code

from sequelize.

ephys avatar ephys commented on May 24, 2024

sync cannot delete anything unless force is specified, in which case it deletes everything

from sequelize.

aamir-alii avatar aamir-alii commented on May 24, 2024

sync cannot delete anything unless force is specified, in which case it deletes everything

you don't get my point I want to do something like this

code-example

from sequelize.

aamir-alii avatar aamir-alii commented on May 24, 2024

Other thing that I have noticed that If we remove reference from a field (and it is still in the model mean we don't remove the field but just the references) it reference in database will not be removed as we are only removing constraint from the field which have some references in the code.

from sequelize.

ephys avatar ephys commented on May 24, 2024

To explain what I meant in my previous comment: removing constraints is a destructive operation, and the base sync does not do that. I see that in your initial comment you mentioned using the alter option, which could do this kind of operation

from sequelize.

aamir-alii avatar aamir-alii commented on May 24, 2024

What about if we add name constraint and check if it is not exist with that name and drop if exists
adding name constraint
query-generator

searching for name constraint
model

from sequelize.

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.