Skip to content

Commit

Permalink
chore(environments): Sync project name with team name (#26638)
Browse files Browse the repository at this point in the history
  • Loading branch information
Twixes authored Dec 5, 2024
1 parent 5e4bf78 commit 428c4a4
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
19 changes: 19 additions & 0 deletions posthog/migrations/0527_project_name_sync.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Created manually

from django.db import migrations


class Migration(migrations.Migration):
dependencies = [("posthog", "0526_remoteconfig")]

operations = [
migrations.RunSQL(
"""
UPDATE posthog_project AS proj
SET name = team.name
FROM posthog_team AS team
WHERE proj.id = team.project_id AND proj.name != team.name""",
reverse_sql=migrations.RunSQL.noop,
elidable=True,
),
]
2 changes: 1 addition & 1 deletion posthog/migrations/max_migration.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0526_remoteconfig
0527_project_name_sync

0 comments on commit 428c4a4

Please sign in to comment.