summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.1.5.798
1 files changed, 67 insertions, 31 deletions
diff --git a/README.1.5.7 b/README.1.5.7
index b4ffff1cd..adfffea55 100644
--- a/README.1.5.7
+++ b/README.1.5.7
@@ -84,37 +84,73 @@ ALTER TABLE h_cust_main ALTER COLUMN zip DROP NOT NULL;
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;
-
-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;
+On current (7.3? definitely 7.4+) Pg:
+
+ 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 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;
+
+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;