Giter VIP home page Giter VIP logo

Comments (4)

kenshaw avatar kenshaw commented on May 29, 2024

Oh -- interesting -- yeah, typically schema migration tables do a pretty bad design in general by having only one field as a unique key, which is the cause of the problem here, as the current templates assume the primary key is being managed by the database.

Don't get me started on why this is a horrible design for a table!

The answer here, I think, is to finish the include/exclude options that I have been working off, but have delayed finishing in the interest of getting the databases all to a minimum feature set.

xo is fairly dumb/naive, and these kinds of cases will show that. It's definitely in the interest though that it be smarter about such conditions. I just need to think a bit about how I want to support this out of the box.

from xo.

willie avatar willie commented on May 29, 2024

Include/exclude sounds like a good option. Thanks again for the neat code gen.

from xo.

kenshaw avatar kenshaw commented on May 29, 2024

I created a temporary workaround for this, but will likely revisit the logic added in this commit at a later date.

xo should now work, "as expected" for tables with only one field that is the primary key.

from xo.

willie avatar willie commented on May 29, 2024

Confirmed. Thanks!

from xo.

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.