Skip to content
Open
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
6 changes: 3 additions & 3 deletions sqlalchemy_timescaledb/dialect.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def post_create_table(self, table):
table,
'after_create',
self.ddl_hypertable(
table.name, hypertable
table.schema, table.name, hypertable
).execute_if(
dialect='timescaledb'
)
Expand All @@ -32,7 +32,7 @@ def post_create_table(self, table):
return super().post_create_table(table)

@staticmethod
def ddl_hypertable(table_name, hypertable):
def ddl_hypertable(schema_name, table_name, hypertable):
time_column_name = hypertable['time_column_name']
chunk_time_interval = hypertable.get('chunk_time_interval', '7 days')

Expand All @@ -45,7 +45,7 @@ def ddl_hypertable(table_name, hypertable):
return DDL(
f"""
SELECT create_hypertable(
'{table_name}',
'"{schema_name}"."{table_name}"',
'{time_column_name}',
chunk_time_interval => {chunk_time_interval},
if_not_exists => TRUE
Expand Down