yerassyl
yerassyl

Reputation: 3048

Django on AWS EC2 and RDS

I am trying to deploy django app on AWS by using EC2 and RDS services. I have created EC2 and RDS containers.

Here is how i try to connect to my database.

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.mysql',
        'NAME': 'db name',
        'USER': 'my user',
        'PASSWORD': 'my password',
        'HOST': 'awshost',
        'PORT': '3306',
        'OPTIONS': {
            'charset': 'utf8mb4',
        },
    }
}

For name, user, password, host, port I provide details from my RDS instance running. When I do: python manage.py migrate, It says there is no migration to apply. If I try to makemigrations, It says no changes detected. If I connect to database directly from terminal and list tables: I see one table django_migrations, which is empty. How should I migrate my db?

I know this explanation is quite broad, I will try narrow it down, accordingly. For now I dont't know what else is important to this issue.

Upvotes: 0

Views: 1151

Answers (1)

kmcodes
kmcodes

Reputation: 857

Run makemigrations and specify the app name. The migrations folder needs to be created.Your app must be included in INSTALLED_APPS first.

./manage.py makemigrations <myapp>

Upvotes: 1

Related Questions