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

FOUR-12173: Develop Wizard Template database schema #5706

Merged
merged 3 commits into from Nov 29, 2023
Merged

Conversation

estebangallego
Copy link
Contributor

@estebangallego estebangallego commented Nov 28, 2023

Summary

This pull request introduces two migrations to enhance the database schema. The changes include:

  1. Migration to Add a asset_type to process_templates:

    • Added a new migration file (add__asset_type_column_to_process_templates) to insert a string column after the existing is_system column in the process_templates table.
  2. Migration for wizard_templates Table:

    • Created a migration file (create_wizard_templates_table) to define the schema for the wizard_templates table.
    • Included columns such as id, uuid, process_template_id, process_id, media_id, and timestamps.
    • Defined foreign key constraints for process_id and media_id columns.

Reason for the Changes

The additions to the database schema were necessary to accommodate new requirements and improve data management for the development of Wizard Templates.

Checklist

  • New column added to process_templates table.
  • Create wizard_templates table with appropriate foreign key constraints.

Testing

  1. Migration Stability:

    • Run the migration multiple times to ensure it runs without errors.
    • Confirm successful rollback operations.
    • php artisan migrate
    • php artisan migrate:rollback --step=2
  2. wizard_templates Table:

    • Verify successful creation and deletion during rollback.
    • Confirm correct column data types and foreign key constraints.
  3. process_templates Table:

    • Confirm the addition of the new string column (asset_type or actual name) after is_system.
    • Verify the data type and nullability of the new column.
  4. Rollback Effects:

    • Ensure wizard_templates deletion and process_templates rollback to the previous state.

These steps cover essential aspects of migration stability, table and column creation, rollback effects, and functional verification. Adjust the steps based on your specific requirements.

Related Issues

Ticket FOUR-12173

Screenshots

Screenshot 2023-11-28 at 11 04 10 AM


Code Review Checklist

  • I have pulled this code locally and tested it on my instance, along with any associated packages.
  • This code adheres to ProcessMaker Coding Guidelines.
  • This code includes a unit test or an E2E test that tests its functionality, or is covered by an existing test.
  • This solution fixes the bug reported in the original ticket.
  • This solution does not alter the expected output of a component in a way that would break existing Processes.
  • This solution does not implement any breaking changes that would invalidate documentation or cause existing Processes to fail.
  • This solution has been tested with enterprise packages that rely on its functionality and does not introduce bugs in those packages.
  • This code does not duplicate functionality that already exists in the framework or in ProcessMaker.
  • This ticket conforms to the PRD associated with this part of ProcessMaker.

@estebangallego estebangallego changed the base branch from develop to next November 28, 2023 16:06
@eiresendez eiresendez self-requested a review November 28, 2023 16:43
Copy link
Contributor

@eiresendez eiresendez left a comment

Choose a reason for hiding this comment

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

LGTM great job!

Copy link

@ryancooley ryancooley merged commit 3b20fe7 into next Nov 29, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants