Skip to content

Commit a2f88d9

Browse files
committed
[migrations] Fix monitoring migrations after #162
1 parent bf1e8d0 commit a2f88d9

4 files changed

Lines changed: 11 additions & 25 deletions

File tree

openwisp_monitoring/monitoring/migrations/0013_metric_configuration.py renamed to openwisp_monitoring/monitoring/migrations/0016_metric_configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
class Migration(migrations.Migration):
88

99
dependencies = [
10-
('monitoring', '0012_rename_graph_chart'),
10+
('monitoring', '0015_delete_models'),
1111
]
1212

1313
operations = [

openwisp_monitoring/monitoring/migrations/0014_merge_traffic_metrics_and_fill_metric_config.py renamed to openwisp_monitoring/monitoring/migrations/0017_merge_traffic_metrics_and_fill_metric_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def fill_configuration(apps, schema_editor):
5151
class Migration(migrations.Migration):
5252

5353
dependencies = [
54-
('monitoring', '0013_metric_configuration'),
54+
('monitoring', '0016_metric_configuration'),
5555
]
5656

5757
operations = [

tests/openwisp2/sample_monitoring/migrations/0001_initial.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import swapper
1010

1111
from openwisp_monitoring.monitoring.charts import CHART_CONFIGURATION_CHOICES
12+
from openwisp_monitoring.monitoring.metrics import get_metric_configuration_choices
1213

1314

1415
class Migration(migrations.Migration):
@@ -49,7 +50,14 @@ class Migration(migrations.Migration):
4950
),
5051
),
5152
('name', models.CharField(max_length=64)),
52-
('description', models.TextField(blank=True)),
53+
(
54+
'configuration',
55+
models.CharField(
56+
choices=get_metric_configuration_choices(),
57+
max_length=16,
58+
null=True,
59+
),
60+
),
5361
(
5462
'key',
5563
models.SlugField(

tests/openwisp2/sample_monitoring/migrations/0006_metric_configuration.py

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)