Skip to content

Commit

Permalink
fix(grafana): update migration to noop on table name (#4571)
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewelwell committed Sep 3, 2024
1 parent 8e371a8 commit 65b63cf
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,21 +1,30 @@
# Generated by Django 3.2.25 on 2024-07-27 14:21
# Generated by Django 4.2.15 on 2024-09-03 09:39

from django.db import migrations, models
import django.db.models.deletion
import uuid


class Migration(migrations.Migration):

dependencies = [
("organisations", "0055_alter_percent_usage"),
("projects", "0024_add_project_edge_v2_migration_read_capacity_budget"),
("organisations", "0056_create_organisation_breached_grace_period"),
("grafana", "0001_initial"),
]

operations = [
migrations.RenameModel(
old_name="GrafanaConfiguration",
new_name="GrafanaProjectConfiguration",
migrations.SeparateDatabaseAndState(
state_operations=[
migrations.RenameModel(
old_name="GrafanaConfiguration",
new_name="GrafanaProjectConfiguration",
),
migrations.AlterModelTable(
name="grafanaprojectconfiguration",
table="grafana_grafanaconfiguration",
),
]
),
migrations.CreateModel(
name="GrafanaOrganisationConfiguration",
Expand Down
3 changes: 3 additions & 0 deletions api/integrations/grafana/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ class GrafanaProjectConfiguration(IntegrationsModel):
Project, on_delete=models.CASCADE, related_name="grafana_config"
)

class Meta:
db_table = "grafana_grafanaconfiguration"


class GrafanaOrganisationConfiguration(IntegrationsModel):
organisation = models.OneToOneField(
Expand Down

0 comments on commit 65b63cf

Please sign in to comment.