X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fdocs%2Fupgrade8.html;h=b0d1e3fe2e597c87887e59000ea09c0ca2199d87;hb=76ce9aeaeb39f496797398e84bfdc20fbd817b4d;hp=60f8f15937659c6be59fab891402cd6a5e369636;hpb=8c7396531e6bf6f7c6cc4e5d19e2d381442223c5;p=freeside.git diff --git a/httemplate/docs/upgrade8.html b/httemplate/docs/upgrade8.html index 60f8f1593..b0d1e3fe2 100644 --- a/httemplate/docs/upgrade8.html +++ b/httemplate/docs/upgrade8.html @@ -5,8 +5,11 @@
-$ cd FS/ -$ perl Makefile.PL -$ make $ su -# make install UNINST=1+# make install-perl-modules
CREATE TABLE svc_forward ( @@ -70,25 +69,191 @@ CREATE TABLE svc_forward ( dst varchar(80), PRIMARY KEY (svcnum) ); -ALTER TABLE svc_acct ADD domsvc integer NOT NULL; -ALTER TABLE svc_domain ADD catchall integer; -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; +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 +); + +CREATE TABLE part_svc_column ( + columnnum int primary key, + svcpart int not null, + columnname varchar(64) not null, + columnvalue varchar(80) null, + columnflag char(1) null +); + +CREATE TABLE queue ( + jobnum int primary key, + job text not null, + _date int not null, + status varchar(80) not null, + statustext text null, + svcnum int null +); +CREATE INDEX queue1 ON queue ( svcnum ); +CREATE INDEX queue2 ON queue ( status ); + +CREATE TABLE queue_arg ( + argnum int primary key, + jobnum int not null, + arg text null +); +CREATE INDEX queue_arg1 ON queue_arg ( jobnum ); + +CREATE TABLE queue_depend ( + dependnum int primary key, + jobnum int not null, + depend_jobnum int not null +); +CREATE INDEX queue_depend1 ON queue_depend ( jobnum ); +CREATE INDEX queue_depend2 ON queue_depend ( depend_jobnum ); + +CREATE TABLE part_pop_local ( + localnum int primary key, + popnum int not null, + city varchar(80) null, + state char(2) null, + npa char(3) not null, + nxx char(3) not null +); +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, + weight int not null, + plan varchar(80) null, + plandata text null, + disabled char(1) null +); +CREATE INDEX part_bill_event1 ON part_bill_event ( payby ); + +CREATE TABLE export_svc ( + exportsvcnum int primary key, + exportnum int not null, + svcpart int not null +); +CREATE UNIQUE INDEX export_svc1 ON export_svc ( exportnum, svcpart ); +CREATE INDEX export_svc2 ON export_svc ( exportnum ); +CREATE INDEX export_svc3 ON export_svc ( svcpart ); + +CREATE TABLE part_export ( + exportnum int primary key, + machine varchar(80) not null, + exporttype varchar(80) not null, + nodomain char(1) NULL +); +CREATE INDEX part_export1 ON part_export ( machine ); +CREATE INDEX part_export2 ON part_export ( exporttype ); + +CREATE TABLE part_export_option ( + optionnum int primary key, + exportnum int not null, + optionname varchar(80) not null, + optionvalue text NULL +); +CREATE INDEX part_export_option1 ON part_export_option ( exportnum ); +CREATE INDEX part_export_option2 ON part_export_option ( optionname ); + +CREATE TABLE radius_usergroup ( + usergroupnum int primary key, + svcnum int not null, + groupname varchar(80) not null +); +CREATE INDEX radius_usergroup1 ON radius_usergroup ( svcnum ); +CREATE INDEX radius_usergroup2 ON radius_usergroup ( groupname ); + +CREATE TABLE msgcat ( + msgnum int primary key, + msgcode varchar(80) not null, + locale varchar(16) not null, + msg text not null +); +CREATE INDEX msgcat1 ON msgcat ( msgcode, locale ); + +CREATE TABLE cust_tax_exempt ( + exemptnum int primary key, + custnum int not null, + taxnum int not null, + year int not null, + month int not null, + amount decimal(10,2) +); +CREATE UNIQUE INDEX cust_tax_exempt1 ON cust_tax_exempt ( taxnum, year, month ); + +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; +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(80) NULL; +ALTER TABLE part_pkg ADD plandata text 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; +ALTER TABLE cust_bill ADD closed char(1) NULL; +ALTER TABLE cust_pay ADD closed char(1) NULL; +ALTER TABLE cust_credit ADD closed char(1) NULL; +ALTER TABLE cust_refund ADD closed char(1) NULL; +ALTER TABLE cust_bill_event ADD status varchar(80); +ALTER TABLE cust_bill_event ADD statustext text NULL; +ALTER TABLE svc_acct ADD sec_phrase varchar(80) NULL; +ALTER TABLE part_pkg ADD taxclass varchar(80) NULL; +ALTER TABLE cust_main_county ADD taxclass varchar(80) NULL; +ALTER TABLE cust_main_county ADD exempt_amount decimal(10,2); +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 ); +CREATE UNIQUE INDEX cust_pay_batch_pkey ON cust_pay_batch ( paybatchnum ); +CREATE UNIQUE INDEX part_svc_column1 ON part_svc_column ( svcpart, columnname ); +CREATE INDEX cust_pay2 ON cust_pay ( paynum ); +CREATE INDEX cust_pay3 ON cust_pay ( custnum ); +CREATE INDEX cust_pay4 ON cust_pay ( paybatch );
CREATE UNIQUE INDEX agent_pkey ON agent ( agentnum ); -CREATE UNIQUE INDEX agent_type_pkey agent_type ( typenum ); +CREATE UNIQUE INDEX agent_type_pkey ON agent_type ( typenum ); CREATE UNIQUE INDEX cust_bill_pkey ON cust_bill ( invnum ); CREATE UNIQUE INDEX cust_credit_pkey ON cust_credit ( crednum ); CREATE UNIQUE INDEX cust_main_pkey ON cust_main ( custnum ); @@ -135,10 +300,84 @@ CREATE INDEX cust_main2 ON cust_main ( ship_company );
-ALTER TABLE cust_main ADD COLUMN comments varchar NULL; +ALTER TABLE cust_main ADD COLUMN comments text NULL;+
PostgreSQL | MySQL, others |
---|---|
++CREATE TABLE cust_pay_temp ( + paynum int primary key, + custnum int not null, + paid decimal(10,2) not null, + _date int null, + payby char(4) not null, + payinfo varchar(16) null, + paybatch varchar(80) null +); +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 TABLE cust_refund_temp ( + refundnum int primary key, + custnum int not null, + _date int null, + refund decimal(10,2) not null, + otaker varchar(8) not null, + reason varchar(80) not null, + payby char(4) not null, + payinfo varchar(16) null, + paybatch varchar(80) null +); +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); ++ |
++ALTER TABLE cust_pay DROP COLUMN invnum; +ALTER TABLE cust_refund DROP COLUMN crednum; ++ |
+$ su freeside +$ bin/populate-msgcat username ++