[freeside-commits] freeside README.1.5.7,1.14,1.15
Ivan,,,
ivan at wavetail.420.am
Tue Jul 12 04:55:01 PDT 2005
Update of /home/cvs/cvsroot/freeside
In directory wavetail:/tmp/cvs-serv10299
Modified Files:
README.1.5.7
Log Message:
add alternative for very old Pg
Index: README.1.5.7
===================================================================
RCS file: /home/cvs/cvsroot/freeside/README.1.5.7,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- README.1.5.7 15 Jun 2005 04:46:50 -0000 1.14
+++ README.1.5.7 12 Jul 2005 11:54:59 -0000 1.15
@@ -84,37 +84,73 @@
ALTER TABLE prepay_credit ADD agentnum integer NULL;
ALTER TABLE h_prepay_credit ADD agentnum integer NULL;
-ALTER TABLE type_pkgs ADD typepkgnum int;
-ALTER TABLE type_pkgs ALTER COLUMN typepkgnum SET DEFAULT nextval('public.type_pkgs_typepkgnum_seq'::text);
-CREATE SEQUENCE type_pkgs_typepkgnum_seq;
-UPDATE type_pkgs SET typepkgnum = nextval('public.type_pkgs_typepkgnum_seq'::text) WHERE typepkgnum IS NULL;
-ALTER TABLE type_pkgs ALTER typepkgnum SET NOT NULL;
-ALTER TABLE type_pkgs ADD PRIMARY KEY (typepkgnum);
-ALTER TABLE h_type_pkgs ADD typepkgnum int;
+On current (7.3? definitely 7.4+) Pg:
-ALTER TABLE cust_bill_pkg ADD billpkgnum int;
-ALTER TABLE cust_bill_pkg ALTER COLUMN billpkgnum SET DEFAULT nextval('public.cust_bill_pkg_billpkgnum_seq'::text);
-CREATE SEQUENCE cust_bill_pkg_billpkgnum_seq;
-UPDATE cust_bill_pkg SET billpkgnum = nextval('public.cust_bill_pkg_billpkgnum_seq'::text) WHERE billpkgnum IS NULL;
-ALTER TABLE cust_bill_pkg ALTER billpkgnum SET NOT NULL;
-ALTER TABLE cust_bill_pkg ADD PRIMARY KEY (billpkgnum);
-ALTER TABLE h_cust_bill_pkg ADD billpkgnum int;
+ ALTER TABLE type_pkgs ADD typepkgnum int;
+ ALTER TABLE type_pkgs ALTER COLUMN typepkgnum SET DEFAULT nextval('public.type_pkgs_typepkgnum_seq'::text);
+ CREATE SEQUENCE type_pkgs_typepkgnum_seq;
+ UPDATE type_pkgs SET typepkgnum = nextval('public.type_pkgs_typepkgnum_seq'::text) WHERE typepkgnum IS NULL;
+ ALTER TABLE type_pkgs ALTER typepkgnum SET NOT NULL;
+ ALTER TABLE type_pkgs ADD PRIMARY KEY (typepkgnum);
+ ALTER TABLE h_type_pkgs ADD typepkgnum int;
-ALTER TABLE pkg_svc ADD pkgsvcnum int;
-ALTER TABLE pkg_svc ALTER COLUMN pkgsvcnum SET DEFAULT nextval('public.pkg_svc_pkgsvcnum_seq'::text);
-CREATE SEQUENCE pkg_svc_pkgsvcnum_seq;
-UPDATE pkg_svc SET pkgsvcnum = nextval('public.pkg_svc_pkgsvcnum_seq'::text) WHERE pkgsvcnum IS NULL;
-ALTER TABLE pkg_svc ALTER pkgsvcnum SET NOT NULL;
-ALTER TABLE pkg_svc ADD PRIMARY KEY (pkgsvcnum);
-ALTER TABLE h_pkg_svc ADD pkgsvcnum int;
+ ALTER TABLE cust_bill_pkg ADD billpkgnum int;
+ ALTER TABLE cust_bill_pkg ALTER COLUMN billpkgnum SET DEFAULT nextval('public.cust_bill_pkg_billpkgnum_seq'::text);
+ CREATE SEQUENCE cust_bill_pkg_billpkgnum_seq;
+ UPDATE cust_bill_pkg SET billpkgnum = nextval('public.cust_bill_pkg_billpkgnum_seq'::text) WHERE billpkgnum IS NULL;
+ ALTER TABLE cust_bill_pkg ALTER billpkgnum SET NOT NULL;
+ ALTER TABLE cust_bill_pkg ADD PRIMARY KEY (billpkgnum);
+ ALTER TABLE h_cust_bill_pkg ADD billpkgnum int;
+
+ ALTER TABLE pkg_svc ADD pkgsvcnum int;
+ ALTER TABLE pkg_svc ALTER COLUMN pkgsvcnum SET DEFAULT nextval('public.pkg_svc_pkgsvcnum_seq'::text);
+ CREATE SEQUENCE pkg_svc_pkgsvcnum_seq;
+ UPDATE pkg_svc SET pkgsvcnum = nextval('public.pkg_svc_pkgsvcnum_seq'::text) WHERE pkgsvcnum IS NULL;
+ ALTER TABLE pkg_svc ALTER pkgsvcnum SET NOT NULL;
+ ALTER TABLE pkg_svc ADD PRIMARY KEY (pkgsvcnum);
+ ALTER TABLE h_pkg_svc ADD pkgsvcnum int;
+
+ ALTER TABLE part_svc_router ADD svcrouternum int;
+ ALTER TABLE part_svc_router ALTER COLUMN svcrouternum SET DEFAULT nextval('public.part_svc_router_svcrouternum_seq'::text);
+ CREATE SEQUENCE part_svc_router_svcrouternum_seq;
+ UPDATE part_svc_router SET svcrouternum = nextval('public.part_svc_router_svcrouternum_seq'::text) WHERE svcrouternum IS NULL;
+ ALTER TABLE part_svc_router ALTER svcrouternum SET NOT NULL;
+ ALTER TABLE part_svc_router ADD PRIMARY KEY (svcrouternum);
+ ALTER TABLE h_part_svc_router ADD svcrouternum int;
-ALTER TABLE part_svc_router ADD svcrouternum int;
-ALTER TABLE part_svc_router ALTER COLUMN svcrouternum SET DEFAULT nextval('public.part_svc_router_svcrouternum_seq'::text);
-CREATE SEQUENCE part_svc_router_svcrouternum_seq;
-UPDATE part_svc_router SET svcrouternum = nextval('public.part_svc_router_svcrouternum_seq'::text) WHERE svcrouternum IS NULL;
-ALTER TABLE part_svc_router ALTER svcrouternum SET NOT NULL;
-ALTER TABLE part_svc_router ADD PRIMARY KEY (svcrouternum);
-ALTER TABLE h_part_svc_router ADD svcrouternum int;
+Or on very old Pg (7.2 and earlier (eek), 7.3?):
+
+ ALTER TABLE type_pkgs ADD typepkgnum int;
+ ALTER TABLE type_pkgs ALTER COLUMN typepkgnum SET DEFAULT nextval('type_pkgs_typepkgnum_seq'::text);
+ CREATE SEQUENCE type_pkgs_typepkgnum_seq;
+ UPDATE type_pkgs SET typepkgnum = nextval('type_pkgs_typepkgnum_seq'::text) WHERE typepkgnum IS NULL;
+ UPDATE pg_attribute SET attnotnull = TRUE WHERE attname = 'typepkgnum' AND attrelid = ( SELECT oid FROM pg_class WHERE relname = 'type_pkgs');
+ ALTER TABLE type_pkgs ADD PRIMARY KEY (typepkgnum);
+ ALTER TABLE h_type_pkgs ADD typepkgnum int;
+
+ ALTER TABLE cust_bill_pkg ADD billpkgnum int;
+ ALTER TABLE cust_bill_pkg ALTER COLUMN billpkgnum SET DEFAULT nextval('cust_bill_pkg_billpkgnum_seq'::text);
+ CREATE SEQUENCE cust_bill_pkg_billpkgnum_seq;
+ UPDATE cust_bill_pkg SET billpkgnum = nextval('cust_bill_pkg_billpkgnum_seq'::text) WHERE billpkgnum IS NULL;
+ UPDATE pg_attribute SET attnotnull = TRUE WHERE attname = 'billpkgnum' AND attrelid = ( SELECT oid FROM pg_class WHERE relname = 'cust_bill_pkg');
+ ALTER TABLE cust_bill_pkg ADD PRIMARY KEY (billpkgnum);
+ ALTER TABLE h_cust_bill_pkg ADD billpkgnum int;
+
+ ALTER TABLE pkg_svc ADD pkgsvcnum int;
+ ALTER TABLE pkg_svc ALTER COLUMN pkgsvcnum SET DEFAULT nextval('pkg_svc_pkgsvcnum_seq'::text);
+ CREATE SEQUENCE pkg_svc_pkgsvcnum_seq;
+ UPDATE pkg_svc SET pkgsvcnum = nextval('pkg_svc_pkgsvcnum_seq'::text) WHERE pkgsvcnum IS NULL;
+ UPDATE pg_attribute SET attnotnull = TRUE WHERE attname = 'pkgsvcnum' AND attrelid = ( SELECT oid FROM pg_class WHERE relname = 'pkg_svc');
+ ALTER TABLE pkg_svc ADD PRIMARY KEY (pkgsvcnum);
+ ALTER TABLE h_pkg_svc ADD pkgsvcnum int;
+
+ ALTER TABLE part_svc_router ADD svcrouternum int;
+ ALTER TABLE part_svc_router ALTER COLUMN svcrouternum SET DEFAULT nextval('part_svc_router_svcrouternum_seq'::text);
+ CREATE SEQUENCE part_svc_router_svcrouternum_seq;
+ UPDATE part_svc_router SET svcrouternum = nextval('part_svc_router_svcrouternum_seq'::text) WHERE svcrouternum IS NULL;
+ UPDATE pg_attribute SET attnotnull = TRUE WHERE attname = 'svcrouternum' AND attrelid = ( SELECT oid FROM pg_class WHERE relname = 'part_svc_router');
+ ALTER TABLE part_svc_router ADD PRIMARY KEY (svcrouternum);
+ ALTER TABLE h_part_svc_router ADD svcrouternum int;
Installs w/integrated RT:
CREATE SEQUENCE attributes_id_seq;
More information about the freeside-commits
mailing list