sp_int_dbSet.md 1.5 KB

sp_int_dbSet (procedure)

@author:zhucx @date: @describe:

  • Type: PROCEDURE
  • Deterministic: NO
  • SQL data access: CONTAINS SQL

Parameters

No parameters.

Body

Body is not pre-cached. To inspect: mysql --defaults-file=~/.my.cnf -e 'SHOW CREATE PROCEDUREspint_dbSet'._

Narrative

Business context: Database-migration helper, not a business-flow procedure. One-shot schema-diff/alter routine that walks every table in the legacy xlyweberp_jn schema and adds any columns that don't yet exist in the modern xlyweberp_saas schema — used when an upgrade migrates a customer from the older single-tenant database to the SaaS multi-tenant database.

What it does: Declares hard-coded source xlyweberp_jn and target xlyweberp_saas. Cursors over information_schema.COLUMNS for tables in the source whose name has no underscore (base tables) or contains _tmp, excluding gdsconfigformcustomslavemasterview/gdsconfigformslavemasterview. For each table, a nested cursor finds source columns missing on the target and concatenates them into an ALTER TABLE … ADD COLUMN … statement (datatype, null-ability, default, comment preserved). Executes the alter via prepared statement.

Invocation: Status: appears orphaned. No gdsmodule hook, no form-master reference, no other routine CALLs it, no xly-src grep hit. The hard-coded xlyweberp_jn/xlyweberp_saas schema names confirm it is a developer-run one-off; ship/keep only for historical reference.