Browse Source

Přejmenování tabulek modelů zbylých v aplikaci seminar

v3
Jonas Havelka 1 year ago
parent
commit
7dc0e1d71b
  1. 29
      seminar/migrations/0123_prejmenovani_zbytku.py
  2. 2
      seminar/models/nastaveni.py
  3. 1
      seminar/models/novinky.py
  4. 4
      seminar/models/pomocne.py

29
seminar/migrations/0123_prejmenovani_zbytku.py

@ -0,0 +1,29 @@
# Generated by Django 2.2.28 on 2023-08-10 10:43
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('seminar', '0122_smazani_treenode'),
]
operations = [
migrations.AlterModelTable(
name='nastaveni',
table='mam_nastaveni',
),
migrations.AlterModelTable(
name='novinky',
table='mam_novinky',
),
migrations.AlterModelTable(
name='obrazek',
table='mam_obrazky',
),
migrations.AlterModelTable(
name='text',
table='mam_texty',
),
]

2
seminar/models/nastaveni.py

@ -10,7 +10,7 @@ from tvorba.models import Cislo
class Nastaveni(SingletonModel):
class Meta:
db_table = 'seminar_nastaveni'
db_table = 'mam_nastaveni'
verbose_name = 'Nastavení semináře'
# aktualni_rocnik = models.ForeignKey(Rocnik, verbose_name='aktuální ročník',

1
seminar/models/novinky.py

@ -11,6 +11,7 @@ from personalni.models import Organizator
class Novinky(models.Model):
class Meta:
db_table = 'mam_novinky'
verbose_name = 'Novinka'
verbose_name_plural = 'Novinky'
ordering = ['-datum']

4
seminar/models/pomocne.py

@ -9,7 +9,7 @@ logger = logging.getLogger(__name__)
class Text(SeminarModelBase):
class Meta:
db_table = 'seminar_texty'
db_table = 'mam_texty'
verbose_name = 'text'
verbose_name_plural = 'texty'
@ -38,7 +38,7 @@ class Text(SeminarModelBase):
class Obrazek(SeminarModelBase):
class Meta:
db_table = 'seminar_obrazky'
db_table = 'mam_obrazky'
verbose_name = 'obrázek'
verbose_name_plural = 'obrázky'

Loading…
Cancel
Save