more schema changes: part_bill_event and cust_bill_event tables
[freeside.git] / httemplate / docs / upgrade8.html
index 79eb6da..13830dc 100644 (file)
@@ -54,14 +54,10 @@ require "/usr/local/apache/conf/handler.pl";
   </tr>
 </table>
 <ul>
-  <li>Change to the FS directory in the new tarball, and build and install the
-      Perl modules:
+  <li>Build and install the Perl modules:
     <pre>
-$ cd FS/
-$ perl Makefile.PL
-$ make
 $ su
-# make install UNINST=1</pre>
+# make install-perl-modules</pre>
    <li>Apply the following changes to your database:
 <pre>
 CREATE TABLE svc_forward (
@@ -128,6 +124,25 @@ CREATE TABLE part_pop_local (
 );
 CREATE UNIQUE INDEX part_pop_local1 ON part_pop_local ( npa, nxx );
 
+CREATE TABLE cust_bill_event (
+  eventnum int primary key,
+  invnum int not null,
+  eventpart int not null,
+  _date int not null,
+);
+CREATE UNIQUE INDEX cust_bill_event1 ON cust_bill_event ( eventpart, invnum );
+CREATE INDEX cust_bill_event2 ON cust_bill_event ( invnum );
+
+CREATE TABLE part_bill_event (
+  eventpart int primary key,
+  payby char(4) not null,
+  event varchar(80) not null,
+  eventcode text null,
+  seconds int null,
+  disabled char(1) null,
+);
+CREATE INDEX part_bill_event1 ON part_bill_event ( payby );
+
 ALTER TABLE svc_acct ADD domsvc integer NOT NULL;
 ALTER TABLE svc_domain ADD catchall integer NULL;
 ALTER TABLE cust_main ADD referral_custnum integer NULL;
@@ -135,6 +150,12 @@ ALTER TABLE cust_pay ADD custnum integer;
 ALTER TABLE cust_pay_batch ADD paybatchnum integer;
 ALTER TABLE cust_refund ADD custnum integer;
 ALTER TABLE cust_pkg ADD manual_flag char(1) NULL;
+ALTER TABLE part_pkg ADD plan varchar NULL;
+ALTER TABLE part_pkg ADD plandata varchar NULL;
+ALTER TABLE part_pkg ADD setuptax char(1) NULL;
+ALTER TABLE part_pkg ADD recurtax char(1) NULL;
+ALTER TABLE part_pkg ADD disabled char(1) NULL;
+ALTER TABLE part_svc ADD disabled char(1) NULL;
 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 );
@@ -223,7 +244,7 @@ CREATE TABLE cust_pay_temp (
 INSERT INTO cust_pay_temp SELECT * from cust_pay;
 DROP TABLE cust_pay;
 ALTER TABLE cust_pay_temp RENAME TO cust_pay;
-CREATE UNIQUE INDEX cust_pay1 ON cust_pay paynum;
+CREATE UNIQUE INDEX cust_pay1 ON cust_pay (paynum);
 CREATE TABLE cust_refund_temp (
   refundnum int primary key,
   custnum int not null,
@@ -238,7 +259,7 @@ CREATE TABLE cust_refund_temp (
 INSERT INTO cust_refund_temp SELECT * from cust_refund;
 DROP TABLE cust_refund;
 ALTER TABLE cust_refund_temp RENAME TO cust_refund;
-CREATE UNIQUE INDEX cust_refund1 ON cust_refund refundnum;
+CREATE UNIQUE INDEX cust_refund1 ON cust_refund (refundnum);
 </pre></font>
 </td><td>
 <font size=-1><pre>
@@ -247,7 +268,7 @@ 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 <a href="config.html#username_policy">user_policy configuration file</a> as appropriate for your site.
+  <li>set the <a href="../config/config.cgi#username_policy">user_policy configuration value</a> as appropriate for your site.
   <li>Create the `/usr/local/etc/freeside/cache.<i>datasrc</i>' directory
       (ownded by the freeside user).
   <li>freeside-queued was installed with the Perl modules.  Start it now and ensure that is run upon system startup.