Coder Social home page Coder Social logo

Comments (8)

manuelma avatar manuelma commented on June 25, 2024 1

My hope is @PiispaH already fixed this with spine-tools/Spine-Database-API@7fa4b1e

It is somewhat clear to me how things would get messy the way you @jkiviluo describe, prior to the changes introduced by @PiispaH in the above commit.

Should we try and save the corrupted DBs? there might be a way...

from spine-toolbox.

jkiviluo avatar jkiviluo commented on June 25, 2024 1

No need on my part - I've already remade the DB. So, unless someone requests that, let's not waste time trying to do that. Presumably there are so many ways things can go wrong that it can be futile.

from spine-toolbox.

jkiviluo avatar jkiviluo commented on June 25, 2024

With data included, I got this error (and commit apparently failed. EDIT: apparently succeeded despite the message):

DBAPIError while inserting entity_class items: ('UNIQUE constraint failed: entity_class_dimension.entity_class_id, entity_class_dimension.dimension_id, entity_class_dimension.position',)

from spine-toolbox.

PiispaH avatar PiispaH commented on June 25, 2024

Might be related to #2293 and #2296

from spine-toolbox.

jkiviluo avatar jkiviluo commented on June 25, 2024

Right. And the data wasn't actually committed. I closed and opened the DB editor, but that's not enough (apparently stuff remains in the memory). Only closing and starting Toolbox revealed that new entity class and it's data were not in the DB.

from spine-toolbox.

manuelma avatar manuelma commented on June 25, 2024

What are steps to reproduce this? I just added and committed an empty multi-D class with no problem?

from spine-toolbox.

jkiviluo avatar jkiviluo commented on June 25, 2024

It works for me too, if I start from an empty DB. But fails on the attached one. Of course, maybe it's due to corrupt DB that wouldn't happen anymore, so not sure if should be debugged (and I would just need to reimplement my DB).

generic_energy_data_specification.sqlite.txt

from spine-toolbox.

jkiviluo avatar jkiviluo commented on June 25, 2024

I tried to look into this, since it's stopping me from progressing. It seems like the referential integrity between entity_class and entity_class_dimension tables is not working. I have rows in entity_class_dimension that have entity_class_ids not found in entity_class (since the database has seen deletion of entity_classes). This causes the error message when trying to insert records that would re-use the entity_class_id numbers.

I don't know where to fix this... Probably somewhere in the database definition, but I leave it to you @manuelma. I'll try to fix my database manually meanwhile.

from spine-toolbox.

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.