- 
    Task 
- 
    Resolution: Unresolved
- 
    Normal 
- 
    None
- 
    None
- 
    None
- 
        True
- 
        
- 
        False
- 
        subs-swatch-lightning
- 
        
- 
        
Now that the subscription_measurements uses the subscription_number column, we can add a relationship between the contracts table to subscription_measurements, and stop using the contract_metrics.
The additional advantage is that the subscriptions capacity view will start working as it is (without additional changes) with the contract based products.
Complexity:
- Requires data migration from contracts_metrics to subscription_measurements
- Update MeasurementMetricIdTransformer to stop populating the contracts_metrics
- Update the capacity API to not normalize the metrics anylonger, since the subscription_measurements table already has the metric ID normalized.
For refinement:
- Find the component test that is asserting this logic. If none, create a ticket to add one.
- depends on
- 
                    SWATCH-2419 Change the primary key for the subscriptions table from subscription id, start date to subscription number and start data -         
- Backlog
 
-         
- 
                    SWATCH-3770 Spike: Investigate how would affect the data changes having multiple subscriptions with same ID -         
- Closed
 
-         
- is blocked by
- 
                    SWATCH-3887 Swatch doesn't utilize IT Partner Gateway unsubscribed status -         
- Backlog
 
-         
- 
                    SWATCH-3867 Subscription_measurements missing data from contract_metrics -         
- Release Pending
 
-         
- is depended on by
- 
                    SWATCH-3769 Remove ContractEntity and migrate vendor_product_code -         
- Backlog
 
-         
- relates to
- 
                    SWATCH-3770 Spike: Investigate how would affect the data changes having multiple subscriptions with same ID -         
- Closed
 
-