fb51bfb8e033be83bc6d41987936a3b6123c1f21
[freeside.git] / httemplate / docs / upgrade10.html
1 <pre>
2 this is incomplete
3
4 NOTE: Version numbering has been simplified.  1.5.7 is the version after
5 1.5.0pre6.  It is still a development version - releases with odd numbered 
6 middle parts (NN in x.NN.x) are development versions, like Perl or Linux.
7
8 If migrating from 1.5.7, see README.1.5.8 instead
9
10 If migrating from 1.5.0pre6, see README.1.5.7 instead
11
12 install DBD::Pg 1.32, 1.41 or later (not 1.40) (or, if you're using a Perl version before 5.6, you could try installing DBD::Pg 1.22 with <a href="http://420.am/~ivan/DBD-Pg-1.22-fixvercmp.patch">this patch</a> and commenting out the "use DBD::Pg 1.32" at the top of DBIx/DBSchema/DBD/Pg.pm)
13 install DBIx::DBSchema 0.26
14 install Net::SSH 0.08
15 install HTML::Widgets::SelectLayers 0.05
16
17 - If using Apache::ASP, add PerlSetVar RequestBinaryRead Off and PerlSetVar IncludesDir /your/freeside/document/root/ to your Apache configuration and make sure you are using Apache::ASP minimum version 2.55.
18 - In httpd.conf, change &lt;Files ~ \.cgi&gt; to  &lt;Files ~ (\.cgi|\.html)&gt;
19 - In httpd.conf, change <b>AddHandler perl-script .cgi</b> or <b>SetHandler perl-script</b> to <b>AddHandler perl-script .cgi .html</b>
20
21 install NetAddr::IP, Chart::Base, Locale::SubCountry, Text::CSV_XS, 
22 Spreadsheet::WriteExcel, IO-stringy (IO::Scalar), Frontier::RPC
23 (Frontier::RPC2), MIME::Entity (MIME-tools) and IPC::Run3
24 <!-- and Crypt::YAPassGen-->
25
26 INSERT INTO msgcat ( msgnum, msgcode, locale, msg ) VALUES ( 20, 'svc_external-id', 'en_US', 'External ID' );
27 INSERT INTO msgcat ( msgnum, msgcode, locale, msg ) VALUES ( 21, 'svc_external-title', 'en_US', 'Title' );
28
29 DROP INDEX cust_bill_pkg1;
30
31 On recent Pg versions:
32
33 ALTER TABLE cust_main ALTER COLUMN payinfo varchar(512) NULL;
34 ALTER TABLE h_cust_main ALTER COLUMN payinfo varchar(512) NULL;
35
36 Or on older Pg versions that don't support altering columns directly:
37 (write me)
38
39 On recent Pg versions:
40
41 ALTER TABLE svc_forward ALTER COLUMN srcsvc DROP NOT NULL;
42 ALTER TABLE h_svc_forward ALTER COLUMN srcsvc DROP NOT NULL;
43 ALTER TABLE svc_forward ALTER COLUMN dstsvc DROP NOT NULL;
44 ALTER TABLE h_svc_forward ALTER COLUMN dstsvc DROP NOT NULL;
45 ALTER TABLE cust_main ALTER COLUMN zip DROP NOT NULL;
46 ALTER TABLE h_cust_main ALTER COLUMN zip DROP NOT NULL;
47
48 Or on Pg versions that don't support DROP NOT NULL (tested on 7.1 and 7.2 so far):
49 UPDATE pg_attribute SET attnotnull = FALSE WHERE ( attname = 'srcsvc' OR attname = 'dstsvc' ) AND ( attrelid = ( SELECT oid FROM pg_class WHERE relname = 'svc_forward' ) OR attrelid = ( SELECT oid FROM pg_class WHERE relname = 'h_svc_forward' ) );
50 UPDATE pg_attribute SET attnotnull = FALSE WHERE ( attname = 'zip' ) AND ( attrelid = ( SELECT oid FROM pg_class WHERE relname = 'cust_main' ) OR attrelid = ( SELECT oid FROM pg_class WHERE relname = 'h_cust_main' ) );
51
52 If you created your database with a version before 1.4.2, dump database, edit:
53 - cust_main and h_cust_main: increase otaker from 8 to 32
54 - cust_main and h_cust_main: change ss from char(11) to varchar(11) ( "character(11)" to "character varying(11)" )
55 - cust_credit and h_cust_credit: increase otaker from 8 to 32
56 - cust_pkg and h_cust_pkg: increase otaker from 8 to 32
57 - cust_refund and h_cust_refund: increase otaker from 8 to 32
58 - domain_record and h_domain_record: increase reczone from 80 to 255
59 - domain_record and h_domain_record: change rectype from char to varchar ( "character(5)" to "character varying(5)" )
60 - domain_record and h_domain_record: increase recdata from 80 to 255
61 then reload
62
63 mandatory again:
64
65 make install-perl-modules to install the new libraries and CLI utilities
66 run "freeside-upgrade username" to create the remaining new tables and columns
67
68 optionally:
69
70 CREATE INDEX cust_main6 ON cust_main ( daytime );
71 CREATE INDEX cust_main7 ON cust_main ( night );
72 CREATE INDEX cust_main8 ON cust_main ( fax );
73 CREATE INDEX cust_main9 ON cust_main ( ship_daytime );
74 CREATE INDEX cust_main10 ON cust_main ( ship_night );
75 CREATE INDEX cust_main11 ON cust_main ( ship_fax );
76 CREATE INDEX agent2 ON agent ( disabled );
77 CREATE INDEX part_bill_event2 ON part_bill_event ( disabled );
78 CREATE INDEX cust_pay4 ON cust_pay (_date);
79 CREATE INDEX part_referral1 ON part_referral ( disabled );
80 CREATE INDEX part_pkg2 ON part_pkg ( promo_code );
81 CREATE INDEX h_part_pkg2 ON h_part_pkg ( promo_code );
82
83 apache - fix <Files> sections to include .html also
84
85 </pre>