-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4e12d38
commit 714545b
Showing
18 changed files
with
127 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
eventex/core/migrations/0008_rename_course_courseold_alter_courseold_options.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Generated by Django 5.0.3 on 2024-10-08 00:26 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
atomic = False | ||
dependencies = [ | ||
('core', '0007_alter_talk_title_course'), | ||
] | ||
|
||
operations = [ | ||
migrations.RenameModel( | ||
old_name='Course', | ||
new_name='CourseOld', | ||
), | ||
migrations.AlterModelOptions( | ||
name='courseold', | ||
options={'verbose_name': 'curso', 'verbose_name_plural': 'cursos'}, | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Generated by Django 3.1.2 on 2020-11-03 19:27 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('core', '0008_rename_course_courseold_alter_courseold_options'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='Course', | ||
fields=[ | ||
('talk_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='core.talk')), | ||
('slots', models.IntegerField()), | ||
], | ||
options={ | ||
'verbose_name': 'curso', | ||
'verbose_name_plural': 'cursos', | ||
}, | ||
bases=('core.talk',), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Generated by Django 3.1.2 on 2020-11-03 19:29 | ||
|
||
from django.db import migrations | ||
|
||
|
||
def copy_src_to_dst(Source, Destination): | ||
for src in Source.objects.all(): | ||
dst = Destination( | ||
title=src.title, | ||
start=src.start, | ||
description=src.description, | ||
slots=src.slots | ||
) | ||
dst.save() | ||
dst.speakers.set(src.speakers.all()) | ||
src.delete() | ||
|
||
|
||
def forward_course_abc_to_mti(apps, schema_editor): | ||
copy_src_to_dst( | ||
apps.get_model('core', 'CourseOld'), | ||
apps.get_model('core', 'Course'), | ||
) | ||
|
||
|
||
def backward_course_abc_to_mti(apps, schema_editor): | ||
copy_src_to_dst( | ||
apps.get_model('core', 'CourseOld'), | ||
apps.get_model('core', 'Course'), | ||
) | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
('core', '0009_course'), | ||
] | ||
|
||
operations = [ | ||
migrations.RunPython(forward_course_abc_to_mti, | ||
backward_course_abc_to_mti) | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Generated by Django 5.0.3 on 2024-10-08 03:43 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("core", "0010_course_abc_to_mti"), | ||
] | ||
|
||
operations = [ | ||
migrations.DeleteModel( | ||
name="CourseOld", | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters