Creating two tables in database on activation hook

You’re not using the proper table name in your CONSTRAINT clause:

CONSTRAINT `booking_timeslots_ibfk_1` FOREIGN KEY (`bid`) REFERENCES `booking_dates` (`id`)

That should be:

CONSTRAINT `booking_timeslots_ibfk_1` FOREIGN KEY (`bid`) REFERENCES `$date_table_name` (`id`)

where $date_table_name (as I could see) is the correct table name.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)