# -*- coding: utf-8 -*- """pets 테이블 마이그레이션 테스트""" import sys, io sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8') sys.path.insert(0, 'c:\\Users\\청춘약국\\source\\pharmacy-pos-qr-system\\backend') from db.dbsetup import db_manager # SQLite 연결 (마이그레이션 자동 실행) conn = db_manager.get_sqlite_connection() cursor = conn.cursor() # pets 테이블 확인 cursor.execute("SELECT name FROM sqlite_master WHERE type='table' AND name='pets'") if cursor.fetchone(): print('✅ pets 테이블 생성 완료') cursor.execute('PRAGMA table_info(pets)') columns = cursor.fetchall() print('\n컬럼 목록:') for col in columns: print(f' - {col[1]} ({col[2]})') else: print('❌ pets 테이블 없음')