Skip to content
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

Create tables with an explicit INTEGER PRIMARY KEY. #87

Merged
merged 20 commits into from
Mar 14, 2019

Conversation

mithrandi
Copy link
Contributor

Closes #35.

@codecov
Copy link

codecov bot commented Jul 17, 2018

Codecov Report

Merging #87 into master will decrease coverage by 0.11%.
The diff coverage is 80.48%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #87      +/-   ##
==========================================
- Coverage   92.48%   92.36%   -0.12%     
==========================================
  Files         106      108       +2     
  Lines       10413    10511      +98     
  Branches      838      847       +9     
==========================================
+ Hits         9630     9709      +79     
- Misses        623      640      +17     
- Partials      160      162       +2
Impacted Files Coverage Δ
axiom/test/test_upgrading.py 99.58% <ø> (ø) ⬆️
axiom/test/historic/stub_storeID.py 0% <0%> (ø)
axiom/_schema.py 100% <100%> (ø) ⬆️
axiom/item.py 94.66% <100%> (+0.01%) ⬆️
axiom/test/test_item.py 96.31% <100%> (ø) ⬆️
axiom/test/test_xatop.py 97.13% <100%> (+0.05%) ⬆️
axiom/test/historic/test_storeID.py 100% <100%> (ø)
axiom/store.py 92.08% <88.23%> (-0.01%) ⬇️
axiom/upgrade.py 96.8% <91.66%> (-1.22%) ⬇️
axiom/_fincache.py 65% <0%> (-1.67%) ⬇️
... and 4 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e169a79...9fdd470. Read the comment docs.

axiom/store.py Outdated
@return: a typeID for the table; a new one if no table exists, or the
existing one if the table was created by another Store object
referencing this database.
Just create the table for an Item subclass.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super nit-picky, I know, but most of the docstrings in Axiom are pretty good, so I'd like to see the usual epydoc (or sphinx or whatever is good these days) markup in here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch; it's a private method, but given that we're calling it from another "friend" module, it definitely deserves better documentation.

@mithrandi
Copy link
Contributor Author

I pushed some documentation-type improvements.

@mithrandi
Copy link
Contributor Author

I'm doing some testing using large existing stores that I have lying around and I've picked up some corruption issues after VACUUMing. I'm still investigating, but we definitely shouldn't merge this yet.

@mithrandi
Copy link
Contributor Author

False alarm on the corruption, turned out to be an unrelated issue. However I would definitely still like to do more testing before landing this.

@ldanielburr
Copy link
Contributor

I have one active mantissa project still running; I will try to find some time today to test it out against this PR.

@ldanielburr
Copy link
Contributor

I finally got around to running this against an active mantissa project of mine; no issues to report.

@mithrandi
Copy link
Contributor Author

After manually fixing up some schema issues (types defined in the database but not the code), I was able to do this upgrade successfully in one of my test environments and the data seems intact.

Copy link
Member

@glyph glyph left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is kind of amazing to see.

It looks correct to me, and I think the proof is in the pudding with respect to your vacuum testing.

Please land.

axiom/upgrade.py Show resolved Hide resolved
@mithrandi mithrandi merged commit 7de70bc into master Mar 14, 2019
@mithrandi mithrandi deleted the 35-explicit-rowid branch March 14, 2019 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants