Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(topics migrations): update the topic django model migrations to w… #2175

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 64 additions & 9 deletions django_topics/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.29 on 2024-11-19 08:18
# Generated by Django 1.11.29 on 2024-12-11 13:57
from __future__ import unicode_literals

from django.db import migrations, models
Expand All @@ -18,36 +18,43 @@ class Migration(migrations.Migration):
name='SeasonalTopic',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('start_date', models.DateField()),
('start_date', models.DateField(help_text='Start date of when this will appear. End date is implied by when the next Seasonal Topic is displayed.')),
('display_start_date_israel', models.DateField(blank=True, null=True)),
('display_end_date_israel', models.DateField(blank=True, null=True)),
('display_start_date_diaspora', models.DateField(blank=True, null=True)),
('display_end_date_diaspora', models.DateField(blank=True, null=True)),
('display_date_prefix', models.CharField(blank=True, max_length=255, null=True)),
('display_date_suffix', models.CharField(blank=True, max_length=255, null=True)),
('lang', models.CharField(choices=[('en', 'English'), ('he', 'Hebrew')], max_length=2)),
],
options={
'verbose_name': 'Seasonal Topic',
'verbose_name_plural': 'Seasonal Topics',
'verbose_name': 'Landing Page - Calendar',
'verbose_name_plural': 'Landing Page - Calendar',
},
),
migrations.CreateModel(
name='Topic',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('slug', models.CharField(max_length=255, unique=True)),
('slug', models.CharField(max_length=255, primary_key=True, serialize=False)),
('en_title', models.CharField(blank=True, default='', max_length=255)),
('he_title', models.CharField(blank=True, default='', max_length=255)),
],
options={
'verbose_name': 'Topic Pool Management',
'verbose_name_plural': 'Topic Pool Management',
},
),
migrations.CreateModel(
name='TopicOfTheDay',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('start_date', models.DateField()),
('lang', models.CharField(choices=[('en', 'English'), ('he', 'Hebrew')], max_length=2)),
('topic', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='topic_of_the_day', to='django_topics.Topic')),
],
options={
'verbose_name': 'Topic of the Day',
'verbose_name_plural': 'Topics of the Day',
'verbose_name': 'Landing Page - Topic of the Day',
'verbose_name_plural': 'Landing Page - Topic of the Day',
},
),
migrations.CreateModel(
Expand All @@ -65,13 +72,61 @@ class Migration(migrations.Migration):
migrations.AddField(
model_name='seasonaltopic',
name='secondary_topic',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='seasonal_secondary_topic', to='django_topics.Topic'),
field=models.ForeignKey(blank=True, help_text="Secondary topic which will be displayed alongside `topic`. E.g. `topic` is 'Teshuva' then secondary topic could be 'Yom Kippur'.", null=True, on_delete=django.db.models.deletion.CASCADE, related_name='seasonal_secondary_topic', to='django_topics.Topic'),
),
migrations.AddField(
model_name='seasonaltopic',
name='topic',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='seasonal_topic', to='django_topics.Topic'),
),
migrations.CreateModel(
name='SeasonalTopicEnglish',
fields=[
],
options={
'verbose_name': 'Landing Page - Calendar (EN)',
'verbose_name_plural': 'Landing Page - Calendar (EN)',
'proxy': True,
'indexes': [],
},
bases=('django_topics.seasonaltopic',),
),
migrations.CreateModel(
name='SeasonalTopicHebrew',
fields=[
],
options={
'verbose_name': 'Landing Page - Calendar (HE)',
'verbose_name_plural': 'Landing Page - Calendar (HE)',
'proxy': True,
'indexes': [],
},
bases=('django_topics.seasonaltopic',),
),
migrations.CreateModel(
name='TopicOfTheDayEnglish',
fields=[
],
options={
'verbose_name': 'Landing Page - Topic of the Day (EN)',
'verbose_name_plural': 'Landing Page - Topic of the Day (EN)',
'proxy': True,
'indexes': [],
},
bases=('django_topics.topicoftheday',),
),
migrations.CreateModel(
name='TopicOfTheDayHebrew',
fields=[
],
options={
'verbose_name': 'Landing Page - Topic of the Day (HE)',
'verbose_name_plural': 'Landing Page - Topic of the Day (HE)',
'proxy': True,
'indexes': [],
},
bases=('django_topics.topicoftheday',),
),
migrations.AlterUniqueTogether(
name='topicoftheday',
unique_together=set([('topic', 'start_date')]),
Expand Down
38 changes: 0 additions & 38 deletions django_topics/migrations/0002_auto_20241121_0617.py

This file was deleted.

24 changes: 0 additions & 24 deletions django_topics/migrations/0003_auto_20241121_0757.py

This file was deleted.

31 changes: 0 additions & 31 deletions django_topics/migrations/0004_auto_20241126_2359.py

This file was deleted.

20 changes: 0 additions & 20 deletions django_topics/migrations/0005_auto_20241127_0004.py

This file was deleted.

This file was deleted.

53 changes: 0 additions & 53 deletions django_topics/migrations/0007_auto_20241127_0034.py

This file was deleted.

1 change: 0 additions & 1 deletion sefaria/model/tests/abstract_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import pytest

from sefaria.system.database import db
from sefaria.system.exceptions import InputError
import sefaria.model as model
import sefaria.model.abstract as abstract

Expand Down
Loading