facebookarchive / CommunityCellularManager

Tool for deploying, managing and controlling your Community Cellular Networks
Other
87 stars 36 forks source link

python manage.py setup_test_db is failing #15

Closed brajabasi closed 7 years ago

brajabasi commented 7 years ago

With the help of vagrant I'm able to create VMs, but getting the following error. django.db.utils.ProgrammingError: relation "endagaweb_clientrelease" does not exist

(endaga) vagrant@endaga-web:~/cloud$ python manage.py setup_test_db ......... django.db.utils.ProgrammingError: relation "endagaweb_clientrelease" does not exist LINE 1: INSERT INTO "endagaweb_clientrelease" ("date", "version", "c...

I verified and found following tables available, but endagaweb_clientrelease is missing.

                      List of relations

Schema | Name | Type | Owner
--------+---------------------------------------+----------+------------ public | account_emailaddress | table | endaga_dev public | account_emailaddress_id_seq | sequence | endaga_dev public | account_emailconfirmation | table | endaga_dev public | account_emailconfirmation_id_seq | sequence | endaga_dev public | auth_group | table | endaga_dev public | auth_group_id_seq | sequence | endaga_dev public | auth_group_permissions | table | endaga_dev public | auth_group_permissions_id_seq | sequence | endaga_dev public | auth_permission | table | endaga_dev public | auth_permission_id_seq | sequence | endaga_dev public | auth_user | table | endaga_dev public | auth_user_groups | table | endaga_dev public | auth_user_groups_id_seq | sequence | endaga_dev public | auth_user_id_seq | sequence | endaga_dev public | auth_user_user_permissions | table | endaga_dev public | auth_user_user_permissions_id_seq | sequence | endaga_dev public | authtoken_token | table | endaga_dev public | django_admin_log | table | endaga_dev public | django_admin_log_id_seq | sequence | endaga_dev public | django_content_type | table | endaga_dev public | django_content_type_id_seq | sequence | endaga_dev public | django_migrations | table | endaga_dev public | django_migrations_id_seq | sequence | endaga_dev public | django_session | table | endaga_dev public | django_site | table | endaga_dev public | django_site_id_seq | sequence | endaga_dev public | geography_columns | view | postgres public | geometry_columns | view | postgres public | guardian_groupobjectpermission | table | endaga_dev public | guardian_groupobjectpermission_id_seq | sequence | endaga_dev public | guardian_userobjectpermission | table | endaga_dev public | guardian_userobjectpermission_id_seq | sequence | endaga_dev public | raster_columns | view | postgres public | raster_overviews | view | postgres public | socialaccount_socialaccount | table | endaga_dev public | socialaccount_socialaccount_id_seq | sequence | endaga_dev public | socialaccount_socialapp | table | endaga_dev public | socialaccount_socialapp_id_seq | sequence | endaga_dev public | socialaccount_socialapp_sites | table | endaga_dev public | socialaccount_socialapp_sites_id_seq | sequence | endaga_dev public | socialaccount_socialtoken | table | endaga_dev public | socialaccount_socialtoken_id_seq | sequence | endaga_dev public | spatial_ref_sys | table | postgres (43 rows)

eprueves commented 7 years ago

replicated this issue on latest commit. The error is caused by the missing ./cloud/endagaweb/migrations/__init__.py file which breaks the Django migrations for those starting from scratch.

brajabasi commented 7 years ago

Thanks for the quick response . How to get ./cloud/endagaweb/migrations/init.py ? I'm not seeing migrations folder

9muir commented 7 years ago

Thanks @eprueves, we had excluded the migrations directory for being shipped to GitHub, but should have added an exception so that the (empty) __init__.py file WAS shipped. I've just pushed it manually as commit https://github.com/facebookincubator/CommunityCellularManager/commit/5cb805ab39d5ca3f63fbe477935c85de6bd1cbb4