Fix :: Sql problem on resource table

Same fix like 3.6

Ok into migration script