att
This commit is contained in:
@@ -376,6 +376,17 @@ def upsert_rows_sqlserver(rows: List[Dict[str, Any]], connection_string: str) ->
|
||||
has_cnpj_col = False
|
||||
|
||||
try:
|
||||
cur.execute(
|
||||
"SELECT 1 FROM sys.columns "
|
||||
"WHERE object_id = OBJECT_ID('dbo.TrfDocumento') AND name = 'CriadoEm'"
|
||||
)
|
||||
if cur.fetchone() is None:
|
||||
cur.execute(
|
||||
"ALTER TABLE dbo.TrfDocumento "
|
||||
"ADD CriadoEm DATETIME2 NOT NULL DEFAULT SYSUTCDATETIME()"
|
||||
)
|
||||
cn.commit()
|
||||
|
||||
cur.execute(
|
||||
"""
|
||||
SELECT 1
|
||||
|
||||
Reference in New Issue
Block a user