-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This includes combining rows for histograms and percentiles and adding a build_date column.
- Loading branch information
Showing
6 changed files
with
176 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# Generated by Django 3.0.6 on 2020-05-22 21:29 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('api', '0010_remove_old_tables'), | ||
] | ||
|
||
operations = [ | ||
migrations.DeleteModel( | ||
name='FenixAggregation', | ||
), | ||
|
||
migrations.CreateModel( | ||
name='FenixAggregation', | ||
fields=[ | ||
('id', models.BigAutoField(primary_key=True, serialize=False)), | ||
('channel', models.CharField(max_length=100)), | ||
('version', models.CharField(max_length=100)), | ||
('ping_type', models.CharField(max_length=100)), | ||
('os', models.CharField(max_length=100)), | ||
('build_id', models.CharField(max_length=100)), | ||
('build_date', models.DateTimeField(default=None, null=True)), | ||
('metric', models.CharField(max_length=200)), | ||
('metric_type', models.CharField(max_length=100)), | ||
('metric_key', models.CharField(blank=True, max_length=200)), | ||
('client_agg_type', models.CharField(blank=True, max_length=100)), | ||
('total_users', models.IntegerField()), | ||
('histogram', models.TextField(blank=True, null=True)), | ||
('percentiles', models.TextField(blank=True, null=True)), | ||
], | ||
options={ | ||
'db_table': 'glam_fenix_aggregation', | ||
'abstract': False, | ||
}, | ||
), | ||
migrations.AddConstraint( | ||
model_name='fenixaggregation', | ||
constraint=models.UniqueConstraint(fields=('channel', 'version', 'ping_type', 'os', 'build_id', 'metric', 'metric_type', 'metric_key', 'client_agg_type'), name='fenix_unique_dimensions'), | ||
), | ||
migrations.CreateModel( | ||
name='FenixAggregationView', | ||
fields=[ | ||
('id', models.BigAutoField(primary_key=True, serialize=False)), | ||
('channel', models.CharField(max_length=100)), | ||
('version', models.CharField(max_length=100)), | ||
('ping_type', models.CharField(max_length=100)), | ||
('os', models.CharField(max_length=100)), | ||
('build_id', models.CharField(max_length=100)), | ||
('build_date', models.DateTimeField(default=None, null=True)), | ||
('metric', models.CharField(max_length=200)), | ||
('metric_type', models.CharField(max_length=100)), | ||
('metric_key', models.CharField(blank=True, max_length=200)), | ||
('client_agg_type', models.CharField(blank=True, max_length=100)), | ||
('total_users', models.IntegerField()), | ||
('histogram', models.TextField(blank=True, null=True)), | ||
('percentiles', models.TextField(blank=True, null=True)), | ||
], | ||
options={ | ||
'db_table': 'view_glam_fenix_aggregation', | ||
'managed': False, | ||
}, | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("api", "0011_transpose_fenix"), | ||
] | ||
|
||
operations = [ | ||
migrations.RunSQL( | ||
[ | ||
"CREATE MATERIALIZED VIEW view_glam_fenix_aggregation AS SELECT * FROM glam_fenix_aggregation", | ||
"CREATE UNIQUE INDEX ON view_glam_fenix_aggregation (id)", | ||
"CREATE INDEX ON view_glam_fenix_aggregation (version)", | ||
"CREATE INDEX ON view_glam_fenix_aggregation USING HASH (metric)", | ||
"CREATE INDEX ON view_glam_fenix_aggregation USING HASH (os)", | ||
], | ||
reverse_sql=["DROP MATERIALIZED VIEW view_glam_fenix_aggregation"], | ||
) | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters