List of relations
Schema | Name | Type | Owner
--------+---------------------------------------+-------+--------------
public | auth_group | table | people_depot
public | auth_group_permissions | table | people_depot
public | auth_permission | table | people_depot
public | core_accomplishment | table | people_depot
public | core_affiliate | table | people_depot
public | core_checktype | table | people_depot
public | core_event | table | people_depot
public | core_eventtype | table | people_depot
public | core_faq | table | people_depot
public | core_faqviewed | table | people_depot
public | core_leadershiptype | table | people_depot
public | core_location | table | people_depot
public | core_modernjobtitle | table | people_depot
public | core_organization | table | people_depot
public | core_permissiontype | table | people_depot
public | core_practicearea | table | people_depot
public | core_programarea | table | people_depot
public | core_project | table | people_depot
public | core_project_affiliate_xref | table | people_depot
public | core_project_project_leads | table | people_depot
public | core_project_stack_element_xref | table | people_depot
public | core_projectprogramareaxref | table | people_depot
public | core_projectsdgxref | table | people_depot
public | core_projectstatus | table | people_depot
public | core_projecturl | table | people_depot
public | core_referrer | table | people_depot
public | core_referrertype | table | people_depot
public | core_sdg | table | people_depot
public | core_sdgtargetindicator | table | people_depot
public | core_skill | table | people_depot
public | core_socbroad | table | people_depot
public | core_socdetailed | table | people_depot
public | core_socmajor | table | people_depot
public | core_socminor | table | people_depot
public | core_stackelement | table | people_depot
public | core_stackelementtype | table | people_depot
public | core_urlstatustype | table | people_depot
public | core_urltype | table | people_depot
public | core_user | table | people_depot
public | core_user_groups | table | people_depot
public | core_user_practice_area_secondary | table | people_depot
public | core_user_practice_area_target_intake | table | people_depot
public | core_user_user_permissions | table | people_depot
public | core_usercheck | table | people_depot
public | core_useremploymenthistory | table | people_depot
public | core_userpermission | table | people_depot
public | core_userstatustype | table | people_depot
public | core_win | table | people_depot
public | core_win_practice_areas | table | people_depot
public | core_win_teams | table | people_depot
public | core_wintype | table | people_depot
public | django_admin_log | table | people_depot
public | django_content_type | table | people_depot
public | django_migrations | table | people_depot
public | django_session | table | people_depot
(55 rows)
Overview
We need to update the
project_affiliate_xreftable model to set the db table name tocore_project_affiliate_xref, because that's the naming convention for all the other tables.Details
The initial model issue: Create Table: project_sponsor_partner_xref #65
Discussion leading to this change is here: See screenshot below where all other tables start with
core_screenshot
Do this by renaming the
db_tablelines inmodels.pyAction Items
Update existing Django model
set the database table name to core_project_affiliate_xref and core_project_stack_element_xref in
models.pygenerate migration file
verify the table name by regenerating the
table-descriptions.csvfileResources
./scripts/Final DB table names after the change
Details
table-descriptions.csv