2 <title>Upgrading to 1.4.0</title>
5 <h1>Upgrading to 1.4.0 from 1.3.1</h1>
7 <li>If migrating from less than 1.3.1, see these <a href="upgrade7.html">instructions</a> first.
8 <li>Back up your data and current Freeside installation.
9 <li>Install <a href="http://www.apache-asp.org/">Apache::ASP</a> or <a href="http://www.masonhq.com/">HTML::Mason</a>.
13 <th>Apache::ASP</th><th>Mason</th>
17 <li>Run <tt>make aspdocs</tt>
18 <li>Copy <tt>aspdocs/</tt> to your web server's document space.
19 <li>Create a <a href="http://www.apache-asp.org/config.html#Global">Global</a> directory, such as <tt>/usr/local/etc/freeside/asp-global/</tt>
20 <li>Copy <tt>htetc/global.asa</tt> to the Global directory.
21 <li>Configure Apache for the Global directory and to execute .cgi files using Apache::ASP. For example:
23 <Directory /usr/local/apache/htdocs/freeside-asp>
24 <Files ~ (\.cgi)>
25 AddHandler perl-script .cgi
26 PerlHandler Apache::ASP
29 $MLDBM::RemoveTaint = 1;
31 PerlSetVar Global /usr/local/etc/freeside/asp-global/
36 <li>Run <tt>make masondocs</tt>
37 <li>Copy <tt>masondocs/</tt> to your web server's document space.
38 <li>Copy <tt>htetc/handler.pl</tt> to your web server's configuration directory.
39 <li>Edit <tt>handler.pl</tt> and set an appropriate <tt>data_dir</tt>, such as <tt>/usr/local/etc/freeside/mason-data</tt>
40 <li>Configure Apache to use the <tt>handler.pl</tt> file and to execute .cgi files using HTML::Mason. For example:
42 <Directory /usr/local/apache/htdocs/freeside-mason>
43 <Files ~ (\.cgi)>
44 AddHandler perl-script .cgi
45 PerlHandler HTML::Mason
48 require "/usr/local/apache/conf/handler.pl";
56 <li>Change to the FS directory in the new tarball, and build and install the
63 # make install UNINST=1</pre>
64 <li>Apply the following changes to your database:
66 CREATE TABLE svc_forward (
73 ALTER TABLE svc_acct ADD domsvc integer NOT NULL;
74 ALTER TABLE svc_domain ADD catchall integer;
75 ALTER TABLE part_svc ADD svc_acct__domsvc integer NULL;
76 ALTER TABLE part_svc ADD svc_acct__domsvc_flag char(1) NULL;
77 ALTER TABLE part_svc ADD svc_domain__catchall integer NULL;
78 ALTER TABLE part_svc ADD svc_domain__catchall_flag char(1) NULL;
79 ALTER TABLE part_svc ADD svc_forward__srcsvc integer NULL;
80 ALTER TABLE part_svc ADD svc_forward__srcsvc_flag char(1) NULL;
81 ALTER TABLE part_svc ADD svc_forward__dstsvc integer NULL;
82 ALTER TABLE part_svc ADD svc_forward__dstsvc_flag char(1) NULL;
83 ALTER TABLE part_svc ADD svc_forward__dst integer NULL;
84 ALTER TABLE part_svc ADD svc_forward__dst_flag char(1) NULL;
88 <li>If you are using PostgreSQL, apply the following changes to your database:
90 CREATE UNIQUE INDEX agent_pkey ON agent ( agentnum );
91 CREATE UNIQUE INDEX agent_type_pkey agent_type ( typenum );
92 CREATE UNIQUE INDEX cust_bill_pkey ON cust_bill ( invnum );
93 CREATE UNIQUE INDEX cust_credit_pkey ON cust_credit ( crednum );
94 CREATE UNIQUE INDEX cust_main_pkey ON cust_main ( custnum );
95 CREATE UNIQUE INDEX cust_main_county_pkey ON cust_main_county ( taxnum );
96 CREATE UNIQUE INDEX cust_main_invoice_pkey ON cust_main_invoice ( destnum );
97 CREATE UNIQUE INDEX cust_pay_pkey ON cust_pay ( paynum );
98 CREATE UNIQUE INDEX cust_pkg_pkey ON cust_pkg ( pkgnum );
99 CREATE UNIQUE INDEX cust_refund_pkey ON cust_refund ( refundnum );
100 CREATE UNIQUE INDEX cust_svc_pkey ON cust_svc ( svcnum );
101 CREATE UNIQUE INDEX domain_record_pkey ON domain_record ( recnum );
102 CREATE UNIQUE INDEX nas_pkey ON nas ( nasnum );
103 CREATE UNIQUE INDEX part_pkg_pkey ON part_pkg ( pkgpart );
104 CREATE UNIQUE INDEX part_referral_pkey ON part_referral ( refnum );
105 CREATE UNIQUE INDEX part_svc_pkey ON part_svc ( svcpart );
106 CREATE UNIQUE INDEX port_pkey ON port ( portnum );
107 CREATE UNIQUE INDEX prepay_credit_pkey ON prepay_credit ( prepaynum );
108 CREATE UNIQUE INDEX session_pkey ON session ( sessionnum );
109 CREATE UNIQUE INDEX svc_acct_pkey ON svc_acct ( svcnum );
110 CREATE UNIQUE INDEX svc_acct_pop_pkey ON svc_acct_pop ( popnum );
111 CREATE UNIQUE INDEX svc_acct_sm_pkey ON svc_acct_sm ( svcnum );
112 CREATE UNIQUE INDEX svc_domain_pkey ON svc_domain ( svcnum );
113 CREATE UNIQUE INDEX svc_www_pkey ON svc_www ( svcnum );
114 CREATE UNIQUE INDEX type_pkgs_pkey ON type_pkgs ( typenum );
116 <li>If you wish to enable service/shipping addresses, apply the following
117 changes to your database:
119 ALTER TABLE cust_main ADD COLUMN ship_last varchar(80) NULL;
120 ALTER TABLE cust_main ADD COLUMN ship_first varchar(80) NULL;
121 ALTER TABLE cust_main ADD COLUMN ship_company varchar(80) NULL;
122 ALTER TABLE cust_main ADD COLUMN ship_address1 varchar(80) NULL;
123 ALTER TABLE cust_main ADD COLUMN ship_address2 varchar(80) NULL;
124 ALTER TABLE cust_main ADD COLUMN ship_city varchar(80) NULL;
125 ALTER TABLE cust_main ADD COLUMN ship_county varchar(80) NULL;
126 ALTER TABLE cust_main ADD COLUMN ship_state varchar(80) NULL;
127 ALTER TABLE cust_main ADD COLUMN ship_zip varchar(10) NULL;
128 ALTER TABLE cust_main ADD COLUMN ship_country char(2) NULL;
129 ALTER TABLE cust_main ADD COLUMN ship_daytime varchar(20) NULL;
130 ALTER TABLE cust_main ADD COLUMN ship_night varchar(20) NULL;
131 ALTER TABLE cust_main ADD COLUMN ship_fax varchar(12) NULL;
132 CREATE INDEX cust_main1 ON cust_main ( ship_last );
133 CREATE INDEX cust_main2 ON cust_main ( ship_company );
135 <li>If you wish to enable customer comments, apply the following change to
138 ALTER TABLE cust_main ADD COLUMN comments varchar NULL;
140 <li>Run bin/dbdef-create.
141 <li>create a service based on svc_forward
142 <li>Run bin/fs-migrate-svc_acct_sm
143 <li>create the conf.dbsrc/user_policy as appropriate for your site