初始化询价智能体新仓:同步本地工程并排除密钥与 .env。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
linmianxun
2026-09-13 14:30:44 +08:00
co-authored by Cursor
commit 2a14def882
2621 changed files with 393165 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
# Drop leftover report demo tables.
$ErrorActionPreference = "Continue"
$mysql = "C:\yutongda\tools\mysql-8.0.39-winx64\bin\mysql.exe"
$envFile = "E:\wwwroot\.env"
$hostn = "10.206.0.15"; $user = "inquiry_robot"; $pass = $null; $db = "inquiry_robot"
Get-Content $envFile | ForEach-Object {
if ($_ -match '^MYSQL_HOST=(.+)$') { $hostn = $Matches[1].Trim() }
if ($_ -match '^MYSQL_USER=(.+)$') { $user = $Matches[1].Trim() }
if ($_ -match '^MYSQL_PASSWORD=(.+)$') { $pass = $Matches[1].Trim() }
if ($_ -match '^MYSQL_DB=(.+)$') { $db = $Matches[1].Trim() }
}
$drop = @("rep_demo_dxtj","rep_demo_employee","rep_demo_gongsi","rep_demo_jianpiao")
$sql = "SET FOREIGN_KEY_CHECKS=0; " + (($drop | ForEach-Object { "DROP TABLE IF EXISTS ``$_``;" }) -join " ") + " SET FOREIGN_KEY_CHECKS=1; SELECT COUNT(*) FROM information_schema.tables WHERE table_schema=DATABASE();"
& $mysql -h $hostn -P 3306 -u $user "-p$pass" $db -e $sql 2>&1 | Where-Object { $_ -notmatch "Warning|password" }
Write-Output "DONE"