Yaniv Dary has uploaded a new change for review.

Change subject: history: change enum translator lang codes
......................................................................

history: change enum translator lang codes

Codes are now in standard form.

Change-Id: Iaa95c0d3ce2757cff3d710ff4bef22ba72717bee
Signed-off-by: Yaniv Dary <[email protected]>
---
A 
data-warehouse/historydbscripts_postgres/upgrade/post_upgrade/0010_change_enum_lang_code.sql
D data-warehouse/historydbscripts_postgres/upgrade/post_upgrade/dummy_post.sql
A 
data-warehouse/historydbscripts_postgres/upgrade/pre_upgrade/set_default_lang_code.sql
3 files changed, 13 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-dwh refs/changes/38/11038/1

diff --git 
a/data-warehouse/historydbscripts_postgres/upgrade/post_upgrade/0010_change_enum_lang_code.sql
 
b/data-warehouse/historydbscripts_postgres/upgrade/post_upgrade/0010_change_enum_lang_code.sql
new file mode 100644
index 0000000..b416630
--- /dev/null
+++ 
b/data-warehouse/historydbscripts_postgres/upgrade/post_upgrade/0010_change_enum_lang_code.sql
@@ -0,0 +1,11 @@
+UPDATE enum_translator
+SET language_code = 'en_US'
+WHERE language_code = 'us-en';
+
+UPDATE enum_translator
+SET language_code = 'zh_CN'
+WHERE language_code = 'zh-CN';
+
+UPDATE enum_translator
+SET language_code = '"pt_BR"'
+WHERE language_code = 'pt-BR';
diff --git 
a/data-warehouse/historydbscripts_postgres/upgrade/post_upgrade/dummy_post.sql 
b/data-warehouse/historydbscripts_postgres/upgrade/post_upgrade/dummy_post.sql
deleted file mode 100644
index ab290eb..0000000
--- 
a/data-warehouse/historydbscripts_postgres/upgrade/post_upgrade/dummy_post.sql
+++ /dev/null
@@ -1 +0,0 @@
-select 1;
diff --git 
a/data-warehouse/historydbscripts_postgres/upgrade/pre_upgrade/set_default_lang_code.sql
 
b/data-warehouse/historydbscripts_postgres/upgrade/pre_upgrade/set_default_lang_code.sql
new file mode 100644
index 0000000..eb8215e
--- /dev/null
+++ 
b/data-warehouse/historydbscripts_postgres/upgrade/pre_upgrade/set_default_lang_code.sql
@@ -0,0 +1,2 @@
+INSERT INTO history_configuration(var_name,var_value) SELECT 
'default_language','en_US' WHERE not exists (SELECT var_name FROM 
history_configuration WHERE var_name = 'default_language');
+UPDATE history_configuration SET var_value = 'en_US' WHERE var_name = 
'default_language' and var_value = 'us-en';


--
To view, visit http://gerrit.ovirt.org/11038
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iaa95c0d3ce2757cff3d710ff4bef22ba72717bee
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-dwh
Gerrit-Branch: master
Gerrit-Owner: Yaniv Dary <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to