Skip to content

Commit e8ef6b1

Browse files
committed
Remove quoting columns in ALTER commands
1 parent 9ba60c0 commit e8ef6b1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

openc3/python/openc3/utilities/questdb_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -613,13 +613,13 @@ def create_table(self, target_name, packet_name, packet, cmd_or_tlm="TLM", retai
613613

614614
if existing_type is None:
615615
# Column doesn't exist yet — add it
616-
alter = f'ALTER TABLE "{table_name}" ADD COLUMN "{col_name}" {desired_sql_type}'
616+
alter = f'ALTER TABLE "{table_name}" ADD COLUMN {col_name} {desired_sql_type}'
617617
cur.execute(alter)
618618
self._log_info(f"QuestDB: Added column: {alter}")
619619
altered = True
620620
elif existing_type != desired_canonical:
621621
# Type mismatch — ALTER the column type
622-
alter = f'ALTER TABLE "{table_name}" ALTER COLUMN "{col_name}" TYPE {desired_sql_type}'
622+
alter = f'ALTER TABLE "{table_name}" ALTER COLUMN {col_name} TYPE {desired_sql_type}'
623623
cur.execute(alter)
624624
self._log_info(
625625
f"QuestDB: Altered column type: {alter} (was {existing_type}, now {desired_canonical})"

0 commit comments

Comments
 (0)