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

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

Open
tanonl opened this issue May 3, 2022 · 2 comments
Open

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

tanonl opened this issue May 3, 2022 · 2 comments

Comments

@tanonl
Copy link

tanonl commented May 3, 2022

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
Copy link
Author

tanonl commented Dec 23, 2022

Anyone ?

@MoPoRem
Copy link

MoPoRem commented Jan 17, 2023

@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

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

No branches or pull requests

2 participants