-
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.
chore: Merge pull request #6 from arrai-innovations/multiple_latest_a…
…nd_same_numbered_migrations chore: Multiple latest and same numbered migrations
- Loading branch information
Showing
36 changed files
with
864 additions
and
17 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 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 |
---|---|---|
@@ -1 +1 @@ | ||
1.0.3 | ||
1.0.4 |
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
Empty file.
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,6 @@ | ||
from django.apps import AppConfig | ||
|
||
|
||
class FoodConfig(AppConfig): | ||
name = "tests.musicians" | ||
verbose_name = "Musicians" |
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,61 @@ | ||
# Generated by Django 3.2.17 on 2023-08-11 16:16 | ||
|
||
import django.db.models.deletion | ||
from django.db import migrations | ||
from django.db import models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
initial = True | ||
|
||
dependencies = [] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name="BandInfo", | ||
fields=[ | ||
("id", models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")), | ||
("name", models.CharField(max_length=1024)), | ||
("genre", models.CharField(max_length=1024)), | ||
], | ||
options={ | ||
"db_table": "band_info", | ||
"ordering": ("name",), | ||
"managed": False, | ||
"default_related_name": "musicians_bandinfo", | ||
}, | ||
), | ||
migrations.CreateModel( | ||
name="Bands", | ||
fields=[ | ||
("id", models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")), | ||
("name", models.CharField(max_length=1024)), | ||
("genre", models.CharField(max_length=1024)), | ||
("formed", models.DateField()), | ||
], | ||
options={ | ||
"ordering": ("name",), | ||
"default_related_name": "bands", | ||
}, | ||
), | ||
migrations.CreateModel( | ||
name="BandMembers", | ||
fields=[ | ||
("id", models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")), | ||
("name", models.CharField(max_length=1024)), | ||
("active_member", models.BooleanField(default=True)), | ||
( | ||
"band", | ||
models.ForeignKey( | ||
on_delete=django.db.models.deletion.DO_NOTHING, | ||
related_name="band_members", | ||
to="musicians.bands", | ||
), | ||
), | ||
], | ||
options={ | ||
"ordering": ("name",), | ||
"default_related_name": "band_members", | ||
}, | ||
), | ||
] |
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,24 @@ | ||
# Generated by Django 3.2.17 on 2023-08-11 16:17 | ||
# Modified using django-view-manager 1.0.4. Please do not delete this comment. | ||
import os | ||
|
||
from django.db import migrations | ||
|
||
sql_path = "tests/musicians/sql" | ||
forward_sql_filename = "view-band_info-0002.sql" | ||
|
||
with open(os.path.join(sql_path, forward_sql_filename), mode="r") as f: | ||
forwards_sql = f.read() | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("musicians", "0001_initial"), | ||
] | ||
|
||
operations = [ | ||
migrations.RunSQL( | ||
sql=forwards_sql, | ||
reverse_sql="DROP VIEW IF EXISTS band_info;", | ||
), | ||
] |
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,28 @@ | ||
# Generated by Django 3.2.17 on 2023-08-11 16:30 | ||
# Modified using django-view-manager 1.0.4. Please do not delete this comment. | ||
import os | ||
|
||
from django.db import migrations | ||
|
||
sql_path = "tests/musicians/sql" | ||
forward_sql_filename = "view-band_info-latest.sql" | ||
reverse_sql_filename = "view-band_info-0003.sql" | ||
|
||
with open(os.path.join(sql_path, forward_sql_filename), mode="r") as f: | ||
forwards_sql = f.read() | ||
|
||
with open(os.path.join(sql_path, reverse_sql_filename), mode="r") as f: | ||
reverse_sql = f.read() | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("musicians", "0002_create_band_info_view"), | ||
] | ||
|
||
operations = [ | ||
migrations.RunSQL( | ||
sql=forwards_sql, | ||
reverse_sql=reverse_sql, | ||
), | ||
] |
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,28 @@ | ||
# Generated by Django 3.2.17 on 2023-08-11 16:21 | ||
# Modified using django-view-manager 1.0.4. Please do not delete this comment. | ||
import os | ||
|
||
from django.db import migrations | ||
|
||
sql_path = "tests/musicians/sql" | ||
forward_sql_filename = "view-band_info-0003.sql" | ||
reverse_sql_filename = "view-band_info-0002.sql" | ||
|
||
with open(os.path.join(sql_path, forward_sql_filename), mode="r") as f: | ||
forwards_sql = f.read() | ||
|
||
with open(os.path.join(sql_path, reverse_sql_filename), mode="r") as f: | ||
reverse_sql = f.read() | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("musicians", "0002_create_band_info_view"), | ||
] | ||
|
||
operations = [ | ||
migrations.RunSQL( | ||
sql=forwards_sql, | ||
reverse_sql=reverse_sql, | ||
), | ||
] |
12 changes: 12 additions & 0 deletions
12
tests/musicians/migrations/0004_merge_0003_add_founded_date_0003_add_member_count.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,12 @@ | ||
# Generated by Django 3.2.17 on 2023-08-11 16:34 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("musicians", "0003_add_founded_date"), | ||
("musicians", "0003_add_member_count"), | ||
] | ||
|
||
operations = [] |
Empty file.
Oops, something went wrong.