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

[CORE-368] Validate table rename #5272

Merged
merged 4 commits into from
Mar 7, 2025
Merged

[CORE-368] Validate table rename #5272

merged 4 commits into from
Mar 7, 2025

Conversation

calypsomatic
Copy link
Contributor

@calypsomatic calypsomatic commented Mar 5, 2025

Jira Ticket: https://broadworkbench.atlassian.net/browse/CORE-368

Validates table name before allowing rename.
Note: compare to EntityUploader.js - the logic was copied from there but there appears to be some extra validation coming from the datatable provider. Does that need to be included in renaming as well?

Summary of changes:

What

Why

Testing strategy

@calypsomatic calypsomatic changed the title validate table rename [CORE-368] Validate table rename Mar 5, 2025
@calypsomatic calypsomatic marked this pull request as ready for review March 5, 2025 18:43
@calypsomatic calypsomatic requested a review from a team as a code owner March 5, 2025 18:43
format: {
pattern: '^(?!sys_)[a-z0-9_.-]*',
flags: 'i',
message: "Table name may only contain alphanumeric characters, underscores, dashes, and periods and cannot start with 'sys_'.",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

table names cannot contain periods; they can start with sys_. Check the logic in Rawls as the source of truth for validation

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed!

Copy link
Contributor

@kevinmarete kevinmarete left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than David's comment on formatting, looks good to me!

Copy link
Contributor

@davidangb davidangb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ran it locally, works well!

@calypsomatic calypsomatic added this pull request to the merge queue Mar 7, 2025
Merged via the queue into dev with commit dec973d Mar 7, 2025
11 checks passed
@calypsomatic calypsomatic deleted the validate-rename branch March 7, 2025 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants