Fix autocreating tables for SQL Server database