NutzCN Logo
问答 postgresql migrate错误
发布于 2624天前 作者 老司机 1851 次浏览 复制 上一个帖子 下一个帖子
标签:

RT,源码

  Ioc ioc = nc.getIoc();
        Dao dao = ioc.get(Dao.class);
        Daos.createTablesInPackage(dao, Pet.class, false);
        Daos.migration(dao, "petMall.entity", true, true);
8 回复

报错

2017-2-12 3:33:27.737 INFO [RMI TCP Connection(3)-127.0.0.1] del column[is_seller] from table[t_user]
2017-2-12 3:33:27.748 DEBUG [RMI TCP Connection(3)-127.0.0.1] migration Table 't_user' fail!
org.postgresql.util.PSQLException: 错误: 语法错误 在 "from" 或附近的
  位置:12
	at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2455)
	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2155)
	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:288)
	at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:430)
	at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:356)
	at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:168)
	at org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:116)
	at com.alibaba.druid.pool.DruidPooledPreparedStatement.executeQuery(DruidPooledPreparedStatement.java:227)
	at org.nutz.dao.impl.jdbc.AbstractJdbcExpert.getIndexNames(AbstractJdbcExpert.java:471)
	at org.nutz.dao.util.Daos$4.invoke(Daos.java:808)
	at org.nutz.dao.impl.sql.run.NutDaoRunner.runCallback(NutDaoRunner.java:158)
	at org.nutz.dao.impl.sql.run.NutDaoRunner._runWithoutTransaction(NutDaoRunner.java:125)
	at org.nutz.dao.impl.sql.run.NutDaoRunner._run(NutDaoRunner.java:92)
	at org.nutz.dao.impl.sql.run.NutDaoRunner.run(NutDaoRunner.java:81)
	at org.nutz.dao.impl.DaoSupport.run(DaoSupport.java:240)
	at org.nutz.dao.util.Daos.migration(Daos.java:765)

什么版本,换最新版试试

@wendal 就是最新的9.6

来自炫酷的 NutzCN

@qq_c1bab051 9.6是什么东西

我是说nutz的版本号

这样试试

Daos.migration(dao, "petMall.entity", true, true, false);

添加回复
请先登陆
回到顶部