Changeset 1127


Ignore:
Timestamp:
11/21/06 13:24:59 (7 years ago)
Author:
ijm1
Message:

updated schema views to handle extract functionalily to do with plans and cap rollovers.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ccsd/trunk/dbschema/ccs_billing.schema

    r1117 r1127  
    119119    customer_account a ON c.contact_id=a.contact_id HAVING c.type='customer'; 
    120120 
     121-- List of plans overviews, including rate data. 
     122CREATE VIEW plans AS SELECT p.*, r.plan_name AS rad_plan_name,r.upstream_kbps, 
     123        r.downstream_kbps FROM billing_plan p, radius_plan r WHERE r.plan_id=p.radius_plan; 
     124 
     125-- Gets information needed for rollover. use with "WHERE cap_period='weekly' 
     126-- to get rollovers that are done weekly 
     127CREATE VIEW rollover AS SELECT a.plan_name, a.description, a.price, 
     128        a.included_mb, a.cap_period, b.contact_id FROM billing_plan a,  
     129        customer_state b WHERE b.plan_id=a.plan_id; 
     130         
    121131-- vim: ft=sql 
Note: See TracChangeset for help on using the changeset viewer.