Coder Social home page Coder Social logo

Circular dependency about respawn HOT 9 CLOSED

jbogard avatar jbogard commented on August 11, 2024
Circular dependency

from respawn.

Comments (9)

Poltuu avatar Poltuu commented on August 11, 2024

+1

from respawn.

jbogard avatar jbogard commented on August 11, 2024

You can filter tables and schemas, but that's about it. You can't filter FKs, though I'm not sure how this would work anyway? Wouldn't it still fail trying to delete those tables because there are some rows WITH foreign keys?

from respawn.

nfaugout-lucca avatar nfaugout-lucca commented on August 11, 2024

Thank you for your answer.

I am new to Respawn and I might not understand well how it works. But I thought it would watch SQL requests going through and then replay a sort of "rollback" by deleting rows that where added.

I don't understand why it would delete "tables".

Our unit tests only add some rows, and we just need to delete thoses rows, in a certain order, respectfuly of the FKs (delete the children rows in the children table, then the parent row).

Thanks again

from respawn.

jbogard avatar jbogard commented on August 11, 2024

It deletes all tables, in the right order. That replay sounds interesting,
though.

On Thursday, September 24, 2015, nfaugout [email protected] wrote:

Thank you for your answer.

I am new to Respawn and I might not understand well how it works. But I
thought it would watch SQL requests going through and then replay a sort of
"rollback" by deleting rows that where added.

I don't understand why it would delete "tables".

Our unit tests only add some rows, and we just need to delete thoses rows,
in a certain order, respectfuly of the FKs (delete the children rows in the
children table, then the parent row).

Thanks again


Reply to this email directly or view it on GitHub
#12 (comment).

from respawn.

nfaugout-lucca avatar nfaugout-lucca commented on August 11, 2024

OK thanks for clarifying. I understand now why Respawn is not compatible with our tables refering to each others.

from respawn.

jjm340 avatar jjm340 commented on August 11, 2024

So I'm getting this same error; however, it only happens in our AWS environment, not when I run locally - any chance existing data would cause this error where as a clean DB would not?

from respawn.

jbogard avatar jbogard commented on August 11, 2024

Dunno, are the constraints different?

from respawn.

jjm340 avatar jjm340 commented on August 11, 2024

I ran
select so_pk.name, so_fk.name from sysforeignkeys sfk inner join sys.objects so_pk on sfk.rkeyid = so_pk.object_id inner join sys.schemas pk_schema on so_pk.schema_id = pk_schema.schema_id inner join sys.objects so_fk on sfk.fkeyid = so_fk.object_id inner join sys.schemas fk_schema on so_fk.schema_id = fk_schema.schema_id
On both DBs to compare and they were identical. Is there a better way to tell?

from respawn.

jjm340 avatar jjm340 commented on August 11, 2024

You can close this issue, I opened one that highlights the actual problem that I was encountering

from respawn.

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.