Skip to content

Commit

Permalink
Add defaults to unused returns & lines table columns
Browse files Browse the repository at this point in the history
DEFRA/water-abstraction-team#106

As part of making the migrations work in `water-abstraction-system` we have been creating DB Views of the legacy Returns data that better represent the data as we use it in our new nervice. Part of this exercise is pruning out the unused columns that exist in the legacy tables that are not utilised.

However we have found that for some of the columns in the legacy data, whilst pointless, still need to be populated as they are set to Not Nullable in the legacy database tables. We are therefore going to set a default value for these columns in the legacy DB so that they are always populated even when they do not exist in our new Views.

The tables that will have migrations written for them in this PR are:
- `returns.regime` - this is always "water" so will default to "water"
- `returns.licence_type` - this is always "abstraction" so will default to "abstraction"
- `lines.substance` - surprise, surprise, this is always "water" so will default to "water"
- `lines.unit` - This is always "m³" so will default to "m³"
  • Loading branch information
Jozzey committed Nov 22, 2023
1 parent e2cfe39 commit 53dd6c7
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit 53dd6c7

Please sign in to comment.