changing int8 to bigint for better portability