The db upgrade patch does not work when partitionning is used (via child tables)
The script explicitly do not upgrade Child tables because of "ONLY" directive
ALTER TABLE ONLY history_uint
ALTER itemid DROP DEFAULT,
ADD ns integer DEFAULT '0' NOT NULL;
"If a table has any descendant tables, it is not permitted to add, rename, or change the type of a column in the parent table without doing the same to the descendants. That is, ALTER TABLE ONLY will be rejected. This ensures that the descendants always have columns matching the parent."