수정본
This commit is contained in:
13
clear_test_data.sh
Executable file
13
clear_test_data.sh
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
# 테스트 데이터 강제 삭제 스크립트
|
||||
|
||||
echo "🗑️ Deleting all test data from stock_analysis table..."
|
||||
|
||||
docker exec -i autostock-postgres psql -U stock_admin -d stock << EOF
|
||||
DELETE FROM stock_analysis;
|
||||
DELETE FROM trade_history WHERE status IN ('PENDING', 'FAILED');
|
||||
DELETE FROM portfolio WHERE quantity <= 0;
|
||||
SELECT 'Cleanup completed. Remaining stock_analysis records: ' || COUNT(*) FROM stock_analysis;
|
||||
EOF
|
||||
|
||||
echo "✅ Test data cleanup completed!"
|
||||
Reference in New Issue
Block a user