jamessewell / django-timescaledb

A Django database backend and tooling for Timescaledb.
Apache License 2.0
185 stars 47 forks source link

Is it absolutely necessary to name the field "time" ? #38

Open tanonl opened 2 years ago

tanonl commented 2 years ago

Hi, I am planning to convert my postgreSQL to a timescaledb and use this awesome package. I just wonder if it is absolutely necessary to rename the existing field to "time". Is there any way I can set a variable to specify the current field name.

tanonl commented 1 year ago

Anyone ?

MoPoRem commented 1 year ago

@tanonl No, looking through the source as long as its a TimescaleDateTimeField the create_hypertable command will run for that field (and you can only have one TimescaleDateTimeField)

            if isinstance(field, TimescaleDateTimeField):
                # create hypertable, with the field as partition column
                self._create_hypertable(model, field)
                break