ponder-lab / Imperative-DL-Study-Web-App

0 stars 0 forks source link

feat: adding run instructions #52

Closed y3pio closed 3 years ago

y3pio commented 3 years ago

Closes #39

khatchad commented 3 years ago

Interesting. Is there no DB migration files?

y3pio commented 3 years ago

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.

khatchad commented 3 years ago

You mean this? https://docs.djangoproject.com/en/3.1/topics/migrations/

y3pio commented 3 years ago

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.

khatchad commented 3 years ago

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.

khatchad commented 3 years ago

This may not be a problem with the documentation but rather the setup process.

khatchad commented 3 years ago

@y3pio needs to write up the instructions for creating an admin account. Thanks, @y3pio!

khatchad commented 3 years ago

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.

khatchad commented 3 years ago

@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).

khatchad commented 3 years ago

@tatianacv: Just run the migrate command to create the tables.

khatchad commented 3 years ago

@tatianacv, please try to reproduce this migration (error) using a fresh install (empty or no previously existing DB).

khatchad commented 3 years ago

What's the status of this, guys? Were we able to reproduce @y3pio's issue?

tatianacv commented 3 years ago

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

y3pio commented 3 years ago

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.