Difference between revisions of "Freeside:1.7:Documentation:Upgrading"

From Freeside
Jump to: navigation, search
(README.1.7.0)
 
(removing spam)
 
(44 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 +
* Perl 5.8.0 or newer is required.  Perl 5.8.3 or newer is required if using RT.
 
* Install DBIx::DBSchema 0.31 (or later)
 
* Install DBIx::DBSchema 0.31 (or later)
 +
* Install HTML::Widgets::SelectLayers 0.06 (or later)
 +
* Install DBIx::SearchBuilder 1.34 (or later)
 
* Install Color::Scheme
 
* Install Color::Scheme
 
* Install Data::Table
 
* Install Data::Table
* Apply the following changes to your database: <pre><nowiki>
+
* Install Lingua::EN::NameParse
ALTER TABLE cust_pay_batch ADD COLUMN batchnum int;
+
* Install Lingua::EN::Inflect
ALTER TABLE cust_pay_batch ALTER COLUMN batchnum SET NOT NULL;
+
* Install DateTime
 +
* Install DateTime::Format::Strptime
 +
* Install Number::Format 1.50 (or later)
 +
* Apply the following changes to your database:  
 +
<pre>
 
ALTER TABLE cust_pay_batch ADD COLUMN payinfo varchar(512);
 
ALTER TABLE cust_pay_batch ADD COLUMN payinfo varchar(512);
 
UPDATE cust_pay_batch SET payinfo = cardnum;
 
UPDATE cust_pay_batch SET payinfo = cardnum;
 
ALTER TABLE cust_pay_batch DROP COLUMN cardnum;
 
ALTER TABLE cust_pay_batch DROP COLUMN cardnum;
 
ALTER TABLE cust_pay_batch ALTER COLUMN exp DROP NOT NULL;
 
ALTER TABLE cust_pay_batch ALTER COLUMN exp DROP NOT NULL;
 +
 
ALTER TABLE h_cust_pay_batch ADD COLUMN payinfo varchar(512);
 
ALTER TABLE h_cust_pay_batch ADD COLUMN payinfo varchar(512);
 
UPDATE h_cust_pay_batch SET payinfo = cardnum;
 
UPDATE h_cust_pay_batch SET payinfo = cardnum;
 
ALTER TABLE h_cust_pay_batch DROP COLUMN cardnum;
 
ALTER TABLE h_cust_pay_batch DROP COLUMN cardnum;
 
ALTER TABLE h_cust_pay_batch ALTER COLUMN exp DROP NOT NULL;
 
ALTER TABLE h_cust_pay_batch ALTER COLUMN exp DROP NOT NULL;
</nowiki></pre>
+
</pre>
 +
* Apply the following changes to your database (if you have a paymask column):
 +
<pre>
 +
UPDATE cust_main SET paymask = NULL WHERE paymask LIKE 'x%';
 +
</pre>
 
* <code>make install-perl-modules</code>
 
* <code>make install-perl-modules</code>
 
* As the freeside UNIX user, run <code>freeside-upgrade username</code>, passing the username of an internal Freeside user.
 
* As the freeside UNIX user, run <code>freeside-upgrade username</code>, passing the username of an internal Freeside user.
 
* If freeside-upgrade hangs, try stopping Apache, all Freeside processes, and anything else connected to your database, especially on older PostgreSQL versions.
 
* If freeside-upgrade hangs, try stopping Apache, all Freeside processes, and anything else connected to your database, especially on older PostgreSQL versions.
* <code>pg_attribute: permission denied executing: UPDATE pg_attribute</code> when running freeside-upgrade with Pg 7.3 or older?  Try this:<pre><nowiki>
+
* <code>pg_attribute: permission denied executing: UPDATE pg_attribute</code> when running freeside-upgrade with Pg 7.3 or older?  Try this:
 +
<pre>
 
ALTER TABLE cust_pay_batch ADD COLUMN payby char(4);
 
ALTER TABLE cust_pay_batch ADD COLUMN payby char(4);
 
ALTER TABLE h_cust_pay_batch ADD COLUMN payby char(4);
 
ALTER TABLE h_cust_pay_batch ADD COLUMN payby char(4);
 
ALTER TABLE cust_pay_batch ALTER COLUMN payby SET NOT NULL;
 
ALTER TABLE cust_pay_batch ALTER COLUMN payby SET NOT NULL;
 
ALTER TABLE h_cust_pay_batch ALTER COLUMN payby SET NOT NULL;
 
ALTER TABLE h_cust_pay_batch ALTER COLUMN payby SET NOT NULL;
</nowiki></pre>
+
</pre>
 
* ACL bootstrapping:
 
* ACL bootstrapping:
** <pre><nowiki>
+
<pre>
 
su
 
su
 
cd /usr/local/etc/freeside
 
cd /usr/local/etc/freeside
 
chown freeside mapsecrets htpasswd
 
chown freeside mapsecrets htpasswd
</nowiki></pre>
+
</pre>
 
** As the freeside UNIX user, run <code>bin/mapsecrets2access_user username</code>, passing the username of an internal Freeside user.
 
** As the freeside UNIX user, run <code>bin/mapsecrets2access_user username</code>, passing the username of an internal Freeside user.
 
** Using the web interface you can add more restrictive groups and move your employees into them.
 
** Using the web interface you can add more restrictive groups and move your employees into them.
 
* If you have any records in the cust_tax_exempt table, you *MUST* migrate them to the new cust_tax_exempt_pkg table.  An example script to get you started is in <code>bin/fs-migrate-cust_tax_exempt</code> - it may need to be customized for your specific data.
 
* If you have any records in the cust_tax_exempt table, you *MUST* migrate them to the new cust_tax_exempt_pkg table.  An example script to get you started is in <code>bin/fs-migrate-cust_tax_exempt</code> - it may need to be customized for your specific data.
* Optional for better zip code report performance: <pre><nowiki>
+
* Optional to eliminate harmless but noisy warnings:  
CREATE INDEX cust_main16 on cust_main ( zip );
+
<pre>
CREATE INDEX cust_main17 on cust_main ( ship_zip );
 
</nowiki></pre>
 
* Optional if you're using the new agent cust ref#s: <pre><nowiki>
 
CREATE UNIQUE INDEX cust_main18 ON cust_main ( agentnum, agent_custid );
 
</nowiki></pre>
 
* Optional to eliminate harmless but noisy warnings: <pre><nowiki>
 
 
UPDATE cust_main_county SET exempt_amount = 0 WHERE exempt_amount IS NULL;
 
UPDATE cust_main_county SET exempt_amount = 0 WHERE exempt_amount IS NULL;
</nowiki></pre>
+
</pre>
 
* <code>make install-docs</code> (or <code>make deploy</code> if you've got everything setup for that in the Makefile)
 
* <code>make install-docs</code> (or <code>make deploy</code> if you've got everything setup for that in the Makefile)
 
* Perl module errors?  Try <code>make clean</code> then <code>make install-perl-modules</code> then <code>make install-docs</code> or <code>make deploy</code> again
 
* Perl module errors?  Try <code>make clean</code> then <code>make install-perl-modules</code> then <code>make install-docs</code> or <code>make deploy</code> again

Latest revision as of 10:51, 12 January 2009

  • Perl 5.8.0 or newer is required. Perl 5.8.3 or newer is required if using RT.
  • Install DBIx::DBSchema 0.31 (or later)
  • Install HTML::Widgets::SelectLayers 0.06 (or later)
  • Install DBIx::SearchBuilder 1.34 (or later)
  • Install Color::Scheme
  • Install Data::Table
  • Install Lingua::EN::NameParse
  • Install Lingua::EN::Inflect
  • Install DateTime
  • Install DateTime::Format::Strptime
  • Install Number::Format 1.50 (or later)
  • Apply the following changes to your database:
ALTER TABLE cust_pay_batch ADD COLUMN payinfo varchar(512);
UPDATE cust_pay_batch SET payinfo = cardnum;
ALTER TABLE cust_pay_batch DROP COLUMN cardnum;
ALTER TABLE cust_pay_batch ALTER COLUMN exp DROP NOT NULL;

ALTER TABLE h_cust_pay_batch ADD COLUMN payinfo varchar(512);
UPDATE h_cust_pay_batch SET payinfo = cardnum;
ALTER TABLE h_cust_pay_batch DROP COLUMN cardnum;
ALTER TABLE h_cust_pay_batch ALTER COLUMN exp DROP NOT NULL;
  • Apply the following changes to your database (if you have a paymask column):
UPDATE cust_main SET paymask = NULL WHERE paymask LIKE 'x%';
  • make install-perl-modules
  • As the freeside UNIX user, run freeside-upgrade username, passing the username of an internal Freeside user.
  • If freeside-upgrade hangs, try stopping Apache, all Freeside processes, and anything else connected to your database, especially on older PostgreSQL versions.
  • pg_attribute: permission denied executing: UPDATE pg_attribute when running freeside-upgrade with Pg 7.3 or older? Try this:
ALTER TABLE cust_pay_batch ADD COLUMN payby char(4);
ALTER TABLE h_cust_pay_batch ADD COLUMN payby char(4);
ALTER TABLE cust_pay_batch ALTER COLUMN payby SET NOT NULL;
ALTER TABLE h_cust_pay_batch ALTER COLUMN payby SET NOT NULL;
  • ACL bootstrapping:
su
cd /usr/local/etc/freeside
chown freeside mapsecrets htpasswd
    • As the freeside UNIX user, run bin/mapsecrets2access_user username, passing the username of an internal Freeside user.
    • Using the web interface you can add more restrictive groups and move your employees into them.
  • If you have any records in the cust_tax_exempt table, you *MUST* migrate them to the new cust_tax_exempt_pkg table. An example script to get you started is in bin/fs-migrate-cust_tax_exempt - it may need to be customized for your specific data.
  • Optional to eliminate harmless but noisy warnings:
UPDATE cust_main_county SET exempt_amount = 0 WHERE exempt_amount IS NULL;
  • make install-docs (or make deploy if you've got everything setup for that in the Makefile)
  • Perl module errors? Try make clean then make install-perl-modules then make install-docs or make deploy again