-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Part 2: Deprecate old tags and upgrade to new tags Backend #8529
Conversation
273d9a2
to
c96157b
Compare
This comment was marked as resolved.
This comment was marked as resolved.
1d763bd
to
6bc92fc
Compare
6bc92fc
to
5af64de
Compare
0d2bef9
to
eb9e165
Compare
3118efd
to
a70c402
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything seems to work for me! 👍
Co-authored-by: Marius Andra <marius.andra@gmail.com>
…posthog into feat/tags-in-old-places
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the migrations need a bit of attention (details in the comments), but looks good otherwise! Most of the comments are just some nits.
field=django.contrib.postgres.fields.ArrayField( | ||
base_field=models.CharField(max_length=32), | ||
blank=True, | ||
db_column="tags", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really see why we're not just keeping the column name in sync with the field name. Making it obvious that the field is deprecated at the DB layer feels like the thing we should do. Otherwise, future us are going to be doing some analytics from metabase and end up counting the wrong tag. And it's just nice to keep django fields in sync with column names.
Also, if I'm missing something and we do want to keep the db column name, RenameField
updates the column name, so here we're renaming the column name twice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that makes sense. For renaming columns I don't think anything could go wrong with renaming the column since the codebase is a monolith and we're changing all references to "tags" anyways
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@mariusandra We made a decision to rename the old tag columns here from |
🚢 |
In case the boat was ambiguous, looks good to me! Some merge conflicts though 🤔 |
* master: hobby: Wait for ClickHouse and for Postgres before starting (#8686) Part 2: Deprecate old tags and upgrade to new tags Backend (#8529) Remove flake8-commas (#8695) Update Breakdown props to use filter groups (#8679) Automatically switch to the right project if possible (#8681) Super Lazy VMs (#8609) .github/workflows/ci-backend.yml: fix flake8 config (#8676) Fix recording page refresh loop (#8685) Instance status configuration (#8096)
Part 1: #8528
Part 3: #8530
PR dependency:
Part 1 <- Part 2 <- Part 3
Changes
Deprecates old tag field in models that were taggable and upgrade them to use new taggable model.
This PR gives these models a facelift: