add HTML::Scrubber to rt install/upgrade docs
[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 install DBIx::DBSchema 0.24
6
7 CREATE TABLE rate (
8     ratenum serial NOT NULL,
9     ratename varchar(80) NOT NULL,
10     PRIMARY KEY (ratenum)
11 );
12
13 CREATE TABLE rate_detail (
14     ratenum int NOT NULL,
15     orig_regionnum int NULL,
16     dest_regionnum int NOT NULL,
17     min_included int NOT NULL,
18     min_charge decimal(10,2) NOT NULL,
19     sec_granularity int NOT NULL
20 );
21 CREATE UNIQUE INDEX rate_detail1 ON rate_detail ( ratenum, orig_regionnum, dest_regionnum );
22
23 CREATE TABLE rate_region (
24     regionnum serial NOT NULL,
25     regionname varchar(80) NOT NULL,
26     PRIMARY KEY (regionnum)
27 );
28
29 CREATE TABLE rate_prefix (
30     prefixnum serial NOT NULL,
31     regionnum int NOT NULL, 
32     countrycode varchar(3) NOT NULL,
33     npa varchar(6) NULL,
34     nxx varchar(3) NULL,
35     PRIMARY KEY (prefixnum)
36 );
37 CREATE INDEX rate_prefix1 ON rate_prefix ( countrycode );
38 CREATE INDEX rate_prefix2 ON rate_prefix ( regionnum );
39
40 CREATE TABLE reg_code (
41     codenum serial NOT NULL,
42     code varchar(80) NOT NULL,
43     agentnum int NOT NULL,
44     PRIMARY KEY (codenum)
45 );
46 CREATE UNIQUE INDEX reg_code1 ON reg_code ( agentnum, code );
47 CREATE INDEX reg_code2 ON reg_code ( agentnum );
48
49 CREATE TABLE reg_code_pkg (
50     codenum int NOT NULL,
51     pkgpart int NOT NULL
52 );
53 CREATE UNIQUE INDEX reg_code_pkg1 ON reg_code_pkg ( codenum, pkgpart );
54 CREATE INDEX reg_code_pkg2 ON reg_code_pkg ( codenum );
55
56 CREATE TABLE clientapi_session (
57     sessionnum serial NOT NULL,
58     sessionid varchar(80) NOT NULL,
59     namespace varchar(80) NOT NULL,
60     PRIMARY KEY (sessionnum)
61 );
62 CREATE UNIQUE INDEX clientapi_session1 ON clientapi_session ( sessionid, namespace );
63
64 CREATE TABLE clientapi_session_field (
65     fieldnum serial NOT NULL,
66     sessionnum int NOT NULL,
67     fieldname varchar(80) NOT NULL,
68     fieldvalue text NULL,
69     PRIMARY KEY (fieldnum)
70 );
71 CREATE UNIQUE INDEX clientapi_session_field1 ON clientapi_session_field ( sessionnum, fieldname );
72
73 ALTER TABLE part_pkg ADD promo_code varchar(80) NULL;
74 ALTER TABLE h_part_pkg ADD promo_code varchar(80) NULL;
75 CREATE INDEX part_pkg2 ON part_pkg ( promo_code );
76 CREATE INDEX h_part_pkg2 ON h_part_pkg ( promo_code );
77
78 ALTER TABLE cust_main ALTER COLUMN zip DROP NOT NULL;
79 ALTER TABLE h_cust_main ALTER COLUMN zip DROP NOT NULL;
80
81 ALTER TABLE prepay_credit ADD agentnum integer NULL;
82 ALTER TABLE h_prepay_credit ADD agentnum integer NULL;
83
84 Installs w/integrated RT:
85   CREATE SEQUENCE attributes_id_seq;
86
87   CREATE TABLE Attributes (
88     id INTEGER DEFAULT nextval('attributes_id_seq'),
89     Name varchar(255) NOT NULL  ,
90     Description varchar(255) NULL  ,
91     Content text,
92     ContentType varchar(16),
93     ObjectType varchar(64),
94     ObjectId integer, -- foreign key to anything
95     Creator integer NOT NULL DEFAULT 0  ,
96     Created TIMESTAMP NULL  ,
97     LastUpdatedBy integer NOT NULL DEFAULT 0  ,
98     LastUpdated TIMESTAMP NULL  ,
99     PRIMARY KEY (id)
100   
101   );
102   
103   CREATE INDEX Attributes1 on Attributes(Name);
104   CREATE INDEX Attributes2 on Attributes(ObjectType, ObjectId);
105
106
107 (make sure you have upgrade DBIx::DBSchema to 0.24)
108 dbdef-create username 
109 create-history-tables username rate rate_detail rate_region rate_prefix reg_code reg_code_pkg
110 dbdef-create username
111
112 install Javascript::RPC (JavaScript::RPC::Server::CGI), Text::CSV_XS,
113 Spreadsheet::WriteExcel, IO-stringy (IO::Scalar), Frontier::RPC
114 (Frontier::RPC2) and MIME::Entity (MIME-tools)
115
116 afterwords (for installs w/integrated RT):
117 install HTML::Scrubber and Text::Quoted
118 make configure-rt
119 make deploy
120 /opt/rt3/sbin/rt-setup-database --action insert --datadir etc/upgrade/3.1.15
121 /opt/rt3/sbin/rt-setup-database --action insert --datadir etc/upgrade/3.1.17
122