Reputation: 495
I'm a new developer for AWS redshift.
As far as, I knew AWS redshift is pretty similar to postgresql
Is there any library or module for manage(like auto-migration, auto migrate) between redshift and Django?
I did create a table and access data by using SQLAlchemy and redshift but I don't know how to do that thing in python Django.
any suggestion or idea is okay!!
I got this error with this command
python manage.py migrate
django.db.migrations.exceptions.MigrationSchemaMissing: Unable to create the django_migrations table (Column "django_migrations.id" has unsupported type "serial".
Upvotes: 0
Views: 698
Reputation: 609
You could easily connect your RedShift services with your Django App.
Try to add the code below to your settings.py
file
DATABASES = {
'default': {
'NAME': '[Your Cluster Name]',
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'USER': '[Username ]',
'PASSWORD': '[Password]',
'HOST': '[Pathname]',
'PORT': 5439,
},
}
But, you need to know that Redshift doesn't enforce primary keys. In my opinion is not a great idea to use Redshift as your default DB in your Django Application as Redshift is a helpful DB for a data warehouse and not for an app.
To sump up, my suggestion is PostgreSQL.
Upvotes: 1