Added table_exists? check for migration.