-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#88 breaks old databases? #139
Comments
I can reproduce this -- it's a big deal, and I should have spotted it. With a heavy heart... we probably have to revert the merge until we can find and test a backwards-compatibility fix. It may be that we have to go as far as using a versioning tool like alembic. Any thoughts @mtremmel before I revert the merge? |
can we not use sqlite3 to add a new column to the halo table to create finder_offset and initialize it to the existing finder_id values? |
I had some things in there that I thought would help with backwards compatibility, but maybe in the end the changes were too pervasive |
Not all users might be comfortable with that... but, worse, isn't the correct value for |
I agree it isn't the perfect solution, but if the current database works with the current values of finder_id it should work with finder_offset = finder_id, since the "old" finder_id is essentially just finder_offset now |
OK, that sounds alright then, but I think it somehow has to be automated for users who aren't comfortable editing their databases manually |
is there a way to do this at the time tangos tries to access the halo table for the first time? |
It's not something that sqlalchemy does naturally (I thought it did, but that's only for entire new tables). But presumably it's possible in principle. I think the 'correct' solution is to use a tool like alembic but maybe that's overkill here. |
I don't know anything about alembic, but you are probably right moving forward we have the potential for many more users that can be affected by deep changes like this. |
Looking at @Martin-Rey's traceback I'm also a bit confused... it doesn't seem like the query should even try to read in that column? maybe this is a basic misunderstanding of how sqlalchemy is working in this instance |
so I checked and this seems to work as a fix (after running this i can access the database correctly and the finder_offsets are appropriately set to the value of finder_id).
|
OK, I think I can hack this into an automated fix. (I can't quite wrap my head around alembic on a short timescale, although I'm sure that's a better way in the longer term.) |
I put a fix in #140 - could you both check whether this works? |
just to be clear, we should try to use this branch to read in an "old" database? |
yep! |
Ok looks like it works! I love how fast this works even on the large Romulus databases! |
SQLite is pretty amazing |
My old databases are fixed to, and I got the "updating from old schema" warning. Many thanks! |
Hi @mtremmel and @apontzen,
After updating my master branch to test #138, I am unable to access my older databases that were generated before. I get an error saying the database cannot find the column
halos.finder_offset
which I think were introduced by #88. Is this behaviour expected? I would rather avoid regenerating the databases if I can avoid it, would there be a workaround otherwise?Here are tracebacks for the web server
and through the python interface
The text was updated successfully, but these errors were encountered: