参考此链接,我试图通过 Powershell 脚本为 Postgresql DB 运行 dbup。但是,遇到了一个错误——
Powershell 脚本 -
$scriptPath = $args['H:\HelloDbUp\Scripts']
[Reflection.Assembly]::LoadFrom("H:\HelloDbUp\packages\dbup-postgresql.4.2.0\lib\net45\dbup-postgresql.dll")
$dbUp = [DbUp.DeployChanges]::To
$dbUp = [PostgresqlServerExtensions]::PostgresqlDatabase($dbUp, "server=serverName;Port=5432;database=DevOps_TestDB;User ID=postgres;Password=77777;Trusted_Connection=Yes;Connection Timeout=120;")
$dbUp = [StandardExtensions]::WithScriptsFromFileSystem($dbUp, $scriptPath)
$dbUp = [PostgresqlServerExtensions]::JournalToSqlTable($dbUp, 'MySchema', 'MyTable')
$dbUp = [StandardExtensions]::LogToConsole($dbUp)
$upgradeResult = $dbUp.Build().PerformUpgrade()
请帮助我摆脱这个错误!