mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-22 19:07:54 +01:00
13 lines
396 B
SQL
13 lines
396 B
SQL
--create new strategies-column
|
|
ALTER TABLE features ADD "strategies" json;
|
|
|
|
--populate the strategies column
|
|
UPDATE features
|
|
SET strategies = ('[{"name":"'||f.strategy_name||'","parameters":'||f.parameters||'}]')::json
|
|
FROM features as f
|
|
WHERE f.name = features.name;
|
|
|
|
--delete old strategy-columns
|
|
ALTER TABLE features DROP COLUMN "strategy_name";
|
|
ALTER TABLE features DROP COLUMN "parameters";
|