26 lines
787 B
Python
26 lines
787 B
Python
import oracledb
|
|
import sys
|
|
|
|
def main():
|
|
try:
|
|
connection = oracledb.connect(user='sisvietnam', password='sisvietnam', dsn='localhost:1521/sisvietnam')
|
|
cursor = connection.cursor()
|
|
|
|
content = '[component:video-fallback]'
|
|
|
|
cursor.execute("UPDATE html_snippet SET content = :content WHERE slug = 'content-top'", content=content)
|
|
if cursor.rowcount > 0:
|
|
print("Successfully updated content-top snippet to use video-fallback component!")
|
|
else:
|
|
print("Warning: content-top snippet not found in DB.")
|
|
|
|
connection.commit()
|
|
cursor.close()
|
|
connection.close()
|
|
except Exception as e:
|
|
print(f"Error: {e}")
|
|
sys.exit(1)
|
|
|
|
if __name__ == '__main__':
|
|
main()
|