Skip to content

Commit

Permalink
Merge pull request #1527 from gustavomm19/temporary-fix
Browse files Browse the repository at this point in the history
add App model to prevent error on migrations
  • Loading branch information
tommygonzaleza authored Jan 7, 2025
2 parents f014b2d + 6c1ad70 commit 64e5287
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
23 changes: 23 additions & 0 deletions breathecode/authenticate/migrations/0063_app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Generated by Django 5.1.4 on 2025-01-07 20:15

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("authenticate", "0062_delete_app"),
]

operations = [
migrations.CreateModel(
name="App",
fields=[
("id", models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
(
"name",
models.CharField(help_text="Descriptive and unique name of the app", max_length=25, unique=True),
),
],
),
]
13 changes: 13 additions & 0 deletions breathecode/authenticate/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -696,6 +696,19 @@ class GitpodUser(models.Model):
)


class App(models.Model):
"""
The only reason for keeping this model is because this model is really indestructible.
Remove it as soon as Django team let us do it.
"""

def __init__(self, *args, **kwargs):
raise DeprecationWarning("authenticate.App was deprecated, use linked_services.App instead")

name = models.CharField(max_length=25, unique=True, help_text="Descriptive and unique name of the app")


class GoogleWebhook(models.Model):
class Status(models.TextChoices):
PENDING = ("PENDING", "Pending")
Expand Down

0 comments on commit 64e5287

Please sign in to comment.