0

I've run python manage.py makemigrations core which created the following file in /opt/project/core/migrations

0001_initial.py

# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import models, migrations
from django.conf import settings


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Customer',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('company', models.CharField(max_length=100)),
                ('department', models.CharField(max_length=100)),
                ('user', models.OneToOneField(to=settings.AUTH_USER_MODEL)),
            ],
            options={
            },
            bases=(models.Model,),
        ),
    ]

I then run python manage.py migrate and it does nothing. It's not creating the table in the database.

Running python manage.py sqlmigrate core doesn't return a thing.

I'm using postgres as my backend database db1 and schema is core.

whoisearth
  • 4,080
  • 13
  • 62
  • 130
  • What is the output of the migrate command? Does it say Running migrations: No migrations to apply. ? – Ashish Acharya Jun 22 '15 at 02:50
  • I think I know the problem and I'm troubleshooting it now. I'm doing multiple databases I believe it's whenever I get the second database in the settings.py – whoisearth Jun 22 '15 at 02:55
  • confirmed this is due to having multiple databases. Luckly I'm not at the point of adding another one yet so I've removed it for now :) – whoisearth Jun 22 '15 at 03:01
  • Sounds like multiple databases are a mess. Haven't worked with them personally. Glad you resolved your issue. – Ashish Acharya Jun 22 '15 at 03:01

0 Answers0