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

Fix to issue 244 #253

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from
Open

Fix to issue 244 #253

wants to merge 3 commits into from

Conversation

creek23
Copy link

@creek23 creek23 commented Dec 22, 2022

Description

Updated misspelled varible to variable on SQL dumps from server's bootstrap and migration directory.

This should fix the reported

Fixes #244

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Changes would cause existing functionality to not work as expected
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@CLAassistant
Copy link

CLAassistant commented Dec 22, 2022

CLA assistant check
All committers have signed the CLA.

@@ -1,8 +1,8 @@
INSERT INTO `natural_text_actions` (`id`, `workspace_type`, `natural_text`, `data`, `display_name`, `snippet_class`, `action`, `created_date`, `updated_date`,`condition_type`, `allowed_values`, `import_to_web`, `import_to_mobile_web`, `import_to_android_native`, `import_to_ios_native`) VALUES
Copy link
Contributor

Choose a reason for hiding this comment

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

@creek23 You need to add update statements in a new migration file instead of changing the old migration files

Copy link
Author

Choose a reason for hiding this comment

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

I'm preparing the SQL file with UPDATE statements which I believe can be used by existing install but I'd like to ask: Why not correct this file now -- why should we allow fresh installs to have this mistake?

Copy link
Contributor

Choose a reason for hiding this comment

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

There are 2 scenarios here. For fresh install, your suggestion makes sense. But for migration from previous versions to the latest, the checksum for the migration files will fail. The migration files once applied will be stored in a db table with its calculated checksum. Once you change the file, the checksum wont match

Copy link
Author

Choose a reason for hiding this comment

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

I don't know how Testsigma Server handles migration; for the "new migration file" you are asking, what filename should it be? -- I mean, how can Testsigma Server know that a new migration file is waiting to be triggered? Since it's modifying 2 separate tables, should it be 2 separate SQL files?

Copy link
Contributor

Choose a reason for hiding this comment

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

@creek23 The filename can be anything as long as it follows the existing naming pattern. Testsigma tracks all the migration files it has applied till now in the table flyway_schema_history

INSERT INTO `natural_text_action_examples` (`id`, `natural_text_action_id`, `description`, `example`, `workspace`, `data`, `created_date`, `updated_date`) VALUES (855,10209,'Store current Test Data Profile Name/Test Data Set Index/Test Data Set Name value into runtime varible','In this example, We will store the Test data profile related data into run time variable','https://app.testsigma.com/','{"attribute": "name", "test-data": "TestDataName"}','2021-12-23 17:34:05','2021-12-23 17:34:05');
INSERT INTO `natural_text_action_examples` (`id`, `natural_text_action_id`, `description`, `example`, `workspace`, `data`, `created_date`, `updated_date`) VALUES (856,20163,'Store current Test Data Profile Name/Test Data Set Index/Test Data Set Name value into runtime varible','In this example, We will store the Test data profile related data into run time variable','https://app.testsigma.com/','{"attribute": "name", "test-data": "TestDataName"}','2021-12-23 17:34:05','2021-12-23 17:34:05');
INSERT INTO `natural_text_action_examples` (`id`, `natural_text_action_id`, `description`, `example`, `workspace`, `data`, `created_date`, `updated_date`) VALUES (857,30192,'Store current Test Data Profile Name/Test Data Set Index/Test Data Set Name value into runtime varible','In this example, We will store the Test data profile related data into run time variable','https://app.testsigma.com/','{"attribute": "name", "test-data": "TestDataName"}','2021-12-23 17:34:05','2021-12-23 17:34:05');
INSERT INTO `natural_text_action_examples` (`id`, `natural_text_action_id`, `description`, `example`, `workspace`, `data`, `created_date`, `updated_date`) VALUES (854,1095,'Store current Test Data Profile Name/Test Data Set Index/Test Data Set Name value into runtime variable','In this example, We will store the Test data profile related data into run time variable','https://app.testsigma.com/','{"attribute": "name", "test-data": "TestDataName"}','2021-12-23 17:34:05','2021-12-23 17:34:05');
Copy link
Contributor

Choose a reason for hiding this comment

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

@creek23 Same as in above statement

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.

[Bug]: displaying "~value into varible" instead of "~value into variable"
3 participants