fix ticket #3148 Check schema restrictions and apply it