Closed anandramakris closed 8 months ago
I didn't get the "core_event does not exist" error at all, thanks for noticing on your end.
I did get the "raise InconsistentMigrationHistory" error, but it did not seem to cause any problems with the table name change.
Tested right now on my end if the migration error still occurs and it just says "No migrations to apply."
Just commenting.
We probably don't need to change the "add model" guide since it references the create recurring_event
table issue. It's still working on the table it's supposed to create. We might add a note that the table may have changed, and maybe link to the issue #173 that this PR is for.
I'm guessing the error might be caused by switching to a branch with a different history than the one that created the local database. If that's the case, rolling back to a common ancestor migration before switching branches should solve it. Or, if we don't care about the local database, just delete it with docker-compose down -v
to delete the data volume.
Seems to be that when I try to run a new container with the old migrations but my model name changes, it creates a new migrations file called 0015_rename_recurringevent_event.py. I assume this is what you were talking about @fyliu
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('core', '0014_language'),
]
operations = [
migrations.RenameModel(
old_name='RecurringEvent',
new_name='Event',
),
]
@anandramakris yes, exactly. We should let it generate a new migration for the change.
@anandramakris @fyliu ~ I requested changes. Anand, can you edit your commit message to add the changes you made using this templatethis pull request template?
Also, the force commit has caused an issue that makes it difficult to find the commit on the branch. For example, I see a message that the commit does not belong to a branch on the repo when clicking the GH email commit link to get to your latest commit. Also, when I navigate to issue #209, I see a message that the commits can't be found (see screenshots below).
Have changed the commit message.
Fixes #173
What changes did you make?
Why did you make the changes (we will use this info to test)?
Screenshots of Proposed Changes Of The Website (if any, please do not screen shot code changes)]
Visuals before changes are applied
![image](Visuals after changes are applied
![image](