blob: e3e82611f94827494e8331fc1573103c95769efc [file] [log] [blame]
Borjan Tchakaloff08974d62018-02-19 16:02:20 +01001# -*- coding: utf-8 -*-
2#
3# Introducing the RadioVersion and RadioVersionDaily models
4from __future__ import unicode_literals
5
6from django.db import migrations, models
7import django.db.models.deletion
8
9
10class Migration(migrations.Migration):
11
12 dependencies = [
Mitja Nikolauscb50f2c2018-08-24 13:54:48 +020013 ("crashreport_stats", "0002_version_and_versiondaily_with_defaults")
Borjan Tchakaloff08974d62018-02-19 16:02:20 +010014 ]
15
16 operations = [
17 migrations.CreateModel(
Mitja Nikolauscb50f2c2018-08-24 13:54:48 +020018 name="RadioVersion",
Borjan Tchakaloff08974d62018-02-19 16:02:20 +010019 fields=[
Mitja Nikolauscb50f2c2018-08-24 13:54:48 +020020 (
21 "id",
22 models.AutoField(
23 auto_created=True,
24 primary_key=True,
25 serialize=False,
26 verbose_name="ID",
27 ),
28 ),
29 ("is_official_release", models.BooleanField(default=False)),
30 ("is_beta_release", models.BooleanField(default=False)),
31 ("first_seen_on", models.DateField(auto_now_add=True)),
32 ("released_on", models.DateField(auto_now_add=True)),
33 ("heartbeats", models.IntegerField(default=0)),
34 ("prob_crashes", models.IntegerField(default=0)),
35 ("smpl", models.IntegerField(default=0)),
36 ("other", models.IntegerField(default=0)),
37 (
38 "radio_version",
39 models.CharField(max_length=200, unique=True),
40 ),
Borjan Tchakaloff08974d62018-02-19 16:02:20 +010041 ],
Mitja Nikolauscb50f2c2018-08-24 13:54:48 +020042 options={"abstract": False},
Borjan Tchakaloff08974d62018-02-19 16:02:20 +010043 ),
44 migrations.CreateModel(
Mitja Nikolauscb50f2c2018-08-24 13:54:48 +020045 name="RadioVersionDaily",
Borjan Tchakaloff08974d62018-02-19 16:02:20 +010046 fields=[
Mitja Nikolauscb50f2c2018-08-24 13:54:48 +020047 (
48 "id",
49 models.AutoField(
50 auto_created=True,
51 primary_key=True,
52 serialize=False,
53 verbose_name="ID",
54 ),
55 ),
56 ("date", models.DateField(auto_now_add=True)),
57 ("heartbeats", models.IntegerField(default=0)),
58 ("prob_crashes", models.IntegerField(default=0)),
59 ("smpl", models.IntegerField(default=0)),
60 ("other", models.IntegerField(default=0)),
61 (
62 "version",
63 models.ForeignKey(
64 on_delete=django.db.models.deletion.CASCADE,
65 related_name="daily_stats",
66 to="crashreport_stats.RadioVersion",
67 ),
68 ),
Borjan Tchakaloff08974d62018-02-19 16:02:20 +010069 ],
Mitja Nikolauscb50f2c2018-08-24 13:54:48 +020070 options={"abstract": False},
Borjan Tchakaloff08974d62018-02-19 16:02:20 +010071 ),
72 ]