In this study, we carried out CCD UBV photometry of eight open clusters, ASCC 115, Collinder 421, NGC 6793, NGC 7031, NGC 7039, NGC 7086, Roslund 1, Stock 21, and determined their reddening, metallicity, distance, age, and mass functions. We used new Gaia Data Release 2 (DR2) astrometric data to separate cluster member stars from the field stars and obtain precise structural and astrophysical parameters. To identify cluster member stars we utilized an unsupervised membership assignment code (UPMASK), which is based on the photometric and astrometric data. The density distributions for the open clusters show good fits with the empirical King model except for Roslund 1 and Stock 21 not having central concentration. The colour excesses and metallicities were derived separately using U-BxB-V two-colour diagrams. Keeping these parameters as constants, we simultaneously calculated distance moduli and ages of the clusters from VxB-V and VxU-Bcolour-magnitude diagrams using PARSEC theoretical isochrones. Taking into account Gaia DR2 proper motion components and parallaxes of the member stars, we also calculated mean proper motions and distances for the clusters. Distances derived both from isochrone fitting to colour-magnitude diagrams of the clusters and Gaia DR2 trigonometric parallaxes are compatible with each other. Slopes of the mass functions of the eight open clusters are in good agreement with Salpeter (Astrophys. J. 121:161, 1955) value of 1.35.