Closed y3pio closed 3 years ago
Interesting. Is there no DB migration files?
Interesting. Is there no DB migration files?
Added instructions on how to get the latest dump of the Heroku DB, but I can also include a copy of the file if you'd like.
You mean this? https://docs.djangoproject.com/en/3.1/topics/migrations/
You mean this? https://docs.djangoproject.com/en/3.1/topics/migrations/
No, I did not use Django's migration methods. I did it directly through MySQL via the mysqldump
command.
Included the below command to run in the README:
mysqldump --no-tablespaces --column-statistics=0 --host=us-cdbr-east-03.cleardb.com --user=be05ffb901b132 --password=3d94000c heroku_4ac11fb2946b4e7 > sql_dump_file.sql
Please let me know if this is ok? If not I can look into using the migration method you posted.
You mean this? https://docs.djangoproject.com/en/3.1/topics/migrations/
No, I did not use Django's migration methods. I did it directly through MySQL via the
mysqldump
command.Included the below command to run in the README:
mysqldump --no-tablespaces --column-statistics=0 --host=us-cdbr-east-03.cleardb.com --user=be05ffb901b132 --password=3d94000c heroku_4ac11fb2946b4e7 > sql_dump_file.sql
Please let me know if this is ok? If not I can look into using the migration method you posted.
Hm. My understanding is that, if I install the web app on a new environment, there should be a way (probably through migrations but not sure) to create the schema on the DB that is initially empty. As such, requiring a SQL dump from an existing DB to setup a new environment doesn't sound correct to me. The schema is already embedded in the model layer of the Django web app. As such, it should already know how to create the schema with no data.
This may not be a problem with the documentation but rather the setup process.
@y3pio needs to write up the instructions for creating an admin account. Thanks, @y3pio!
Instructions for creating an empty database would be the default. Then, if we want some "test" data, we have instructions on how to get that.
@y3pio: Can't get the migration to create a new DB. May have to create SQL dump files, one with an empty DB and the other with some data (can be outdated).
@tatianacv: Just run the migrate command to create the tables.
@tatianacv, please try to reproduce this migration (error) using a fresh install (empty or no previously existing DB).
What's the status of this, guys? Were we able to reproduce @y3pio's issue?
What's the status of this, guys? Were we able to reproduce @y3pio's issue?
I added a comment on the issue where I explain. https://github.com/ponder-lab/Imperative-DL-Study-Web-App/issues/39
Updated the PR with the SQL dump file, and also update the README to reflect the need to import the mysql dump file before running the migrate command.
Closes #39