Added test and fix for insertion of empty table bug
Merge pull request #8316 from artemyk/empty_table_insert

BUG: Exception raised when `to_sql` used to insert empty dataframe