首页 \ 问答 \ dropColumn布尔变量时,liquibase迁移失败(liquibase migration failed while dropColumn boolean variable)

dropColumn布尔变量时,liquibase迁移失败(liquibase migration failed while dropColumn boolean variable)

我正在使用Liquibase来链接数据库(H2)的变更,最近我遇到了删除不必要的列迁移异常: Caused by: org.h2.jdbc.JdbcSQLException: View "ALTER TABLE PUBLIC.CE_SOME_TABLE DROP COLUMN some_column" is invalid: "Column ""SOME_TABLE .SOME_COLUMN"" not found [42122-190]"; SQL statement: ALTER TABLE PUBLIC.CE_SOME_TABLE DROP COLUMN some_column[90109-190] Caused by: org.h2.jdbc.JdbcSQLException: View "ALTER TABLE PUBLIC.CE_SOME_TABLE DROP COLUMN some_column" is invalid: "Column ""SOME_TABLE .SOME_COLUMN"" not found [42122-190]"; SQL statement: ALTER TABLE PUBLIC.CE_SOME_TABLE DROP COLUMN some_column[90109-190]

我已经尝试了以下内容:

  1. 要检查我的数据库是否真的找到这样的列:

select column_name from information_schema.columns where table_name='ce_some_table';

它显示该列名称沿该表格中的其他列存在

  1. 试图在liquibase中写入SQL语句:

<sql>ALTER TABLE ce_some_table DROP COLUMN some_column;</sql>

没有做这项工作

  1. 试图重命名变量(以为数据库元数据已兑现):

    <renameColumn catalogName="some_catalog" columnDataType="boolean" newColumnName="some_column2" oldColumnName="some_column" remarks="A Boolean" schemaName="public" tableName="CE_SOME_TABLE"/>

然后删除更新的列:

<dropColumn tableName="CE_SOME_TABLE" columnName="some_column2"/>

也没有工作

  1. 试图从其他表中删除其他表的布尔列(其他表中有+20) - 没有工作
  2. 试图放弃其他数据类型的列 - 它的工作(但不是与布尔)

任何我可以尝试的建议?

我已经检查过大小写敏感性和一切匹配,但也许我没有看到它在所有表格中都有的东西

提前感谢您的建议或指出原因

更新:在删除some_column后,在同一chainSet中,我修改了具有some_column变量的VIEW表


I am using Liquibase for chaining Data Base (H2) alterations and recently I faced removal of unnecessary column migration exception: Caused by: org.h2.jdbc.JdbcSQLException: View "ALTER TABLE PUBLIC.CE_SOME_TABLE DROP COLUMN some_column" is invalid: "Column ""SOME_TABLE .SOME_COLUMN"" not found [42122-190]"; SQL statement: ALTER TABLE PUBLIC.CE_SOME_TABLE DROP COLUMN some_column[90109-190]

I have tried the following:

  1. To check if my DB really find such column:

select column_name from information_schema.columns where table_name='ce_some_table';

It shows that such column name exists along the other columns in that table

  1. Tried to write SQL statement in liquibase:

<sql>ALTER TABLE ce_some_table DROP COLUMN some_column;</sql>

Did not do the job

  1. Tried to rename variable (thought DB metadata was cashed):

    <renameColumn catalogName="some_catalog" columnDataType="boolean" newColumnName="some_column2" oldColumnName="some_column" remarks="A Boolean" schemaName="public" tableName="CE_SOME_TABLE"/>

And then to drop the renewed column:

<dropColumn tableName="CE_SOME_TABLE" columnName="some_column2"/>

Also have not worked

  1. Have tried to drop other boolean columns from other tables (have +20 of other tables) - did not worked
  2. Have tried to drop other data type columns - it worked (but not with boolean)

Any advices I could try next?

I have checked case sensitivity and everything matches but maybe I do not see something as it accours in all tables

Thank you in advance for your advises or pinpointing the reason

UPDATE: In the same chainSet after dropping the some_column I modify VIEW table which had some_column variable


原文:https://stackoverflow.com/questions/50285904
更新时间:2023-07-04 07:07

最满意答案

我选择了第1点路线“维护体验” ,这对我有用。

我将项目从InstallScript MSI Project转换为InstallScript Project。 我在Setup.rul文件中得到了编译时错误,但我找到了这些错误的替代方法并修复它们并使脚本能够编译。

到目前为止它工作正常,我可以从单个安装程序'Setup.exe'安装多个实例。


I selected point 1 route "Maintenance Experience" and that worked for me.

I converted my project from InstallScript MSI Project to InstallScript Project. I got the compile time errors in Setup.rul file but I find the alternatives for those errors and fix them and make the script able to compile.

So far it is working fine and I am able to install multiple instances from single installer 'Setup.exe'.

相关问答

更多

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。