Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Django Command: Create Missing Schema Config Records for Disciplines #6264

Open
grantfitzsimmons opened this issue Feb 20, 2025 · 0 comments
Labels
Migration Prs that contain migration

Comments

@grantfitzsimmons
Copy link
Member

Summary

We need a Django command to create new schema configuration records for disciplines that currently do not have any. This command should also fill in any gaps for disciplines that are missing SpLocaleContainer records for tables and fields not included in the current configuration.

If a discipline already has populated splocalecontainer, splocalecontaineritem, andsplocaleitemstr records, but are missing the appropriate values to be able to edit the captions and description for the absoluteage table and fields, or the tectonicUnit many-to-one field is missing from paleocontext, those gaps should be automatically filled by this sytem.

Acceptance Criteria

  • The command should identify all disciplines without SpLocaleContainer and associated schema records .
  • For each identified discipline, the command should create the necessary schema configuration records based on the current application structure.
  • The command should log the actions taken, including any records created or skipped.
  • We need to ensure that the command does not overwrite existing records or configurations, so all configured schema captions, labels, and assigned field formats, picklists, weblinks, etc. should remain without any issue.
  • This must work with multiple schema languages configured.

Implementation Details

  • Suggested command name: create_schema_config_records
  • Implement a check for existing records before creating new ones.

More information about the issue (staff only): https://discourse.specifysoftware.org/t/adding-a-collection-to-specify-7-can-it-be-done/2363

@grantfitzsimmons grantfitzsimmons added the Migration Prs that contain migration label Feb 20, 2025
@grantfitzsimmons grantfitzsimmons changed the title New Django App: Create Missing Schema Config Records for Disciplines New Django Command: Create Missing Schema Config Records for Disciplines Mar 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Migration Prs that contain migration
Projects
None yet
Development

No branches or pull requests

1 participant