Git Product home page Git Product logo

Comments (7)

kmpm avatar kmpm commented on July 4, 2024

Sorry,
There was a PRIMARY KEY on the Item table but the UNIQUE constraint still messes up the export.

from trade-dangerous.

kmpm avatar kmpm commented on July 4, 2024

I'm proposing the following for Item table

CREATE TABLE Item
 (
   item_id INTEGER PRIMARY KEY,
   name VARCHAR(40) COLLATE nocase,
   category_id INTEGER NOT NULL,
   ui_order INTEGER NOT NULL DEFAULT 0,
   avg_price INTEGER,
   fdev_id INTEGER,

    UNIQUE(item_id),

   FOREIGN KEY (category_id) REFERENCES Category(category_id)
    ON UPDATE CASCADE
    ON DELETE CASCADE
 );
 CREATE INDEX idx_item_by_fdev_id ON Item (fdev_id);
 CREATE INDEX idx_item_by_item_id_fdev_id ON Item (item_id, fdev_id);

from trade-dangerous.

eyeonus avatar eyeonus commented on July 4, 2024

from trade-dangerous.

eyeonus avatar eyeonus commented on July 4, 2024

from trade-dangerous.

kmpm avatar kmpm commented on July 4, 2024

I noticed this while writing unit tests.
What I am doing to trigger it is trade export --all-tables --path="c:\temp\export\" and it fails with the sqlite3.OperationalError: ambiguous column name: Item.fdev_id message.

The option --all-tables should export prices according to the help texts and it tries to do it using CSV.
In csvexport.py, which is used by the export command, it includes the StationItem table.

One way of fixing this is to exclude StationItem from all csv export but then the export_cmd.py file needs to be changed as well to reflect this. But in that case there would be a need for another way of exporting the prices.

from trade-dangerous.

eyeonus avatar eyeonus commented on July 4, 2024

from trade-dangerous.

eyeonus avatar eyeonus commented on July 4, 2024

from trade-dangerous.

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.