add Excel and CSV download of templated reports and clean up their HTML formatting...
[freeside.git] / README.1.5.7
1 NOTE: Version numbering has been simplified.  1.5.7 is the version after
2 1.5.0pre6.  It is still a development version - releases with odd numbered 
3 middle parts (NN in x.NN.x) are development versions, like Perl or Linux.
4
5
6 CREATE TABLE rate (
7     ratenum serial NOT NULL,
8     ratename varchar(80) NOT NULL,
9     PRIMARY KEY (ratenum)
10 );
11
12 CREATE TABLE rate_detail (
13     ratenum int NOT NULL,
14     orig_regionnum int NULL,
15     dest_regionnum int NOT NULL,
16     min_included int NOT NULL,
17     min_charge decimal(10,2) NOT NULL,
18     sec_granularity int NOT NULL
19 );
20 CREATE UNIQUE INDEX rate_detail1 ON rate_detail ( ratenum, orig_regionnum, dest_regionnum );
21
22 CREATE TABLE rate_region (
23     regionnum serial NOT NULL,
24     regionname varchar(80) NOT NULL,
25     PRIMARY KEY (regionnum)
26 );
27
28 CREATE TABLE rate_prefix (
29     prefixnum serial NOT NULL,
30     regionnum int NOT NULL, 
31     countrycode varchar(3) NOT NULL,
32     npa varchar(6) NULL,
33     nxx varchar(3) NULL,
34     PRIMARY KEY (prefixnum)
35 );
36 CREATE INDEX rate_prefix1 ON rate_prefix ( countrycode );
37 CREATE INDEX rate_prefix2 ON rate_prefix ( regionnum );
38
39 CREATE TABLE reg_code (
40     codenum serial NOT NULL,
41     code varchar(80) NOT NULL,
42     agentnum int NOT NULL,
43     PRIMARY KEY (codenum)
44 );
45 CREATE UNIQUE INDEX reg_code1 ON reg_code ( agentnum, code );
46 CREATE INDEX reg_code2 ON reg_code ( agentnum );
47
48 CREATE TABLE reg_code_pkg (
49     codenum int NOT NULL,
50     pkgpart int NOT NULL
51 );
52 CREATE UNIQUE INDEX reg_code_pkg1 ON reg_code_pkg ( codenum, pkgpart );
53 CREATE INDEX reg_code_pkg2 ON reg_code_pkg ( codenum );
54
55 CREATE TABLE clientapi_session (
56     sessionnum serial NOT NULL,
57     sessionid varchar(80) NOT NULL,
58     namespace varchar(80) NOT NULL,
59     PRIMARY KEY (sessionnum)
60 );
61 CREATE UNIQUE INDEX clientapi_session1 ON clientapi_session ( sessionid, namespace );
62
63 CREATE TABLE clientapi_session_field (
64     fieldnum serial NOT NULL,
65     sessionnum int NOT NULL,
66     fieldname varchar(80) NOT NULL,
67     fieldvalue text NULL,
68     PRIMARY KEY (fieldnum)
69 );
70 CREATE UNIQUE INDEX clientapi_session_field1 ON clientapi_session_field ( sessionnum, fieldname );
71
72 ALTER TABLE part_pkg ADD promo_code varchar(80) NULL;
73 ALTER TABLE h_part_pkg ADD promo_code varchar(80) NULL;
74 CREATE INDEX part_pkg2 ON part_pkg ( promo_code );
75 CREATE INDEX h_part_pkg2 ON h_part_pkg ( promo_code );
76
77 ALTER TABLE cust_main ALTER COLUMN zip DROP NOT NULL;
78 ALTER TABLE h_cust_main ALTER COLUMN zip DROP NOT NULL;
79
80 Installs w/integrated RT:
81   CREATE SEQUENCE attributes_id_seq;
82
83   CREATE TABLE Attributes (
84     id INTEGER DEFAULT nextval('attributes_id_seq'),
85     Name varchar(255) NOT NULL  ,
86     Description varchar(255) NULL  ,
87     Content text,
88     ContentType varchar(16),
89     ObjectType varchar(64),
90     ObjectId integer, -- foreign key to anything
91     Creator integer NOT NULL DEFAULT 0  ,
92     Created TIMESTAMP NULL  ,
93     LastUpdatedBy integer NOT NULL DEFAULT 0  ,
94     LastUpdated TIMESTAMP NULL  ,
95     PRIMARY KEY (id)
96   
97   );
98   
99   CREATE INDEX Attributes1 on Attributes(Name);
100   CREATE INDEX Attributes2 on Attributes(ObjectType, ObjectId);
101
102
103 dbdef-create username
104 create-history-tables username rate rate_detail rate_region rate_prefix reg_code reg_code_pkg
105 dbdef-create username
106
107 install Javascript::RPC (JavaScript::RPC::Server::CGI), Text::CSV_XS and
108 Spreadsheet::WriteExcel
109
110 afterwords (for installs w/integrated RT):
111 make configure-rt
112 make deploy
113 /opt/rt3/sbin/rt-setup-database --action insert --datadir etc/upgrade/3.1.15
114 /opt/rt3/sbin/rt-setup-database --action insert --datadir etc/upgrade/3.1.17
115