Dear Jason
Thanks for your reply. I am not absolulety sure what this question means "What specifically was the changeset occurring and what isn't? ", but I try to answer it the best way I can. I worked on the app quite a while ago and back then everything seemed to work. As far as I can understand my own steps back then I tried to alter only one field.
extract from migrations file:
migrations.AlterField(
model_name='waeschepaket',
name='w_bezahlt',
field=models.BooleanField(choices=[(False, 'Nein'), (True, 'Ja')], default=False),
),
Here is a small screenshot from phpmyadmin
I guess that if that field alteration would have worked than the default value should be False or something else but not None.
Then I guess that I forgot about it and just worked with app as it was for more than a year and now I wanted to add a new model:
operations = [
migrations.CreateModel(
name='Wartungsarbeit',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('wa_titel', models.CharField(max_length=201)),
('wa_beschreibung', models.TextField()),
('wa_turnus', models.PositiveIntegerField(default=1)),
('wa_startdatum', models.DateField(default=django.utils.timezone.now)),
('wa_erstelldatum', models.DateTimeField(auto_now_add=True)),
('wa_bearbeitungsdatum', models.DateTimeField(auto_now=True)),
],
),
But this does not show up in any way. During the last weeks I have tried a lot of things that I read on the web and I am afraid that I may have made a mess. There were many instructions about inspectdb, --fake-initial, removing the app-specific entries from the table django_migrations and so on. But nothing of that worked. Now I am at a point where I merged the last two, obviously not working migrations into one, which is currently the 37th for this app.
As I already have a lot of content in the database I don't want to loose that and instead I search for a way to start fresh and get rid of that error. And if possible I would like to know where that error originated. But currently I am at my wits end. First I thought that it must have to do with the database access, but then the app would not work and other content could not be entered and changed and so on. I checked my privileges via phpmyadmin. Everything is fine there, too. And of course the app is in INSTALLED_APPS, otherwise it would not work as well. One more thing that I am not sure of is the database routing. I have a router.py and there I have pretty much the same entries for all apps. Looks similar to this:
def allow_migrate(self, db, app_label, model_name=None, **hints):
if app_label == 'app_name':
return db == 'db_app_name'
return None
I don't know if this can be relevant for this problem.
@Jason: Could I answer your questions?
Best regards
Martin