Fix restore of not-null constraints with inheritance