-
Create a branch on the TPCore repository
-
In TPCore go to TPCore/Database/UpdateScripts/Ultrafit
-
Open the release date folder that your new feature flag scripts will be released on. If the folder does not exist then create it.(example: 2018-01-04)
-
Inside the release date folder you should see two folders:
- 1PreScripts
- 2PostScripts
-
Open the 1PreScripts folder
-
Inside the 1PreScripts folder create the .sql file for your feature flag script.(example: addCoachDeskFeatureFlag.sql) You can also cut and paste a previous existing script file for reference.
-
Inside of your new sql file you need to create the script for your feature flag. -Example:
``` IF NOT EXISTS (SELECT * FROM FeatureFlag WHERE Name = 'coachDesk') BEGIN PRINT 'Creating coachDesk feature flag'; INSERT INTO FeatureFlag (Name, Enabled) VALUES ('coachDesk', 0); END ```
-
Replace coachDesk with the name for your feature flag. The 0 following coachDesk in the INSERT INTO script represents a bool. In this case 0 = false for disabled.
-
Inside the 1PreScripts folder you should aslo have an update.txt file. Inside of the update.txt file add the name of your new feature flag file.(example: addCoachDeskFeatureFlag.sql)
-
Now in DBeaver run your script and you should see the PRINT message from your script.
-
Now in DBeaver check the list of all feature flags and your new feature flag should be listed.
- In DBeaver access the dev database devdb04.dev.trainingpeaks.com
- Run the command to enable the feature flag. Be sure to include WHERE so that you only enable your flag.
* UPDATE featureflag SST ENABLE=1 WHERE NAME = 'coachDesk'