summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorSeungha Son <seungha.son@samsung.com>2017-05-30 19:39:49 +0900
committerSeungha Son <seungha.son@samsung.com>2017-06-08 22:40:51 +0900
commitf79bc716af77f514407a97f8a5168184b310e058 (patch)
tree19d8a3845006c9b26390849c861130a9a9a3ed63 /scripts
parent4e9da5e7cd107afe5ebe45d669cd33594cfd3a76 (diff)
downloadnotification-f79bc716af77f514407a97f8a5168184b310e058.tar.gz
notification-f79bc716af77f514407a97f8a5168184b310e058.tar.bz2
notification-f79bc716af77f514407a97f8a5168184b310e058.zip
Arrange naming of pkgid and appid
Signed-off-by: Seungha Son <seungha.son@samsung.com> Change-Id: I3160d8c89a581602e9b680c1922ce9bc5ad1e529
Diffstat (limited to 'scripts')
-rw-r--r--scripts/505.notification_upgrade.sh68
1 files changed, 60 insertions, 8 deletions
diff --git a/scripts/505.notification_upgrade.sh b/scripts/505.notification_upgrade.sh
index d75cb2c..3e39a22 100644
--- a/scripts/505.notification_upgrade.sh
+++ b/scripts/505.notification_upgrade.sh
@@ -16,8 +16,8 @@ DROP TABLE IF EXISTS noti_list_temp;
CREATE TABLE noti_list_temp (
type INTEGER NOT NULL,
layout INTEGER NOT NULL default 0,
- caller_pkgname TEXT NOT NULL,
- launch_pkgname TEXT,
+ caller_app_id TEXT NOT NULL,
+ launch_app_id TEXT,
image_path TEXT,
group_id INTEGER default 0,
internal_group_id INTEGER default 0,
@@ -69,24 +69,75 @@ CREATE TABLE noti_list_temp (
extension_image_size INTEGER default 0,
uid INTEGER
);
-INSERT INTO noti_list_temp (type, layout, caller_pkgname, launch_pkgname, image_path, group_id, internal_group_id, priv_id, title_key, b_text, b_key, tag, b_format_args, num_format_args, text_domain, text_dir, time, insert_time, args, group_args, b_execute_option, b_service_responding, b_service_single_launch, b_service_multi_launch, b_event_handler_click_on_button_1, b_event_handler_click_on_button_2, b_event_handler_click_on_button_3, b_event_handler_click_on_button_4, b_event_handler_click_on_button_5, b_event_handler_click_on_button_6, b_event_handler_click_on_icon, b_event_handler_click_on_thumbnail, sound_type, sound_path, vibration_type, vibration_path, led_operation, led_argb, led_on_ms, led_off_ms, flags_for_property, flag_simmode, display_applist, progress_size, progress_percentage, ongoing_flag, auto_remove) \
+INSERT INTO noti_list_temp (type, layout, caller_app_id, launch_app_id, image_path, group_id, internal_group_id, priv_id, title_key, b_text, b_key, tag, b_format_args, num_format_args, text_domain, text_dir, time, insert_time, args, group_args, b_execute_option, b_service_responding, b_service_single_launch, b_service_multi_launch, b_event_handler_click_on_button_1, b_event_handler_click_on_button_2, b_event_handler_click_on_button_3, b_event_handler_click_on_button_4, b_event_handler_click_on_button_5, b_event_handler_click_on_button_6, b_event_handler_click_on_icon, b_event_handler_click_on_thumbnail, sound_type, sound_path, vibration_type, vibration_path, led_operation, led_argb, led_on_ms, led_off_ms, flags_for_property, flag_simmode, display_applist, progress_size, progress_percentage, ongoing_flag, auto_remove) \
SELECT type, layout, caller_pkgname, launch_pkgname, image_path, group_id, internal_group_id, priv_id, title_key, b_text, b_key, tag, b_format_args, num_format_args, text_domain, text_dir, time, insert_time, args, group_args, b_execute_option, b_service_responding, b_service_single_launch, b_service_multi_launch, b_event_handler_click_on_button_1, b_event_handler_click_on_button_2, b_event_handler_click_on_button_3, b_event_handler_click_on_button_4, b_event_handler_click_on_button_5, b_event_handler_click_on_button_6, b_event_handler_click_on_icon, b_event_handler_click_on_thumbnail, sound_type, sound_path, vibration_type, vibration_path, led_operation, led_argb, led_on_ms, led_off_ms, flags_for_property, flag_simmode, display_applist, progress_size, progress_percentage, ongoing_flag, auto_remove FROM noti_list;
UPDATE noti_list_temp SET uid=5001;
DROP TABLE noti_list;
ALTER TABLE noti_list_temp RENAME TO noti_list;
+
+DROP TABLE IF EXISTS noti_group_data_temp;
+CREATE TABLE noti_group_data_temp (
+ caller_app_id TEXT NOT NULL,
+ group_id INTEGER default 0,
+ badge INTEGER default 0,
+ title TEXT,
+ content TEXT,
+ loc_title TEXT,
+ loc_content TEXT,
+ count_display_title INTEGER,
+ count_display_content INTEGER,
+ rowid INTEGER PRIMARY KEY AUTOINCREMENT,
+ UNIQUE (caller_app_id, group_id)
+);
+INSERT INTO noti_group_data_temp (caller_app_id, group_id, badge, title, content, loc_title, loc_content, count_display_title, count_display_content, rowid) \
+SELECT caller_pkgname, group_id, badge, title, content, loc_title, loc_content, count_display_title, count_display_content, rowid FROM noti_group_data;
+DROP TABLE noti_group_data;
+ALTER TABLE noti_group_data_temp RENAME TO noti_group_data;
+
+
+DROP TABLE IF EXISTS ongoing_list_temp;
+CREATE TABLE ongoing_list_temp (
+ caller_app_id TEXT NOT NULL,
+ launch_app_id TEXT,
+ icon_path TEXT,
+ group_id INTEGER default 0,
+ internal_group_id INTEGER default 0,
+ priv_id INTERGER NOT NULL,
+ title TEXT,
+ content TEXT,
+ default_content TEXT,
+ loc_title TEXT,
+ loc_content TEXT,
+ loc_default_content TEXT,
+ text_domain TEXT,
+ text_dir TEXT,
+ args TEXT,
+ group_args TEXT,
+ flag INTEGER default 0,
+ progress_size DOUBLE default 0,
+ progress_percentage DOUBLE default 0,
+ rowid INTEGER PRIMARY KEY AUTOINCREMENT,
+ UNIQUE (caller_app_id, priv_id)
+);
+INSERT INFO ongoing_list_temp (caller_app_id, launch_app_id, icon_path, group_id, internal_group_id, priv_id, title, content, default_content, loc_title, loc_content, loc_default_content, text_domain, text_dir, args, group_args, flag, progress_size, progress_percentage, rowid) \
+SELECT caller_pkgname, launch_pkgname, icon_path, group_id, internal_group_id, priv_id, title, content, default_content, loc_title, loc_content, loc_default_content, text_domain, text_dir, args, group_args, flag, progress_size, progress_percentage, rowid FROM ongoing_list;
+DROP_TABLE ongoing_list;
+ALTER TABLE ongoing_list_temp RENAME TO ongoing_list;
+
+
DROP TABLE IF EXISTS notification_setting;
CREATE TABLE notification_setting (
uid INTEGER,
package_name TEXT NOT NULL,
- appid TEXT NOT NULL,
+ app_id TEXT NOT NULL,
allow_to_notify INTEGER DEFAULT 1,
do_not_disturb_except INTEGER DEFAULT 0,
visibility_class INTEGER DEFAULT 0,
pop_up_notification INTEGER DEFAULT 1,
lock_screen_content_level INTEGER DEFAULT 0,
app_disabled INTEGER DEFAULT 0,
- UNIQUE (uid, package_name, appid)
+ UNIQUE (uid, package_name, app_id)
);
@@ -110,12 +161,13 @@ UPDATE notification_system_setting_temp SET uid=5001;
DROP TABLE notification_system_setting;
ALTER TABLE notification_system_setting_temp RENAME TO notification_system_setting;
+
DROP TABLE IF EXISTS noti_template;
CREATE TABLE noti_template (
type INTEGER NOT NULL,
layout INTEGER NOT NULL default 0,
- caller_pkgname TEXT NOT NULL,
- launch_pkgname TEXT,
+ caller_app_id TEXT NOT NULL,
+ launch_app_id TEXT,
image_path TEXT,
group_id INTEGER default 0,
internal_group_id INTEGER default 0,
@@ -167,7 +219,7 @@ CREATE TABLE noti_template (
extension_image_size INTEGER default 0,
uid INTEGER,
template_name TEXT,
- UNIQUE (caller_pkgname, template_name)
+ UNIQUE (caller_app_id, template_name)
);
EOF