ModelSEED / Model-SEED-core

The Model SEED is a tool for building, curating, and analyzing gonome-scale metabolic models. Visit the Model SEED homepage for installation instructions and full feature documentation.
http://bionet.mcs.anl.gov/index.php/Model_SEED_Homepage
Other
19 stars 10 forks source link

Load SQL-lite database from file #24

Closed jplfaria closed 13 years ago

jplfaria commented 13 years ago

I was following the instructions to install the Model-SEED-core and I got a problem on this step: c.) Load SQL-lite database from file: sqlite3 Model-SEED-core/data/ModelDB/ModelDB.db < Model-SEED-core/data/ModelDB/ModelDB.sqlite;

Running the previous command returns only errors like:

mcswl156:~ jplfaria$ sqlite3 ModelSEED/data/ModelDB/ModelDB.db < ModelSEED/data/ModelDB/ModelDB.sqlite Error: near line 2: table _metainfo already exists Error: near line 3: PRIMARY KEY must be unique Error: near line 7: table _references already exists Error: near line 8: table _objects already exists Error: near line 9: PRIMARY KEY must be unique .... Error: near line 10: PRIMARY KEY must be unique Error: near line 50: PRIMARY KEY must be unique Error: near line 51: table COMPOUND_GROUPING already exists Error: near line 52: table SUBSYSTEM already exists Error: near line 53: table COMMENT already exists Error: near line 54: table COMPOUND_BIOMASS already exists Error: near line 55: table MEDIA_COMPOUND already exists Error: near line 56: table DIAGRAM already exists Error: near line 57: table SUBSYSTEM_ROLE already exists ... etc.

José Error: near line 58: table REACTION_GROUPING already exists

jplfaria commented 13 years ago

I manage to run the command c) by deleting the original ModelDB.db that comes with the original distribution.

So what should we do fix to this "issue"? -Remove the ModelDB.db from the original distribution? -Or...?

devoid commented 13 years ago

If you run the bootstrap.sh command this will download ModelDB.sqlite and load it into ModelDB.db. So c) is already done for you. If you try to import the same SQL dump again you will get SQL errors because the tables already exist and rows exist for each of the primary keys you are trying to import.

So don't import twice.