Skip to content

Commit

Permalink
[migrations] Fix monitoring migrations after #162
Browse files Browse the repository at this point in the history
  • Loading branch information
nepython committed Jul 24, 2020
1 parent bf1e8d0 commit a2f88d9
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
class Migration(migrations.Migration):

dependencies = [
('monitoring', '0012_rename_graph_chart'),
('monitoring', '0015_delete_models'),
]

operations = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def fill_configuration(apps, schema_editor):
class Migration(migrations.Migration):

dependencies = [
('monitoring', '0013_metric_configuration'),
('monitoring', '0016_metric_configuration'),
]

operations = [
Expand Down
10 changes: 9 additions & 1 deletion tests/openwisp2/sample_monitoring/migrations/0001_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import swapper

from openwisp_monitoring.monitoring.charts import CHART_CONFIGURATION_CHOICES
from openwisp_monitoring.monitoring.metrics import get_metric_configuration_choices


class Migration(migrations.Migration):
Expand Down Expand Up @@ -49,7 +50,14 @@ class Migration(migrations.Migration):
),
),
('name', models.CharField(max_length=64)),
('description', models.TextField(blank=True)),
(
'configuration',
models.CharField(
choices=get_metric_configuration_choices(),
max_length=16,
null=True,
),
),
(
'key',
models.SlugField(
Expand Down

This file was deleted.

0 comments on commit a2f88d9

Please sign in to comment.