Home > Forum > Installation > DbId

DbId
0

Hi,

I have a question about DbId

I have environments dev / test / prod.

Dev / Test new installations.
Prod old one

Webcon Version - Newest

For dev / test I see
CD_ID | CD_Name
1 BPS_Content
2 http://xyz:8983/solr/
3 BPS_Content

But for the prod I have
CD_ID | CD_Name
1 BPS_Main
6 http://xyz:8983/solr/

I anticipate that a new entry with ID 7 will be created for prod.

Can I overwrite this ID and change it?

This can be done from the table level, but do any other entries need to be modified, and does this have any other consequences?

MVP

Hello,
dbid is the id of a database in an environment.
Having 3 separate environments dev/test/prod is having 3 separate windows servers, each running a webcon instance (that would be correct setup).

There are few tables, which have foreign keys to ContentDatabases table, which you can find here: https://developer.webcon.com/2025/resources/db/#ContentDatabases

Manually updating WEBCON tables breaks Terms of Service, means you are free to do it, but if anything breaks -> good luck and have fun.

I've never faced a use case in which i'd need to have the same id's of databases between environments, could you explain a bit more, why you want to keep the ids the same between environments?

MVP
In reply to: BK Webcon

I want to use reverse proxy and publish Webcon API definitions.

https://xyz.net/[dev/test/prod]/api/udef/db/3/orders

reverse proxy will change url to
https://dev.net/api/udef/db/3/orders

Db id is in the path as parameter so for the integrators it will be transparent
otherwise on dev test I will have 3 and on the prod 7

I'd say it's good for integrators to be aware which environment they are using, and thus they should create integration in such way that it handles the database id - they have to know different url's, so mapping this url = that db id won't be a rocket science.
Although i don't know whole picture so in this case you could just use url-rewrites if you have to expose whole path of the url:

https://xyz.net/[dev/test]/api/udef/db/3/orders => https://dev.net/api/udef/db/3/orders
https://xyz.net/[prod]/api/udef/db/3/orders => https://dev.net/api/udef/db/7/orders

If there is no need to expose whole url path, then you could try rewriting it like this:

https://xyz.net/[dev/test]/orders => https://dev.net/api/udef/db/3/orders
https://xyz.net/[prod]/orders => https://dev.net/api/udef/db/7/orders

I'd probably add something like /{app_short_name}/orders, to future-proof.