我的項目託管在Heroku最近我想換一列 的大小分貝 但運行makemigrations命令後,然後遷移命令時,它給出了一個錯誤,我不想失去我的數據。如何解決在heroku上託管的django項目中的遷移問題?
H:\shuboy2014>heroku run python manage.py makemigrations posts
Running python manage.py makemigrations posts on shuboy2014... up, run.9067
Migrations for 'posts':
0003_auto_20160608_1404.py:
- Alter field slug on post
H:\shuboy2014>heroku run python manage.py migrate
Running python manage.py migrate on shuboy2014... up, run.3731
Operations to perform:
Apply all migrations: admin, contenttypes, posts, sessions, auth
Running migrations:
No migrations to apply.
Your models have changes that are not yet reflected in a migration, and so won't be applied.
Run 'manage.py makemigrations' to make new migrations, and then re-run 'manage.py migrate' to apply them.
任何有用的建議將是可觀的。
您確定您的更改已反映在遷移文件中嗎? – AndreyT
但我如何才能在heroku上查看它? – shuboy2014
無論如何,您應該將遷移文件提交到您的源代碼管理,我不確定您在這裏問的是什麼 – Sayse