This commit was generated by cvs2svn to compensate for changes in r4407,
[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 JSON
13 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)
14 install DBIx::DBSchema 0.26
15 install Net::SSH 0.08
16 install HTML::Widgets::SelectLayers 0.05
17
18 - 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.
19 - In httpd.conf, change &lt;Files ~ \.cgi&gt; to  &lt;Files ~ (\.cgi|\.html)&gt;
20 - In httpd.conf, change <b>AddHandler perl-script .cgi</b> or <b>SetHandler perl-script</b> to <b>AddHandler perl-script .cgi .html</b>
21
22 install NetAddr::IP, Chart::Base, Locale::SubCountry, Text::CSV_XS, 
23 Spreadsheet::WriteExcel, IO-stringy (IO::Scalar), Frontier::RPC
24 (Frontier::RPC2), MIME::Entity (MIME-tools) and IPC::Run3
25 <!-- and Crypt::YAPassGen-->
26
27 INSERT INTO msgcat ( msgnum, msgcode, locale, msg ) VALUES ( 20, 'svc_external-id', 'en_US', 'External ID' );
28 INSERT INTO msgcat ( msgnum, msgcode, locale, msg ) VALUES ( 21, 'svc_external-title', 'en_US', 'Title' );
29
30 DROP INDEX cust_bill_pkg1;
31
32 On recent Pg versions:
33
34 ALTER TABLE cust_main ALTER COLUMN payinfo varchar(512) NULL;
35 ALTER TABLE h_cust_main ALTER COLUMN payinfo varchar(512) NULL;
36
37 Or on older Pg versions that don't support altering columns directly:
38 (write me)
39
40 On recent Pg versions:
41
42 ALTER TABLE svc_forward ALTER COLUMN srcsvc DROP NOT NULL;
43 ALTER TABLE h_svc_forward ALTER COLUMN srcsvc DROP NOT NULL;
44 ALTER TABLE svc_forward ALTER COLUMN dstsvc DROP NOT NULL;
45 ALTER TABLE h_svc_forward ALTER COLUMN dstsvc DROP NOT NULL;
46 ALTER TABLE cust_main ALTER COLUMN zip DROP NOT NULL;
47 ALTER TABLE h_cust_main ALTER COLUMN zip DROP NOT NULL;
48
49 Or on Pg versions that don't support DROP NOT NULL (tested on 7.1 and 7.2 so far):
50 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' ) );
51 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' ) );
52
53 If you created your database with a version before 1.4.2, dump database, edit:
54 - cust_main and h_cust_main: increase otaker from 8 to 32
55 - cust_main and h_cust_main: change ss from char(11) to varchar(11) ( "character(11)" to "character varying(11)" )
56 - cust_credit and h_cust_credit: increase otaker from 8 to 32
57 - cust_pkg and h_cust_pkg: increase otaker from 8 to 32
58 - cust_refund and h_cust_refund: increase otaker from 8 to 32
59 - domain_record and h_domain_record: increase reczone from 80 to 255
60 - domain_record and h_domain_record: change rectype from char to varchar ( "character(5)" to "character varying(5)" )
61 - domain_record and h_domain_record: increase recdata from 80 to 255
62 then reload
63
64 mandatory again:
65
66 make install-perl-modules to install the new libraries and CLI utilities
67 run "freeside-upgrade username" to create the remaining new tables and columns
68
69 optionally:
70
71 CREATE INDEX cust_main6 ON cust_main ( daytime );
72 CREATE INDEX cust_main7 ON cust_main ( night );
73 CREATE INDEX cust_main8 ON cust_main ( fax );
74 CREATE INDEX cust_main9 ON cust_main ( ship_daytime );
75 CREATE INDEX cust_main10 ON cust_main ( ship_night );
76 CREATE INDEX cust_main11 ON cust_main ( ship_fax );
77 CREATE INDEX agent2 ON agent ( disabled );
78 CREATE INDEX part_bill_event2 ON part_bill_event ( disabled );
79 CREATE INDEX cust_pay4 ON cust_pay (_date);
80 CREATE INDEX part_referral1 ON part_referral ( disabled );
81 CREATE INDEX part_pkg2 ON part_pkg ( promo_code );
82 CREATE INDEX h_part_pkg2 ON h_part_pkg ( promo_code );
83
84 apache - fix <Files> sections to include .html also
85
86 </pre>