简体   繁体   English

在IBM i(AS / 400,iSeries)上创建播放进化表

[英]Creating the play-evolutions table on an IBM i (AS/400, iSeries)

I'm trying to use the Play 2 Framework and connect to my IBM iSeries DB2 database. 我正在尝试使用Play 2 Framework并连接到我的IBM iSeries DB2数据库。 I seem to be able to make a connection work. 我似乎能够建立连接。 But, when I load the application and it tries to run evolution, it fails with the following error: SQLException: [SQL0204] PLAY_EVOLUTIONS in (database name) type *FILE not found. 但是,当我加载该应用程序并尝试运行Evolution时,它失败,并显示以下错误:SQLException:(数据库名称)类型* FILE中的[SQL0204] PLAY_EVOLUTIONS未找到。

I've looked at several questions but can't find an answer: 我看了几个问题,但找不到答案:

  1. Using Play framework 2 with DB2 (AS400 or LUW) 结合使用Play框架2和DB2(AS400或LUW)
  2. Play Framework and DB2 播放框架和DB2
  3. What's the proper way to generate evolutions table in DB on Play 在Play上的DB中生成Evolutions表的正确方法是什么
    Framework 2.0.3? 框架2.0.3?

The last question was posted by t0mppa in Oct 2012. He says he figured out a way to do it but did not share his method other than to say he worked with the evolutions source and created a solution. 最后一个问题是由t0mppa于2012年10月发布的。他说,他想出了一种解决方法,但除了说他使用了Evolutions源并创建了解决方案外,没有分享他的方法。 I'm not that good. 我不好

I feel that if I could just the table definition then maybe I could build the table manually and have it work. 我觉得,如果我只可以定义表,那么我可以手动构建表并使其工作。

Thanks 谢谢

Bob 短发

I've managed to get a table created that seems to let Evolutions get beyond this problem. 我设法创建了一个表,该表似乎使Evolutions摆脱了这个问题。 I submitted the follow sql statement using STRSQL from the iSeries command line: 我从iSeries命令行使用STRSQL提交了以下sql语句:

CREATE TABLE library /PLAY_EVOLUTIONS (APPLY_SCRIPT CHAR ( 5000) 创建表 / PLAY_EVOLUTIONS(APPLY_SCRIPT CHAR(5000)
NOT NULL WITH DEFAULT, REVERT_SCRIPT CHAR ( 5000) NOT NULL WITH 默认值不为空,REVERT_SCRIPT CHAR(5000)
DEFAULT, "HASH" CHAR ( 5000) NOT NULL WITH DEFAULT, "ID" BIGINT NOT 默认值,“ HASH” CHAR(5000)不为空,默认值,“ ID” BIGINT非
NULL WITH DEFAULT) 默认为空)

I'm not sure that the field sizes are correct (probable not) or big enough. 我不确定字段大小是否正确(可能不是)或足够大。

Now, on to the next problem... 现在,下一个问题...

You could probably also just disable evolutions and create database directly. 您可能还可以禁用演化功能并直接创建数据库。

By overriding properties you could have not only development and production configurations, but several development configurations -- whatever you need. 通过覆盖属性,您不仅可以具有开发和生产配置,还可以具有多个开发配置-无论您需要什么。

example: ~run -Dconfig.resource=development-local-db2.conf 示例: ~run -Dconfig.resource=development-local-db2.conf

See more from here 从这里看到更多

http://www.playframework.com/documentation/2.2.x/ProductionConfiguration http://www.playframework.com/documentation/2.2.x/ProductionConfiguration

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM