0
0
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:
Yakko Majuri 2021-10-28 15:43:30 +00:00 committed by GitHub
parent af6a309820
commit 6ce204fe3c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 19 additions and 2 deletions

View File

@ -1,4 +1,4 @@
#!/bin/bash
set -e
python manage.py runserver
python3 manage.py runserver

View File

@ -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

View 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),)
]

View File

@ -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