Skip to content

Commit

Permalink
Refactor to use new view based CRM_V2 models (#566)
Browse files Browse the repository at this point in the history
https://eaflood.atlassian.net/browse/WATER-4057

As part of the work we have been doing on two-part tariff, we will be creating all our new tables in the default `public` schema.

We have also decided that when there is a legacy table that we are still going to need we will create a [View](https://www.postgresql.org/docs/current/sql-createview.html) of it in the `public` schema. This allows us to correct any issues with naming conventions, strip out unused fields, and join entities currently sat in different schemas. The first example of this approach was done in PR #531 .

We created the new views in [Create CRM_V2 schema views](#556). Then in [Create CRM_V2 schema models and helpers](#561) we added the new models and helpers that use them.

This is the final step in the process, we are refactoring any use of the legacy models to use the new ones and deleting all the legacy-based code.
  • Loading branch information
Cruikshanks authored Dec 5, 2023
1 parent 05a8fcc commit 65cb797
Show file tree
Hide file tree
Showing 35 changed files with 270 additions and 1,689 deletions.
42 changes: 0 additions & 42 deletions app/models/crm-v2/address.model.js

This file was deleted.

66 changes: 0 additions & 66 deletions app/models/crm-v2/billing-account-address.model.js

This file was deleted.

50 changes: 0 additions & 50 deletions app/models/crm-v2/billing-account.model.js

This file was deleted.

82 changes: 0 additions & 82 deletions app/models/crm-v2/company.model.js

This file was deleted.

113 changes: 0 additions & 113 deletions app/models/crm-v2/contact.model.js

This file was deleted.

25 changes: 0 additions & 25 deletions app/models/crm-v2/crm-v2-base.model.js

This file was deleted.

Loading

0 comments on commit 65cb797

Please sign in to comment.