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

Handle NULL in default/actual values in vdc_options #300

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,2 +1,21 @@
-- Make sure that forgotten options from ancient releases have default value
UPDATE vdc_options
SET default_value = option_value
WHERE
default_value IS NULL
AND option_value IS NOT NULL;

-- If there are still some crappy options, let's set default value to empty string
mwperina marked this conversation as resolved.
Show resolved Hide resolved
UPDATE vdc_options
SET default_value = ''
WHERE
default_value IS NULL
AND option_value IS NULL;

-- We shouldn't have any options with NULL values by now, but let's make sure
UPDATE vdc_options
SET option_value = ''
WHERE option_value IS NULL;

SELECT fn_db_change_column_null('vdc_options', 'default_value', false);
SELECT fn_db_change_column_null('vdc_options', 'option_value', false);