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]
我已经尝试了以下内容:
- 要检查我的数据库是否真的找到这样的列:
select column_name from information_schema.columns where table_name='ce_some_table';
它显示该列名称沿该表格中的其他列存在
- 试图在liquibase中写入SQL语句:
<sql>ALTER TABLE ce_some_table DROP COLUMN some_column;</sql>
没有做这项工作
试图重命名变量(以为数据库元数据已兑现):
<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"/>
也没有工作
- 试图从其他表中删除其他表的布尔列(其他表中有+20) - 没有工作
- 试图放弃其他数据类型的列 - 它的工作(但不是与布尔)
任何我可以尝试的建议?
我已经检查过大小写敏感性和一切匹配,但也许我没有看到它在所有表格中都有的东西
提前感谢您的建议或指出原因
更新:在删除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:
- 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
- Tried to write SQL statement in liquibase:
<sql>ALTER TABLE ce_some_table DROP COLUMN some_column;</sql>
Did not do the job
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
- Have tried to drop other boolean columns from other tables (have +20 of other tables) - did not worked
- 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 hadsome_column
variable
原文:https://stackoverflow.com/questions/50285904
最满意答案
我选择了第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'.
相关问答
更多-
Kristopher Johnson对旧机器是正确的,但它也做了其他事情。 当您设置安装程序时,您可以设置依赖关系和位置来下载这些依赖关系。 Setup.exe执行这些依赖性检查并启动其他MSI文件来安装它们。 这通常用于确保Windows具有正确版本的.NET或安装的C ++运行时。 如果您没有依赖关系,并且可以保证安装了.NET或C ++运行时,则无需分发setup.exe文件。 Kristopher Johnson is correct about the older machines, but it ...
-
无提示安装setup.exe(Silent Installation of setup.exe)[2022-06-20]
我相信应该使用“s”开关。 setup.exe /s应该可以工作,但如果没有,你可以尝试setup.exe /silent 。 如果需要日志,请在切换后添加日志文件的路径。 I believe the "s" switch should be used. setup.exe /s should work, but if not, you can try setup.exe /silent. If you want a log add a path to the log file after the swit ... -
我选择了第1点路线“维护体验” ,这对我有用。 我将项目从InstallScript MSI Project转换为InstallScript Project。 我在Setup.rul文件中得到了编译时错误,但我找到了这些错误的替代方法并修复它们并使脚本能够编译。 到目前为止它工作正常,我可以从单个安装程序'Setup.exe'安装多个实例。 I selected point 1 route "Maintenance Experience" and that worked for me. I converte ...
-
因此,出于某种原因(大脑昙花一现),我开始从这个目录中获取安装: Nexus\NexusInstaller\NexusInstaller\Express\DVD-5\DiskImages\DISK1 事实上,我之前(现在应该)从这个目录中获取它: Nexus\NexusInstaller\NexusInstaller\Express\SingleImage\DiskImages\DISK1 So, for some reason (brain blip) I started getting the in ...
-
如何使用msi安装程序安装同一应用程序的多个实例(how to install multiple instances of the same application using msi Installer)[2021-10-20]
很抱歉,如果您想使用MSI并安装多个实例,则需要实例变换(即更改产品代码) http://msdn.microsoft.com/en-us/library/aa369528(v=VS.85).aspx 你为什么不想使用和实例变换来改变产品代码? Sorry, if you want to use MSI and install multiple instances, you need instance Transforms (i.e. changing the Product Code) http://ms ... -
我不确定,但您可以尝试删除setup.exe,并将.msi放在网站上供用户下载和运行。 .msi可以自己运行。 Okay, this solution works: In the website, use Response.Redirect ("~/[Virtual File Path for setup.exe]"); When compiling the setup project in Visual Studio, make sure that the Installation Url (right- ...
-
要检查的一件事是客户是否安装了IIS6兼容性位。 我有一种感觉,即使在IIS7.x上仍然需要它。 我还会检查安装程序日志,如果有人生成,看看是否有任何跳出来。 并且还值得通过服务器的事件日志进行拖网查看是否有任何记录。 One thing to check is whether the customer installed the IIS6 compatibility bits. I have a feeling this is still needed even on IIS7.x. I'd also c ...
-
问题出在bootstrapper生成器 - 即7.0A bootstrapper生成器。 如果使用6.0A引导程序生成器生成setup.exe,则不会显示错误消息。 一个(hacky)解决方案是使用6.0A引导程序,并为从7.0A获取的必备软件包提供修改后的软件包描述符( product.xml )。 将这两个文件夹复制到C:\Program Files (x86)\Microsoft SDKs\Windows\v6.0A\Bootstrapper\Packages : C:\Program Files ( ...
-
由于微软已经取消了Visual Studio中的安装项目,因此WIX是首选工具。 我一直很喜欢nullsoft安装程序,因为它简单而轻巧。 WIX is the tool of choice now that Microsoft has done away with setup projects in visual studio. I've always liked the nullsoft installer too because of its simplicity and lightweight.
-
使用setup.exe卸载(Uninstalling using setup.exe)[2022-04-03]
您需要拨打这样的电话: msiexec.exe /x {....} 阅读有关Windows Installer服务的更多信息: http : //technet.microsoft.com/en-us/library/cc759262(v = ws.10).aspx You need to make such a call: msiexec.exe /x {.. ..} Read more about the Wind ...