Skip to content
This repository was archived by the owner on Oct 29, 2024. It is now read-only.

Create db only if doesn't exist yet #274

Merged
merged 1 commit into from
Dec 5, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion influxdb/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ def create_database(self, dbname):
:param dbname: the name of the database to create
:type dbname: str
"""
self.query("CREATE DATABASE \"%s\"" % dbname)
self.query("CREATE DATABASE IF NOT EXISTS \"%s\"" % dbname)

def drop_database(self, dbname):
"""Drop a database from InfluxDB.
Expand Down