Fix wrong query of alias info 55/265155/2
authorHwankyu Jhun <h.jhun@samsung.com>
Tue, 12 Oct 2021 05:12:47 +0000 (14:12 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Tue, 12 Oct 2021 05:38:09 +0000 (14:38 +0900)
When calling the sqlite3_prepare_v2() function, the error is occurred.
The error is 'foreign key mismatch'. This patch removes unnecessary query.

Change-Id: Id711b8f6fa6a192e55dd35a5e7b3cefc34e4acb8
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
scripts/12_appsvc-add.post
tool/recovery/appsvc_db_recovery.c

index 353b232..2eff973 100755 (executable)
@@ -37,9 +37,6 @@ CREATE TABLE IF NOT EXISTS alias_info_for_uid (
        uid INTEGER NOT NULL,
        is_enabled TEXT NOT NULL DEFAULT 'false',
        PRIMARY KEY (appid, uid)
-       FOREIGN KEY (appid)
-       REFERENCES alias_info(appid)
-       ON DELETE CASCADE
 );
 
 CREATE TRIGGER IF NOT EXISTS update_alias_info_for_uid
index 0a53cc7..20cd07c 100644 (file)
@@ -44,9 +44,6 @@
         "  uid INTEGER NOT NULL,\n"                                            \
         "  is_enabled TEXT NOT NULL DEFAULT 'false',\n"                        \
         "  PRIMARY KEY (appid, uid)\n"                                         \
-        "  FOREIGN KEY (appid)\n"                                              \
-        "  REFERENCES alias_info(appid)\n"                                     \
-        "  ON DELETE CASCADE\n"                                                \
         ");\n"                                                                 \
         "CREATE TRIGGER IF NOT EXISTS update_alias_info_for_uid\n"             \
         "  AFTER UPDATE ON alias_info_for_uid\n"                               \