cubicweb #1056023 be able to specify the schema in which DB tables are created and used [resolved]
For the backends which support it, having some control over the DB Schema used to store the tables can be very useful. A typical case is when the user creating the tables is not the same one as the one making queries. On some rdbms (Oracle, SQLServer are in that case, not sure for PostgreSQL), the user has a default schema linked to his login, and will not be able to use objects outside that schema unless the schema is made explicit in the queries. | |
priority | normal |
---|---|
type | enhancement |
done in | <not specified> |
load | 1.000 |
load left | 0.000 |
closed by | <not specified> |
similar entities
- cubicweb #959523 support unicity of foreign key + value with SQL implementation
- cubicweb #1251790 NOT NULL modifier not set on schema migration
- cubicweb #847652 re enable testing agains real db
- cubicweb #473794 when an entity type is renamed, physical db index should be renamed as well
- cubicweb #736313 End date should be automatically changed on selection of start date
[see all]
Comments
-
2011/03/28 06:35, written by adimascio
-
2011/03/28 06:36, written by adimascio
-
2011/03/28 07:58
-
2011/03/28 08:03, written by adimascio
add commentFor postgresql, a simple "SET SEARCH_PATH TO myschema" early enough would do the trick. Otherwise, modifying cubicweb.server.sqlutils.SQL_PREFIX to be myschema.cw_ should work too.
That said, a somewhat more general solution might be needed : a client might have specific database exploitation rules and specific table naming conventions.
Don't forget cubicweb-ctl db-restore / db-copy / db-dump implementations.
and don't forget FTI indexes : we don't want pollution in there
We might want to consider tablespaces also. DBAs might want to write indexes and data on separate disks.