really. backup.
[freeside.git] / httemplate / docs / upgrade8.html
index dfeba65..6d50188 100644 (file)
@@ -5,7 +5,7 @@
 <h1>Upgrading to 1.4.0 from 1.3.1</h1>
 <ul>
   <li>If migrating from less than 1.3.1, see these <a href="upgrade7.html">instructions</a> first.
-  <li>Back up your data and current Freeside installation.
+  <li><font size="+2" color="#ff0000">Backup your database and current Freeside installation.</font> (with&nbsp;<a href="http://www.ca.postgresql.org/devel-corner/docs/postgres/backup.html">PostgreSQL</a>) (with&nbsp;<a href="http://www.mysql.com/documentation/mysql/bychapter/manual_MySQL_Database_Administration.html#Backup">MySQL</a>)
   <li>Install <a href="http://www.apache-asp.org/">Apache::ASP</a> or <a href="http://www.masonhq.com/">HTML::Mason</a>.
 </ul>
 <table>
@@ -61,6 +61,65 @@ $ perl Makefile.PL
 $ make
 $ su
 # make install UNINST=1</pre>
+   <li>Apply the following changes to your database:
+<pre>
+CREATE TABLE svc_forward (
+  svcnum int NOT NULL,
+  srcsvc int NOT NULL,
+  dstsvc int NOT NULL,
+  dst varchar(80),
+  PRIMARY KEY (svcnum)
+);
+
+CREATE TABLE cust_credit_bill (
+  creditbillnum int primary key,
+  crednum int not null,
+  invnum int not null,
+  _date int not null,
+  amount decimal(10,2) not null
+);
+
+CREATE TABLE cust_bill_pay (
+  billpaynum int primary key,
+  invnum int not null,
+  paynum int not null,
+  _date int not null,
+  amount decimal(10,2) not null
+);
+
+CREATE TABLE cust_credit_refund (
+  creditrefundnum int primary key,
+  crednum int not null,
+  refundnum int not null,
+  _date int not null,
+  amount decimal(10,2) not null
+);
+
+
+ALTER TABLE svc_acct ADD domsvc integer NOT NULL;
+ALTER TABLE svc_domain ADD catchall integer NULL;
+ALTER TABLE part_svc ADD svc_acct__domsvc integer NULL;
+ALTER TABLE part_svc ADD svc_acct__domsvc_flag char(1) NULL;
+ALTER TABLE part_svc ADD svc_domain__catchall integer NULL;
+ALTER TABLE part_svc ADD svc_domain__catchall_flag char(1) NULL;
+ALTER TABLE part_svc ADD svc_forward__srcsvc integer NULL;
+ALTER TABLE part_svc ADD svc_forward__srcsvc_flag char(1) NULL;
+ALTER TABLE part_svc ADD svc_forward__dstsvc integer NULL;
+ALTER TABLE part_svc ADD svc_forward__dstsvc_flag char(1) NULL;
+ALTER TABLE part_svc ADD svc_forward__dst integer NULL;
+ALTER TABLE part_svc ADD svc_forward__dst_flag char(1) NULL;
+ALTER TABLE cust_main ADD referral_custnum integer NULL;
+ALTER TABLE cust_pay ADD custnum integer;
+ALTER TABLE cust_refund ADD custnum integer;
+CREATE INDEX cust_main3 ON cust_main ( referral_custnum );
+CREATE INDEX cust_credit_bill1 ON cust_credit_bill ( crednum );
+CREATE INDEX cust_credit_bill2 ON cust_credit_bill ( invnum );
+CREATE INDEX cust_bill_pay1 ON cust_bill_pay ( invnum );
+CREATE INDEX cust_bill_pay2 ON cust_bill_pay ( paynum );
+CREATE INDEX cust_credit_refund1 ON cust_credit_refund ( crednum );
+CREATE INDEX cust_credit_refund2 ON cust_credit_refund ( refundnum );
+</pre>
+
   <li>If you are using PostgreSQL, apply the following changes to your database:
 <pre>
 CREATE UNIQUE INDEX agent_pkey ON agent ( agentnum );
@@ -105,6 +164,32 @@ ALTER TABLE cust_main ADD COLUMN ship_country char(2) NULL;
 ALTER TABLE cust_main ADD COLUMN ship_daytime varchar(20) NULL;
 ALTER TABLE cust_main ADD COLUMN ship_night varchar(20) NULL;
 ALTER TABLE cust_main ADD COLUMN ship_fax varchar(12) NULL;
+CREATE INDEX cust_main1 ON cust_main ( ship_last );
+CREATE INDEX cust_main2 ON cust_main ( ship_company );
+</pre>
+  <li>If you wish to enable customer comments, apply the following change to
+      your database:
+<pre>
+ALTER TABLE cust_main ADD COLUMN comments varchar NULL;
 </pre>
+  <li>If you are using the signup server, reinstall it according to the <a href="signup.html">instructions</a>.  The 1.3.x signup server is not compatible with 1.4.x.
   <li>Run bin/dbdef-create.
+  <li>create a service based on svc_forward
+  <li>Run bin/fs-migrate-svc_acct_sm
+  <li>Run bin/fs-migrate-payref
+  <li><b>After running bin/fs-migrate-payref</b>, apply the following changes to your database:
+  <table border><tr><th>PostgreSQL</th><th>MySQL, others</th></tr>
+<tr><td>
+<font size=-1><pre>
+ALTER TABLE cust_pay RENAME COLUMN invnum TO depreciated;
+ALTER TABLE cust_refund RENAME COLUMN crednum TO depreciated;
+</pre></font>
+</td><td>
+<font size=-1><pre>
+ALTER TABLE cust_pay DROP COLUMN invnum;
+ALTER TABLE cust_refund DROP COLUMN crednum;
+</pre></font>
+</td></tr></table>
+  <li><b>IMPORTANT: After applying the second set of database changes</b>, run bin/dbdef-create again.
+  <li>create the conf.dbsrc/user_policy as appropriate for your site
 </body>