Giter VIP home page Giter VIP logo

Comments (1)

stanislas-m avatar stanislas-m commented on August 22, 2024

That might be a very bad idea.
I'm no MySQL engineer, so I can't say for sure this is a reasonable thing to do. I assume it is, because my read of SetupTest() is that it's dropping all data from the database, so there should be no data left to be orphaned, but... I don't know very MySQL well, so I don't know what corner cases (or not-so-corner cases) that setting might impact.

Right now, I can't find a better option, even after using MySQL for years.

I'm not sure if it would be correct to modify TruncateAll() in that way.
Again I assume it would be, but I'm not familiar enough with the consumers of Pop to know if that would lead to surprising behavior. If foreign key constraints are set, truncations should fail. Would changing this function cause logic that should fail, to not fail? Would there be a clean way to add an argument or contextual setting to TruncateAll() that would let us control that behavior? Are there any uses of TruncateAll outside of SetupTest() for such a change to affect, anyway?

To answer that question, we have to check the other DB behavior for pop supported dialects. If the other allow to truncate all the tables, even with foreign keys, we should do it.

from pop.

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.