initial commit

This commit is contained in:
2026-02-04 00:16:34 +09:00
commit ae11528dd9
867 changed files with 209640 additions and 0 deletions

18
backend/migrate_db_v3.py Normal file
View File

@@ -0,0 +1,18 @@
from sqlalchemy import create_engine, text
import os
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
DB_URL = f"sqlite:///{os.path.join(BASE_DIR, 'kis_stock.db')}"
engine = create_engine(DB_URL)
def migrate():
with engine.connect() as conn:
try:
conn.execute(text("ALTER TABLE watchlist ADD COLUMN is_monitoring BOOLEAN DEFAULT 1"))
print("Added is_monitoring column to watchlist")
except Exception as e:
print(f"Column might already exist: {e}")
if __name__ == "__main__":
migrate()