Hi Thon,

The test option runs the upgrade and downgrade of the latest migration script. I'm assuming that you had already run the latest migrations available and the server was up and running OK (other than the dataset size issue) before trying the test command.

On a COPY of your database, you can try this:

$ sh manage_db.sh version
XYZ
$ sh manage_db.sh downgrade [XYZ -1]
......
done
sh manage_db.sh upgrade XYZ
....
done

If it works, then you can try it on your real database. Of course, this will destroy whatever data existed in the table/columns of the latest migration (but it looks like you already lost them.)


Thanks for using Galaxy,

Dan


On Feb 8, 2013, at 2:32 PM, Thon de Boer wrote:

Hi,
 
I had a small issue with the total usage of my galaxy system showing some negative random number so I figured my database was a little “off”.
 
I snooped around for some database management tools and found “manage_db.sh” which had an option innocently called “test”.
 
I ran it, without reading the little fine print that states: “Performs the upgrade and downgrade option on the given database. This is not a real test and may leave the database in a bad state. You should therefore better run the test on a copy of your database.”
 
Well…It surely did leave my database in a bad state since now I get this when I try to access the toolshed installed tools:
 

Error Traceback:

View as:   Interactive  |  Text  |  XML (full)
 ProgrammingError: (ProgrammingError) relation "repository_repository_dependency_association" does not exist LINE 2: FROM repository_repository_dependency_association ^ 'SELECT repository_repository_dependency_association.id AS repository_repository_dependency_association_id, repository_repository_dependency_association.create_time AS repository_repository_dependency_association_create_time, repository_repository_dependency_association.update_time AS repository_repository_dependency_association_update_time, repository_repository_dependency_association.tool_shed_repository_id AS repository_repository_dependency_association_tool_shed_re_1, repository_repository_dependency_association.repository_dependency_id AS repository_repository_dependency_association_repository_d_2 \nFROM repository_repository_dependency_association \nWHERE %(param_1)s = repository_repository_dependency_association.tool_shed_repository_id' {'param_1': 5}
 
Is there ANY way I can rescue this fiasco? Suffice it to say I did not do it on a copy and did not do a backup (yes, I learned my lesson), but maybe some SQL skullduggery can help me?
 
Thanks

Thon
___________________________________________________________
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:

 http://lists.bx.psu.edu/