mirror of
https://github.com/PostHog/posthog.git
synced 2024-11-21 13:39:22 +01:00
add version to person (#6628)
* add version to person * add migration * set all initial version values to 0 * remove defaults * fix dep
This commit is contained in:
parent
af6a309820
commit
6ce204fe3c
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
python manage.py runserver
|
||||
python3 manage.py runserver
|
@ -3,7 +3,7 @@ auth: 0012_alter_user_first_name_max_length
|
||||
axes: 0006_remove_accesslog_trusted
|
||||
contenttypes: 0002_remove_content_type_name
|
||||
ee: 0005_project_based_permissioning
|
||||
posthog: 0179_add_group_type_mapping
|
||||
posthog: 0180_person_version
|
||||
rest_hooks: 0002_swappable_hook_model
|
||||
sessions: 0001_initial
|
||||
social_django: 0010_uid_db_index
|
||||
|
14
posthog/migrations/0180_person_version.py
Normal file
14
posthog/migrations/0180_person_version.py
Normal file
@ -0,0 +1,14 @@
|
||||
# Generated by Django 3.2.5 on 2021-10-25 11:26
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("posthog", "0179_add_group_type_mapping"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(model_name="person", name="version", field=models.BigIntegerField(blank=True, null=True),)
|
||||
]
|
@ -78,6 +78,9 @@ class Person(models.Model):
|
||||
is_identified: models.BooleanField = models.BooleanField(default=False)
|
||||
uuid = models.UUIDField(db_index=True, default=UUIDT, editable=False)
|
||||
|
||||
# current version of the person, used to sync with ClickHouse and collapse rows correctly
|
||||
version: models.BigIntegerField = models.BigIntegerField(null=True, blank=True)
|
||||
|
||||
# Has an index on properties -> email from migration 0121, (team_id, id DESC) from migration 0164
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user