flyway - 使用 flyway 命令行的雪花模式迁移问题
问题描述
我正在尝试使用 flyway 迁移雪花模式。使用以下命令:使用 url 和其他必需参数进行 flyway 迁移
我收到以下错误:
Flyway Community Edition 6.3.0 by Redgate
Database: jdbc❄️//.snowflakecomputing.com:443/ (Snowflake 4.8)
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by net.snowflake.client.jdbc.internal.io.netty.util.internal.ReflectionUtil (file:/C:/flyway-6.3.0/drivers/snowflake-jdbc-3.12.2.jar) to constructor java.nio.DirectByteBuffer(long,int)
WARNING: Please consider reporting this to the maintainers of net.snowflake.client.jdbc.internal.io.netty.util.internal.ReflectionUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
ERROR:
Unable to check whether table "PUBLIC"."flyway_schema_history" exists
SQL State : 02000
Error Code : 2043
Message : SQL compilation error:
Object does not exist, or operation cannot be performed.
'warehouse' is not recognized as an internal or external command,
operable program or batch file.
'role' is not recognized as an internal or external command,
operable program or batch file.
我不知道为什么会出现此错误,因为我正确传递了所有参数
解决方案
从错误来看,Flyway 可以连接但找不到“PUBLIC”。“flyway_schema_history”。
当一个对象像这样被双引号时,Snowflake 将其识别为区分大小写。
你可能想要:
- 尝试通过常规 Web 登录直接连接到 Snowflake,然后查看是否
select top 1 * from <database>."PUBLIC"."flyway_schema_history"
正常工作。检查您是否传入了数据库参数,因为我在您的查询中看不到它。 - 看看您是否可以在没有双引号的情况下在 Snowflake 网站和 Flyway 中进行连接,
select top 1 * from <database>.public.flyway_schema_history
这样您也可以消除区分大小写的可能性。
推荐阅读
- css - 出现滚动条时,使用引导表边框类对齐表格边框不正确
- c# - c# Selenium 获取一个元素
- laravel - Laravel 最佳实践:打印 Json 响应
- android - RecyclerView的第一项和最后一项发生了变化,当只点击一个时
- java - app:pstsShouldExpand="true" 使我的应用程序崩溃
- php - 如何在 eloquent 的多个关系字段上使用 count 和 orderBy?
- java - 尝试获取新的 ServerSocket 以打开失败
- c# - 如何从 linq 查询发送数据到查看页面
- java - Java WebCam Streaming over TCP Socket,将图像序列重定向到客户端接收者
- android - 使用 google DNS 运行时,Android 模拟器中的地址也无法访问