ox-it / ords

Automatically exported from code.google.com/p/ords
0 stars 0 forks source link

Problem with creating database structure in live project #788

Closed MerielP closed 8 years ago

MerielP commented 8 years ago

A researcher who is using the live version of ORDS has encountered some serious problems with one of her databases.

This began some weeks ago when a glitch resulted in the loss of a database schema (possibly connected to a loss of internet connection). An attempt to recreate the database schema is now resulting in this error message:

database schema designer error message

(The error message is surprising, as it includes the word 'staging' - but this is a database on App.)

As this is a live project, I've sent the rest of the details privately via email, rather than posting them here.

thestoat commented 8 years ago

Let's use 789 for the stalled issue and use this issue for the "does not exist" problem.

When the schema designer is used, a cope of the main database is created, called _staging. When all changes have been made in the schema designer, they are written to the _staging, then the original db is deleted and _staging is renamed to the original db.

The problem appears to be down to the fact that the creation of the staging db failed for some reason. Then, the code deleted the original db but couldn't perform the rename. I have added code so that the code will now check for the existence of the staging db before it deletes the original.

Why the creation of the staging db failed is unknown. There is nothing about this in the logs, but that might be because the error was within the designer itself, or maybe the way the user interacted with the designer. I would need to know precisely what the user done and saw to be able to diagnose further, but the defensive code I added should help in future.

MerielP commented 8 years ago

Thanks, Dave. Closing this issue for now - will reopen if the user notifies us of any further problems.