How can I get Django to create index after database is already built? Do I need to create them on the database tab?
I added 'db_index=True' to the columns that I want to become indexes in models.py.
Then I run this command:
python manage.py makemigrations --name add_index_fake
Then I try to migrate the changes and I get this - it recognizes the change, but does not create an index:
python manage.py sqlmigrate my_app migration_name BEGIN; -- -- Alter field 'columnname' on table -- COMMIT;
But I'm not getting this:
CREATE INDEX xxxxxx ON "xxxx" ("sold_at"); COMMIT;