-
Notifications
You must be signed in to change notification settings - Fork 48
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
proper migrate to hypertable #14
Conversation
- extending `postgres.schema.DatabaseSchemaEditor` instead of `postgis.schema.PostGISSchemaEditor` - rename `drop_primary_key` -> `_drop_primary_key` and `create_hypertable` -> `_create_hypertable` - `_create_hypertable`: explictly calling `_drop_primary_key`, also added `should_migrate` arg - `_assert_is_hypertable` and `_assert_is_not_hypertable` methods added and integrated with `_create_hypertable` - `_set_chunk_time_interval` method added - override `add_field` and `alter_field` methods
Once approved will do same chages to "postgis" backend |
@schlunsen @bencleary Request you to review this. |
I have tested with |
@schlunsen the "migrate with fresh table" option discussed at #13 is not implemented but have kept a placeholder as of now. Will wait if someone requests for it. Created new issue #16 for it. |
README changes are pending too, will do that once code is reviewed. |
Looking good! |
Updated README and applied same changes to postgis schema |
updated
TimescaleSchemaEditor
for postgres backendpostgres.schema.DatabaseSchemaEditor
instead ofpostgis.schema.PostGISSchemaEditor
drop_primary_key
->_drop_primary_key
andcreate_hypertable
->_create_hypertable
_create_hypertable
: explictly calling_drop_primary_key
, also addedshould_migrate
arg_assert_is_hypertable
and_assert_is_not_hypertable
methods added and integrated with_create_hypertable
_set_chunk_time_interval
method addedadd_field
andalter_field
methods ofDatabaseSchemaEditor
after review
Closes #13