我需要使用一些PostgreSQL专有功能,例如规则和触发器来进行表分区.只要我知道,这些功能无法转储到schema.rb,所以我将schema_format配置参数更改为:sql.
现在,当我尝试加载rake db:structure:load将生成的structure.sql加载到heroku数据库时,它失败了:sh:psql:not found
我该怎么做?
在我的Grails 1.3.7项目中,我有一个像这样的域类:
class User {
String login
String password
String name
String passwordConfirmation
static constraints = {
login unique:true, blank:false, maxSize:45
password password:true, blank:false, size:8..45,
matches: /(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?!.*\s).*/
name blank:false, maxSize:45
passwordConfirmation display:true, password:true, validator: { val, obj ->
if (!obj.properties['password'].equals(val)) {
return ['password.mismatch']
}}
}
static transients = ['passwordConfirmation']
String toString() {
name
}
Run Code Online (Sandbox Code Playgroud)
}
我正在使用scaffold进行相应的创建/编辑操作.
我的问题是,即使我标记了要显示的passwordConfirmation约束,它也不会显示在脚手架视图中.是否有一些我缺少的东西可以显示瞬态属性?可能吗?
谢谢