This PR takes the table definitions, which were primarily in CreateDB.py and copied where needed elsewhere, and moves them into a separate module that can be used elsewhere.
For now this does not convert CreateDBsabrs as the database format still different, but it provides the possibility for converging them later.
This PR doesn't reformat/rewrap the definitions, so that the correspondence with the original CreateDB is clearer for now (rewrap can happen in the future.) The one change is that the ix_file_big index definition is moved into the table definition itself rather than glued on after the table is created.
One note (that's in the comments, but worth calling out): the table definition module creates new Column objects every time it's called; reusing objects doesn't work if they're used in separate database, as happens in the unit tests.
This is the first time we have a docstring cross-linking to sqlalchemy, so this also adds the appropriate intersphinx entries to make that work.
PR Checklist
[X] Pull request has descriptive title
[X] Pull request gives overview of changes
[X] New code has inline comments where necessary
[X] Any new modules, functions or classes have docstrings consistent with dbprocessing style
[X] (N/A) Major new functionality has appropriate Sphinx documentation
[X] (N/A) Added an entry to release notes if fixing a major bug or providing a major new feature
[X] New features and bug fixes should have unit tests
[X] (N/A) Relevant issues are linked in the description (use Closes # if this PR closes the issue, or some other reference, such as See # if it is related in some other way)
This PR takes the table definitions, which were primarily in CreateDB.py and copied where needed elsewhere, and moves them into a separate module that can be used elsewhere.
For now this does not convert CreateDBsabrs as the database format still different, but it provides the possibility for converging them later.
This PR doesn't reformat/rewrap the definitions, so that the correspondence with the original CreateDB is clearer for now (rewrap can happen in the future.) The one change is that the
ix_file_big
index definition is moved into the table definition itself rather than glued on after the table is created.One note (that's in the comments, but worth calling out): the table definition module creates new Column objects every time it's called; reusing objects doesn't work if they're used in separate database, as happens in the unit tests.
This is the first time we have a docstring cross-linking to sqlalchemy, so this also adds the appropriate intersphinx entries to make that work.
PR Checklist
Closes #
if this PR closes the issue, or some other reference, such asSee #
if it is related in some other way)