Skip to content

Commit

Permalink
Drop migrated published_varchar from Market
Browse files Browse the repository at this point in the history
  • Loading branch information
Almad committed Dec 30, 2024
1 parent 424b6b5 commit 9971bd2
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
16 changes: 16 additions & 0 deletions ddcz/migrations/0009_remove_market_published_varchar.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Generated by Django 3.1.14 on 2024-12-30 00:26

from django.db import migrations


class Migration(migrations.Migration):
dependencies = [
("ddcz", "0008_more_market_room_20241230_0056"),
]

operations = [
migrations.RemoveField(
model_name="market",
name="published_varchar",
),
]
7 changes: 0 additions & 7 deletions ddcz/models/used/social.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,6 @@ class Market(models.Model):
max_length=20, blank=True, null=True, db_column="okres", verbose_name="Kraj"
)
text = MisencodedTextField()
# WARNING WARNING WARNING, not a Date, but a varchar instead!
# Old version stores in the Czech format: dd. mm. YYYY (where d/m is without leading 0)
# See https://github.com/dracidoupe/graveyard/issues/195
published_varchar = MisencodedCharField(
max_length=12, db_column="datum", verbose_name="Přidáno"
)

created = models.DateTimeField(verbose_name="Přidáno", auto_now_add=True)

def __str__(self):
Expand Down
1 change: 0 additions & 1 deletion ddcz/tests/model_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ def create_market_entries(number=1):
group=MARKET_SECTION_CHOICES[randint(0, len(MARKET_SECTION_CHOICES) - 1)][
0
],
published_varchar=date.today().strftime("%d. %m. %Y"),
)
for i in range(0, number)
]
Expand Down

0 comments on commit 9971bd2

Please sign in to comment.