- If using Apache::ASP, add PerlSetVar RequestBinaryRead Off to your Apache configuration and make sure you are using Apache::ASP minimum version 2.55.
install DBIx::DBSchema 0.23
install Net::SSH 0.08
- If using Apache::ASP, add PerlSetVar RequestBinaryRead Off to your Apache configuration and make sure you are using Apache::ASP minimum version 2.55.
INSERT INTO h_part_pkg_temp SELECT * from h_part_pkg;
DROP TABLE h_part_pkg;
ALTER TABLE h_part_pkg_temp RENAME TO h_part_pkg;
INSERT INTO h_part_pkg_temp SELECT * from h_part_pkg;
DROP TABLE h_part_pkg;
ALTER TABLE h_part_pkg_temp RENAME TO h_part_pkg;
+CREATE INDEX h_part_pkg1 ON h_part_pkg(disabled);
+
+On modern Pg:
ALTER TABLE h_part_pkg DROP CONSTRAINT h_part_pkg_temp_pkey;
ALTER TABLE h_part_pkg ADD PRIMARY KEY (historynum);
ALTER TABLE h_part_pkg DROP CONSTRAINT h_part_pkg_temp_pkey;
ALTER TABLE h_part_pkg ADD PRIMARY KEY (historynum);
-CREATE INDEX h_part_pkg1 ON h_part_pkg(disabled);
select setval('public.h_part_pkg_temp_historynum_seq', ( select max(historynum) from h_part_pkg) );
select setval('public.h_part_pkg_temp_historynum_seq', ( select max(historynum) from h_part_pkg) );
+Or on Pg versions that don't support DROP CONSTRAINT and ADD PRIMARY KEY (tested on 7.1 so far):
+DROP INDEX h_part_pkg_temp_pkey;
+CREATE UNIQUE INDEX h_part_pkg_pkey ON h_part_pkg (historynum);
+select setval('h_part_pkg_temp_historynum_seq', ( select max(historynum) from h_part_pkg) );
+
DROP INDEX cust_bill_pkg1;
DROP INDEX cust_bill_pkg1;
@@ -168,7+183,7 @@ ALTER TABLE h_svc_forward ALTER COLUMN srcsvc DROP NOT NULL;
ALTER TABLE svc_forward ALTER COLUMN dstsvc DROP NOT NULL;
ALTER TABLE h_svc_forward ALTER COLUMN dstsvc DROP NOT NULL;
ALTER TABLE svc_forward ALTER COLUMN dstsvc DROP NOT NULL;
ALTER TABLE h_svc_forward ALTER COLUMN dstsvc DROP NOT NULL;
-Or on Pg versions that don't support DROP NOT NULL (tested only on 7.2 so far):
+Or on Pg versions that don't support DROP NOT NULL (tested on 7.1 and 7.2 so far):
UPDATE pg_attribute SET attnotnull = FALSE WHERE ( attname = 'srcsvc' OR attname = 'dstsvc' ) AND ( attrelid = ( SELECT oid FROM pg_class WHERE relname = 'svc_forward' ) OR attrelid = ( SELECT oid FROM pg_class WHERE relname = 'h_svc_forward' ) );
dump database, edit:
UPDATE pg_attribute SET attnotnull = FALSE WHERE ( attname = 'srcsvc' OR attname = 'dstsvc' ) AND ( attrelid = ( SELECT oid FROM pg_class WHERE relname = 'svc_forward' ) OR attrelid = ( SELECT oid FROM pg_class WHERE relname = 'h_svc_forward' ) );