Fix Gitea MCP ESM resolution error, update configuration, and include project tests/migration files
This commit is contained in:
1 parent
b864d615ea
commit
cda6dce0be
59 files changed
+9509
-5798
No files matched your search
@@ -0,0 +1,29 @@
|
||||
import pymysql
|
||||
import os
|
||||
from dotenv import load_dotenv
|
||||
|
||||
load_dotenv()
|
||||
|
||||
def clear_project_history():
|
||||
conn = pymysql.connect(
|
||||
host=os.getenv('DB_HOST', 'localhost'),
|
||||
user=os.getenv('DB_USER', 'root'),
|
||||
password=os.getenv('DB_PASSWORD', '45278434'),
|
||||
database='PM_proto_test',
|
||||
charset='utf8mb4',
|
||||
cursorclass=pymysql.cursors.DictCursor
|
||||
)
|
||||
try:
|
||||
with conn.cursor() as cursor:
|
||||
# 테이블의 모든 데이터를 삭제
|
||||
print("Cleaning projects_history table in PM_proto_test...")
|
||||
cursor.execute("DELETE FROM projects_history")
|
||||
conn.commit()
|
||||
print("Successfully cleared all records from projects_history.")
|
||||
except Exception as e:
|
||||
print(f"Error occurred: {e}")
|
||||
finally:
|
||||
conn.close()
|
||||
|
||||
if __name__ == "__main__":
|
||||
clear_project_history()
|
||||
Reference in new issue
Block a user