-
Notifications
You must be signed in to change notification settings - Fork 847
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PostgresSql中,能否增加 些初始个性化处理 #1248
Comments
|
如果 fsql.CodeFirst.GetComparisonDDLStatements<Topic>() 获取创建的 DDL string 内容,再处理 string 会不会很 low |
不会,哈哈,先用。具体怎么用呢? |
发现对于DateTime?的字段在MapType(typeof(DateTIme)下,.IsNull(true).InsertValueSql("null") 是没效果的,必须是在 DbType="timestamp(6)",在null情况下才起效果。 |
fsql.Aop.ConfigEntity += (_, e) => {
e.ModifyResult.Name = $"xxx.{e.ModifyResult.Name}";
};
fsql.Aop.AuditValue += (_, e) => {
if (e.AuditValueType == AuditValueType.Insert &&
e.Column.CsType == typeof(DateTime) && (DateTime)e.Value < new DateTime(1970, 1, 1))
e.Value = new DateTime(1970, 1, 1);
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Feature 特性
PostgresSql中,能否进行个性化配置(能指定默认表空间及索引空间、模式等等),在FreeSqlBuilder中指定
简要描述原因
1、 在实际开发中,出于数据安全及空间规划考虑,postgreSql不可能直接用默认的public模式,系统默认表空间,需要指定特定模式及表空间。一两张表还好,如果多张表就需要在数据库里手工更改或表迁移,就显得繁琐。如果能在FreeSqlBuilder就指定好就省却后续处理
2、插表中,对于表中,对于日期型的可空字段,freesql 会插入0001-01-01 00:00:00,而Oracle会插入null ,能否在PostgreSql也这样实现,毕竟从Oracle转到PostgreSql,对这一点还不大习惯
使用场景
面向postgresql 的codefirst开发及生产库的初始建表
The text was updated successfully, but these errors were encountered: