Skip to content

[DwC export]: Create schemamapping table (or extend spquery) #7747

@grantfitzsimmons

Description

@grantfitzsimmons

Goal

Create the schemamapping table (or extend spquery with equivalent fields) to distinguish schema mapping queries from standard user queries.

Background

The schemamapping record wraps an spquery and adds metadata (MappingType, Name) necessary to segregate mappings from standard queries in the UI. Implementation approach (new table vs. extending spquery) is at the development team's discretion.

Schema (if new table)

Field Type Notes
SchemaMappingID Int (PK) Auto-increment
QueryID FK → spquery One-to-one, Required
MappingType Enum (Core, Extension) Required
Name VarChar User-facing description
IsDefault Boolean Default false; system defaults are read-only

Acceptance Criteria

  • Table (or spquery extension) created in migration.
  • MappingType enforced as enum with only Core and Extension values.
  • One-to-one relationship with spquery enforced.
  • IsDefault = true records are read-only (cannot be edited or deleted via UI).
  • ORM model created and registered.
  • Standard spquery records (non-mapping queries) are unaffected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions