Squash migrations
This commit is contained in:
parent
6a97433535
commit
783ba5aced
@ -1,65 +1,79 @@
|
||||
# Generated by Django 3.0.5 on 2020-04-10 06:58
|
||||
|
||||
from django.db import migrations, models
|
||||
# Generated by Django 3.0.5 on 2020-04-14 14:40
|
||||
|
||||
import analytics.models
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = []
|
||||
dependencies = [
|
||||
('core', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name="Hit",
|
||||
name='Session',
|
||||
fields=[
|
||||
(
|
||||
"id",
|
||||
models.AutoField(
|
||||
auto_created=True,
|
||||
primary_key=True,
|
||||
serialize=False,
|
||||
verbose_name="ID",
|
||||
),
|
||||
),
|
||||
("start", models.DateTimeField(auto_now_add=True)),
|
||||
("duration", models.FloatField(default=0.0)),
|
||||
("heartbeats", models.IntegerField(default=0)),
|
||||
("tracker", models.TextField()),
|
||||
("location", models.TextField(blank=True)),
|
||||
("referrer", models.TextField(blank=True)),
|
||||
("loadTime", models.FloatField(null=True)),
|
||||
("httpStatus", models.IntegerField(null=True)),
|
||||
("metadata_raw", models.TextField()),
|
||||
('uuid', models.UUIDField(default=analytics.models._default_uuid, primary_key=True, serialize=False)),
|
||||
('identifier', models.TextField(blank=True, db_index=True)),
|
||||
('start_time', models.DateTimeField(auto_now_add=True, db_index=True)),
|
||||
('last_seen', models.DateTimeField(auto_now_add=True)),
|
||||
('user_agent', models.TextField()),
|
||||
('browser', models.TextField()),
|
||||
('device', models.TextField()),
|
||||
('device_type', models.CharField(choices=[('PHONE', 'Phone'), ('TABLET', 'Tablet'), ('DESKTOP', 'Desktop'), ('ROBOT', 'Robot'), ('OTHER', 'Other')], default='OTHER', max_length=7)),
|
||||
('os', models.TextField()),
|
||||
('ip', models.GenericIPAddressField(db_index=True)),
|
||||
('asn', models.TextField(blank=True)),
|
||||
('country', models.TextField(blank=True)),
|
||||
('longitude', models.FloatField(null=True)),
|
||||
('latitude', models.FloatField(null=True)),
|
||||
('time_zone', models.TextField(blank=True)),
|
||||
('service', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.Service')),
|
||||
],
|
||||
options={
|
||||
'ordering': ['-start_time'],
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name="Session",
|
||||
name='Hit',
|
||||
fields=[
|
||||
(
|
||||
"uuid",
|
||||
models.UUIDField(
|
||||
default=analytics.models._default_uuid,
|
||||
primary_key=True,
|
||||
serialize=False,
|
||||
),
|
||||
),
|
||||
("identifier", models.TextField(blank=True)),
|
||||
("first_seen", models.DateTimeField(auto_now_add=True)),
|
||||
("last_seen", models.DateTimeField(auto_now_add=True)),
|
||||
("user_agent", models.TextField()),
|
||||
("browser", models.TextField()),
|
||||
("device", models.TextField()),
|
||||
("os", models.TextField()),
|
||||
("ip", models.GenericIPAddressField()),
|
||||
("asn", models.TextField(blank=True)),
|
||||
("country", models.TextField(blank=True)),
|
||||
("longitude", models.FloatField(null=True)),
|
||||
("latitude", models.FloatField(null=True)),
|
||||
("time_zone", models.TextField(blank=True)),
|
||||
("metadata_raw", models.TextField()),
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('initial', models.BooleanField(db_index=True, default=True)),
|
||||
('start_time', models.DateTimeField(auto_now_add=True, db_index=True)),
|
||||
('last_seen', models.DateTimeField(auto_now_add=True)),
|
||||
('heartbeats', models.IntegerField(default=0)),
|
||||
('tracker', models.TextField()),
|
||||
('location', models.TextField(blank=True, db_index=True)),
|
||||
('referrer', models.TextField(blank=True, db_index=True)),
|
||||
('load_time', models.FloatField(null=True)),
|
||||
('session', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='analytics.Session')),
|
||||
],
|
||||
options={
|
||||
'ordering': ['-start_time'],
|
||||
},
|
||||
),
|
||||
migrations.AddIndex(
|
||||
model_name='session',
|
||||
index=models.Index(fields=['service', '-start_time'], name='analytics_s_service_4b1137_idx'),
|
||||
),
|
||||
migrations.AddIndex(
|
||||
model_name='session',
|
||||
index=models.Index(fields=['service', 'identifier'], name='analytics_s_service_82ab21_idx'),
|
||||
),
|
||||
migrations.AddIndex(
|
||||
model_name='hit',
|
||||
index=models.Index(fields=['session', '-start_time'], name='analytics_h_session_b2667f_idx'),
|
||||
),
|
||||
migrations.AddIndex(
|
||||
model_name='hit',
|
||||
index=models.Index(fields=['session', 'location'], name='analytics_h_session_775f5a_idx'),
|
||||
),
|
||||
migrations.AddIndex(
|
||||
model_name='hit',
|
||||
index=models.Index(fields=['session', 'referrer'], name='analytics_h_session_98b8bf_idx'),
|
||||
),
|
||||
]
|
||||
|
@ -1,31 +0,0 @@
|
||||
# Generated by Django 3.0.5 on 2020-04-10 06:58
|
||||
|
||||
import django.db.models.deletion
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
("core", "0001_initial"),
|
||||
("analytics", "0001_initial"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name="session",
|
||||
name="service",
|
||||
field=models.ForeignKey(
|
||||
on_delete=django.db.models.deletion.CASCADE, to="core.Service"
|
||||
),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name="hit",
|
||||
name="session",
|
||||
field=models.ForeignKey(
|
||||
on_delete=django.db.models.deletion.CASCADE, to="analytics.Session"
|
||||
),
|
||||
),
|
||||
]
|
@ -1,15 +0,0 @@
|
||||
# Generated by Django 3.0.5 on 2020-04-10 17:25
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("analytics", "0002_auto_20200410_0258"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveField(model_name="hit", name="metadata_raw",),
|
||||
migrations.RemoveField(model_name="session", name="metadata_raw",),
|
||||
]
|
@ -1,29 +0,0 @@
|
||||
# Generated by Django 3.0.5 on 2020-04-11 19:41
|
||||
|
||||
import django.utils.timezone
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("analytics", "0003_auto_20200410_1325"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RenameField(
|
||||
model_name="hit", old_name="start", new_name="start_time",
|
||||
),
|
||||
migrations.RenameField(
|
||||
model_name="session", old_name="first_seen", new_name="start_time",
|
||||
),
|
||||
migrations.RemoveField(model_name="hit", name="duration",),
|
||||
migrations.AddField(
|
||||
model_name="hit",
|
||||
name="last_seen",
|
||||
field=models.DateTimeField(
|
||||
auto_now_add=True, default=django.utils.timezone.now
|
||||
),
|
||||
preserve_default=False,
|
||||
),
|
||||
]
|
@ -1,16 +0,0 @@
|
||||
# Generated by Django 3.0.5 on 2020-04-12 03:47
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("analytics", "0004_auto_20200411_1541"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name="hit", name="initial", field=models.BooleanField(default=True),
|
||||
),
|
||||
]
|
@ -1,29 +0,0 @@
|
||||
# Generated by Django 3.0.5 on 2020-04-12 04:03
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("analytics", "0005_hit_initial"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveField(model_name="hit", name="httpStatus",),
|
||||
migrations.AddField(
|
||||
model_name="session",
|
||||
name="device_type",
|
||||
field=models.CharField(
|
||||
choices=[
|
||||
("PHONE", "Phone"),
|
||||
("TABLET", "Tablet"),
|
||||
("DESK", "Desktop / Laptop"),
|
||||
("ROBOT", "Robot"),
|
||||
("OTHER", "Other"),
|
||||
],
|
||||
default="OTHER",
|
||||
max_length=6,
|
||||
),
|
||||
),
|
||||
]
|
@ -1,28 +0,0 @@
|
||||
# Generated by Django 3.0.5 on 2020-04-12 04:10
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("analytics", "0006_auto_20200412_0003"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name="session",
|
||||
name="device_type",
|
||||
field=models.CharField(
|
||||
choices=[
|
||||
("PHONE", "Phone"),
|
||||
("TABLET", "Tablet"),
|
||||
("DESKTOP", "Desktop"),
|
||||
("ROBOT", "Robot"),
|
||||
("OTHER", "Other"),
|
||||
],
|
||||
default="OTHER",
|
||||
max_length=7,
|
||||
),
|
||||
),
|
||||
]
|
@ -1,16 +0,0 @@
|
||||
# Generated by Django 3.0.5 on 2020-04-12 04:15
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("analytics", "0007_auto_20200412_0010"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RenameField(
|
||||
model_name="hit", old_name="loadTime", new_name="load_time",
|
||||
),
|
||||
]
|
@ -1,76 +0,0 @@
|
||||
# Generated by Django 3.0.5 on 2020-04-14 14:08
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('analytics', '0008_auto_20200412_0015'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterModelOptions(
|
||||
name='hit',
|
||||
options={'ordering': ['-start_time']},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='session',
|
||||
options={'ordering': ['-start_time']},
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='hit',
|
||||
name='initial',
|
||||
field=models.BooleanField(db_index=True, default=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='hit',
|
||||
name='location',
|
||||
field=models.TextField(blank=True, db_index=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='hit',
|
||||
name='referrer',
|
||||
field=models.TextField(blank=True, db_index=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='hit',
|
||||
name='start_time',
|
||||
field=models.DateTimeField(auto_now_add=True, db_index=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='session',
|
||||
name='identifier',
|
||||
field=models.TextField(blank=True, db_index=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='session',
|
||||
name='ip',
|
||||
field=models.GenericIPAddressField(db_index=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='session',
|
||||
name='start_time',
|
||||
field=models.DateTimeField(auto_now_add=True, db_index=True),
|
||||
),
|
||||
migrations.AddIndex(
|
||||
model_name='hit',
|
||||
index=models.Index(fields=['session', '-start_time'], name='analytics_h_session_b2667f_idx'),
|
||||
),
|
||||
migrations.AddIndex(
|
||||
model_name='hit',
|
||||
index=models.Index(fields=['session', 'location'], name='analytics_h_session_775f5a_idx'),
|
||||
),
|
||||
migrations.AddIndex(
|
||||
model_name='hit',
|
||||
index=models.Index(fields=['session', 'referrer'], name='analytics_h_session_98b8bf_idx'),
|
||||
),
|
||||
migrations.AddIndex(
|
||||
model_name='session',
|
||||
index=models.Index(fields=['service', '-start_time'], name='analytics_s_service_4b1137_idx'),
|
||||
),
|
||||
migrations.AddIndex(
|
||||
model_name='session',
|
||||
index=models.Index(fields=['service', 'identifier'], name='analytics_s_service_82ab21_idx'),
|
||||
),
|
||||
]
|
@ -1,12 +1,11 @@
|
||||
# Generated by Django 3.0.5 on 2020-04-10 06:58
|
||||
|
||||
import django.contrib.auth.models
|
||||
import django.db.models.deletion
|
||||
import django.utils.timezone
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
# Generated by Django 3.0.5 on 2020-04-14 14:40
|
||||
|
||||
import core.models
|
||||
from django.conf import settings
|
||||
import django.contrib.auth.models
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
import django.utils.timezone
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
@ -14,146 +13,47 @@ class Migration(migrations.Migration):
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
("auth", "0011_update_proxy_permissions"),
|
||||
('auth', '0011_update_proxy_permissions'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name="User",
|
||||
name='User',
|
||||
fields=[
|
||||
(
|
||||
"id",
|
||||
models.AutoField(
|
||||
auto_created=True,
|
||||
primary_key=True,
|
||||
serialize=False,
|
||||
verbose_name="ID",
|
||||
),
|
||||
),
|
||||
("password", models.CharField(max_length=128, verbose_name="password")),
|
||||
(
|
||||
"last_login",
|
||||
models.DateTimeField(
|
||||
blank=True, null=True, verbose_name="last login"
|
||||
),
|
||||
),
|
||||
(
|
||||
"is_superuser",
|
||||
models.BooleanField(
|
||||
default=False,
|
||||
help_text="Designates that this user has all permissions without explicitly assigning them.",
|
||||
verbose_name="superuser status",
|
||||
),
|
||||
),
|
||||
(
|
||||
"first_name",
|
||||
models.CharField(
|
||||
blank=True, max_length=30, verbose_name="first name"
|
||||
),
|
||||
),
|
||||
(
|
||||
"last_name",
|
||||
models.CharField(
|
||||
blank=True, max_length=150, verbose_name="last name"
|
||||
),
|
||||
),
|
||||
(
|
||||
"is_staff",
|
||||
models.BooleanField(
|
||||
default=False,
|
||||
help_text="Designates whether the user can log into this admin site.",
|
||||
verbose_name="staff status",
|
||||
),
|
||||
),
|
||||
(
|
||||
"is_active",
|
||||
models.BooleanField(
|
||||
default=True,
|
||||
help_text="Designates whether this user should be treated as active. Unselect this instead of deleting accounts.",
|
||||
verbose_name="active",
|
||||
),
|
||||
),
|
||||
(
|
||||
"date_joined",
|
||||
models.DateTimeField(
|
||||
default=django.utils.timezone.now, verbose_name="date joined"
|
||||
),
|
||||
),
|
||||
(
|
||||
"username",
|
||||
models.TextField(default=core.models._default_uuid, unique=True),
|
||||
),
|
||||
("email", models.EmailField(max_length=254, unique=True)),
|
||||
(
|
||||
"groups",
|
||||
models.ManyToManyField(
|
||||
blank=True,
|
||||
help_text="The groups this user belongs to. A user will get all permissions granted to each of their groups.",
|
||||
related_name="user_set",
|
||||
related_query_name="user",
|
||||
to="auth.Group",
|
||||
verbose_name="groups",
|
||||
),
|
||||
),
|
||||
(
|
||||
"user_permissions",
|
||||
models.ManyToManyField(
|
||||
blank=True,
|
||||
help_text="Specific permissions for this user.",
|
||||
related_name="user_set",
|
||||
related_query_name="user",
|
||||
to="auth.Permission",
|
||||
verbose_name="user permissions",
|
||||
),
|
||||
),
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('password', models.CharField(max_length=128, verbose_name='password')),
|
||||
('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
|
||||
('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
|
||||
('first_name', models.CharField(blank=True, max_length=30, verbose_name='first name')),
|
||||
('last_name', models.CharField(blank=True, max_length=150, verbose_name='last name')),
|
||||
('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')),
|
||||
('is_active', models.BooleanField(default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')),
|
||||
('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')),
|
||||
('username', models.TextField(default=core.models._default_uuid, unique=True)),
|
||||
('email', models.EmailField(max_length=254, unique=True)),
|
||||
('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.Group', verbose_name='groups')),
|
||||
('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.Permission', verbose_name='user permissions')),
|
||||
],
|
||||
options={
|
||||
"verbose_name": "user",
|
||||
"verbose_name_plural": "users",
|
||||
"abstract": False,
|
||||
'verbose_name': 'user',
|
||||
'verbose_name_plural': 'users',
|
||||
'abstract': False,
|
||||
},
|
||||
managers=[("objects", django.contrib.auth.models.UserManager()),],
|
||||
managers=[
|
||||
('objects', django.contrib.auth.models.UserManager()),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name="Service",
|
||||
name='Service',
|
||||
fields=[
|
||||
(
|
||||
"uuid",
|
||||
models.UUIDField(
|
||||
default=core.models._default_uuid,
|
||||
primary_key=True,
|
||||
serialize=False,
|
||||
),
|
||||
),
|
||||
("name", models.TextField(max_length=64)),
|
||||
("created", models.DateTimeField(auto_now_add=True)),
|
||||
("link", models.URLField(blank=True)),
|
||||
("origins", models.TextField(default="*")),
|
||||
(
|
||||
"status",
|
||||
models.CharField(
|
||||
choices=[("AC", "Active"), ("AR", "Archived")],
|
||||
db_index=True,
|
||||
default="AC",
|
||||
max_length=2,
|
||||
),
|
||||
),
|
||||
(
|
||||
"collaborators",
|
||||
models.ManyToManyField(
|
||||
blank=True,
|
||||
related_name="collaborating_services",
|
||||
to=settings.AUTH_USER_MODEL,
|
||||
),
|
||||
),
|
||||
(
|
||||
"owner",
|
||||
models.ForeignKey(
|
||||
on_delete=django.db.models.deletion.CASCADE,
|
||||
related_name="owning_services",
|
||||
to=settings.AUTH_USER_MODEL,
|
||||
),
|
||||
),
|
||||
('uuid', models.UUIDField(default=core.models._default_uuid, primary_key=True, serialize=False)),
|
||||
('name', models.TextField(max_length=64)),
|
||||
('created', models.DateTimeField(auto_now_add=True)),
|
||||
('link', models.URLField(blank=True)),
|
||||
('origins', models.TextField(default='*')),
|
||||
('status', models.CharField(choices=[('AC', 'Active'), ('AR', 'Archived')], db_index=True, default='AC', max_length=2)),
|
||||
('collaborators', models.ManyToManyField(blank=True, related_name='collaborating_services', to=settings.AUTH_USER_MODEL)),
|
||||
('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='owning_services', to=settings.AUTH_USER_MODEL)),
|
||||
],
|
||||
),
|
||||
]
|
||||
|
@ -1,18 +0,0 @@
|
||||
# Generated by Django 3.0.5 on 2020-04-11 22:55
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("core", "0001_initial"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name="service",
|
||||
name="anonymize_ips",
|
||||
field=models.BooleanField(default=False),
|
||||
),
|
||||
]
|
@ -1,14 +0,0 @@
|
||||
# Generated by Django 3.0.5 on 2020-04-11 23:25
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("core", "0002_service_anonymize_ips"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveField(model_name="service", name="anonymize_ips",),
|
||||
]
|
Loading…
Reference in New Issue
Block a user