Schema change

separated internal reference number into 3 parts:
-recordtype (changed to char)
-recordyear
-recordnumber

why: internal reference number generation (improvement)