howto:renschema

Renaming a BPS Schema

Examples below are how to rename a schema from lu_agrar to lu_fgb.

  • Create new database users for lu_fgb in the «BPS Users» app. Select all users, then Edit - Update database privileges:

  • Once the new schema is tested to work flawless, you may delete the old schema including roles and users with the «BPS Drop Datastore Wizard»:

  • Connect as superuser (typically user postgres)
  • Rename schema, owner and roles from lu_agrar to lu_fgb (ignore the regular users lu_agraruserid for now):
alter schema lu_agrar rename to lu_fgb;
alter user lu_agrar rename to lu_fgb;
alter role lu_agrar_gst rename to lu_fgb_gst;
alter role lu_agrar_usr rename to lu_fgb_usr;
  • Set password for user lu_fgb to lu_fgbpincode
alter user lu_fgb password 'lu_fgb1234';
  • Create new database users in the «BPS Users» app: Select all users, then Edit - Update database privileges:

  • Delete the old regular users named lu_agraruserid
  • howto/renschema.txt
  • Last modified: 2019/10/15 17:35
  • by ibk