Skip to content

Commit

Permalink
Clean up slightly incomplete migrations.
Browse files Browse the repository at this point in the history
Run valid migration command.
  • Loading branch information
rtibbles committed Jul 2, 2024
1 parent f708995 commit d36a37f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 24 deletions.
1 change: 1 addition & 0 deletions morango/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
class MorangoConfig(AppConfig):
name = "morango"
verbose_name = "Morango"
default_auto_field = "django.db.models.AutoField"

def ready(self):
from morango.models.signals import add_to_deleted_models # noqa: F401
Expand Down
27 changes: 4 additions & 23 deletions morango/migrations/0001_squashed_0024_auto_20240129_1757.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
# Generated by Django 3.2.24 on 2024-06-25 21:45
import datetime

import django.db.models.deletion
import django.db.models.manager
import django.utils.timezone
from django.db import migrations
from django.db import models
from django.utils.timezone import utc

import morango.models.fields.crypto
import morango.models.fields.uuids
Expand Down Expand Up @@ -129,9 +126,6 @@ class Migration(migrations.Migration):
(
"source_id",
models.CharField(
default=datetime.datetime(
2017, 10, 18, 21, 15, 6, 842850, tzinfo=utc
),
max_length=96,
),
),
Expand Down Expand Up @@ -166,17 +160,13 @@ class Migration(migrations.Migration):
(
"connection_kind",
models.CharField(
choices=[("network", "Network"), ("disk", "Disk")],
default="",
choices=[('network', 'Network'), ('disk', 'Disk')],
max_length=10,
),
),
(
"connection_path",
models.CharField(
default=datetime.datetime(
2017, 10, 18, 21, 15, 21, 147686, tzinfo=utc
),
max_length=1000,
),
),
Expand All @@ -186,9 +176,6 @@ class Migration(migrations.Migration):
(
"profile",
models.CharField(
default=datetime.datetime(
2017, 10, 18, 21, 15, 27, 811735, tzinfo=utc
),
max_length=40,
),
),
Expand Down Expand Up @@ -220,9 +207,6 @@ class Migration(migrations.Migration):
"last_activity_timestamp",
models.DateTimeField(
blank=True,
default=datetime.datetime(
2017, 10, 18, 21, 15, 30, 154629, tzinfo=utc
),
),
),
("client_fsic", models.TextField(blank=True, default="{}")),
Expand Down Expand Up @@ -338,10 +322,10 @@ class Migration(migrations.Migration):
"private_key",
morango.models.fields.crypto.PrivateKeyField(blank=True, null=True),
),
("lft", models.PositiveIntegerField(db_index=True, editable=False)),
("rght", models.PositiveIntegerField(db_index=True, editable=False)),
("lft", models.PositiveIntegerField(editable=False)),
("rght", models.PositiveIntegerField(editable=False)),
("tree_id", models.PositiveIntegerField(db_index=True, editable=False)),
("level", models.PositiveIntegerField(db_index=True, editable=False)),
("level", models.PositiveIntegerField(editable=False)),
(
"parent",
models.ForeignKey(
Expand Down Expand Up @@ -550,9 +534,6 @@ class Migration(migrations.Migration):
(
"source_id",
models.CharField(
default=datetime.datetime(
2017, 10, 18, 21, 13, 11, 488565, tzinfo=utc
),
max_length=96,
),
),
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ deps =
-r{toxinidir}/requirements/test.txt
cryptography40.0.2: cryptography==40.0.2
commands =
sh -c '! tests/testapp/manage.py makemigrations --dry-run --exit --noinput'
sh -c 'tests/testapp/manage.py makemigrations --check'
python -O -m pytest {posargs:--cov=morango --color=no}

[testenv:postgres]
Expand Down

0 comments on commit d36a37f

Please sign in to comment.