Comments (9)
为么测试环境和生产环境schema不一致,这不是给自己挖坑?
from efcore.sharding.
为么测试环境和生产环境schema不一致,这不是给自己挖坑?
这不是 sit 环境跟 prd 环境一不一致的问题, 那只是我描述发现问题的过程
只是感觉这 schema 写死在 table 标签, 配置连接字符串的"Search Path"也没用, 不太好
而且查询方法是没问题的, 就这个 UpdateSql 要组装 SQL 的地方给报错了
from efcore.sharding.
为么测试环境和生产环境schema不一致,这不是给自己挖坑?
通常生产环境的Schema不会取名默认的Public.
假如Postgresql的Schema是“Other”,希望从Postgresql的连接字符串比如Search Path="Othter",框架自动取得Schema:“Other”, UpdateSQL方法会使用Other.TABLCNMMA来执行语句
from efcore.sharding.
为什么测试环境不设为Othter?
并且标准连接字符串中并没有这个定义,https://www.connectionstrings.com/npgsql/
如果想自己定义,这不符合约定大于配置原则
from efcore.sharding.
为什么测试环境不设为Othter?
测试环境可以使用啊,重新改成'Other',重新编译即可,但如果将来生产环境改名或其他项目不用这个名字了岂不是要重新编译造成不便呀。
并且标准连接字符串中并没有这个定义,https://www.connectionstrings.com/npgsql/
有呀,参考:https://www.npgsql.org/doc/connection-string-parameters.html
Search Path | Sets the schema search path. 设置此值会拿到实际使用的schema
如果想自己定义,这不符合约定大于配置原则
这是客户安全部门的硬性要求不能使用默认schema名称,没办法啊
from efcore.sharding.
这个schema应该是按照业务划分的,在数据库设计的时候就应该定下来,而不是说可以随便改变的东西
只要代码是同一份,那么数据库就应该是一样的结构
from efcore.sharding.
这个schema应该是按照业务划分的,在数据库设计的时候就应该定下来,而不是说可以随便改变的东西
只要代码是同一份,那么数据库就应该是一样的结构
对的,一般定下来就不会改的,只是如果您的框架能通过更改配置自适应Schema那就更加完美了。
from efcore.sharding.
做都能做,但是没必要做,如果仅仅为了支持这种特殊场景而去自定义一个配置项,意义不大
所以不考虑
from efcore.sharding.
做都能做,但是没必要做,如果仅仅为了支持这种特殊场景而去自定义一个配置项,意义不大
所以不考虑
了解。
from efcore.sharding.
Related Issues (20)
- IBaseDbAccessor的异步方法应当支持CancellationToken
- 能否支持分区表 HOT 1
- 添加保存过滤器和查询过滤器
- 耗时或异常SQL日志 HOT 1
- .net5.0 mysql 按时间分表,插入数据时报错 HOT 1
- 使用MAX()函数,出现异常 System.InvalidOperationException:“Sequence contains no elements.”
- 能否考虑开放IDbAccessor实现类的访问级别? HOT 1
- IShardingQueryable能否继承IQueryable HOT 2
- 使用sqlite时出错 HOT 1
- 什么时候支持.net6 HOT 1
- 按照时间分表,分页查询的时候只查询当天的? HOT 1
- DbContext长时间(14.087031281666667m)未释放 HOT 3
- 项目引入包报错
- 设置多个表按时间进行分表,程序启动时只有一个表的分表被创建 HOT 3
- 是根据shardingsphere的接口定义开发的.net库吗
- GetListBySqlAsync这些方法有可能恢复吗?主要是为了代码同意及易用性
- 请问项目还继续维护吗? HOT 8
- 能把框架和组件包升级一下吗?
- 框架Colder.Admin.AntdVue 升级.net6引用支持.net6的EFCore.Sharding查询注入报Method not found
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from efcore.sharding.