update SQL to check for tables and add users table