FOUR-12173: Develop Wizard Template database schema by estebangallego · Pull Request #5706 · ProcessMaker/processmaker
Summary
This pull request introduces two migrations to enhance the database schema. The changes include:
-
Migration to Add a
asset_typetoprocess_templates:- Added a new migration file (
add__asset_type_column_to_process_templates) to insert a string column after the existingis_systemcolumn in theprocess_templatestable.
- Added a new migration file (
-
Migration for
wizard_templatesTable:- Created a migration file (
create_wizard_templates_table) to define the schema for thewizard_templatestable. - Included columns such as
id,uuid,process_template_id,process_id,media_id, and timestamps. - Defined foreign key constraints for
process_idandmedia_idcolumns.
- Created a migration file (
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_templatestable. - Create
wizard_templatestable with appropriate foreign key constraints.
Testing
-
Migration Stability:
- Run the migration multiple times to ensure it runs without errors.
- Confirm successful rollback operations.
php artisan migratephp artisan migrate:rollback --step=2
-
wizard_templatesTable:- Verify successful creation and deletion during rollback.
- Confirm correct column data types and foreign key constraints.
-
process_templatesTable:- Confirm the addition of the new string column (
asset_typeor actual name) afteris_system. - Verify the data type and nullability of the new column.
- Confirm the addition of the new string column (
-
Rollback Effects:
- Ensure
wizard_templatesdeletion andprocess_templatesrollback to the previous state.
- Ensure
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
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.
