diff options
author | JackLivio <jack@livio.io> | 2018-10-19 15:05:09 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-19 15:05:09 -0400 |
commit | d36316738785c96dab2ee892762ed08c059fffde (patch) | |
tree | 168a7c0705b5bc8f0dee7ce4b511ccf71759d9b4 /src/components/policy/policy_external/src/sql_pt_queries.cc | |
parent | 7f7fcbb998fb17f2954fd103349af67ea9b71a3f (diff) | |
parent | 83c5e805346d55ec7fb9f4ba8b6f6855d992273e (diff) | |
download | sdl_core-d36316738785c96dab2ee892762ed08c059fffde.tar.gz |
Merge pull request #2572 from smartdevicelink/release/5.0.05.0.0hotfix/templates_updatesfeature/show_app_menufeature/progress_bar_seekfeature/open-menu-rpcfeature/open-menu-rfeature/button
Release 5.0.0
Diffstat (limited to 'src/components/policy/policy_external/src/sql_pt_queries.cc')
-rw-r--r-- | src/components/policy/policy_external/src/sql_pt_queries.cc | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/src/components/policy/policy_external/src/sql_pt_queries.cc b/src/components/policy/policy_external/src/sql_pt_queries.cc index 9702c315b0..97d75731ea 100644 --- a/src/components/policy/policy_external/src/sql_pt_queries.cc +++ b/src/components/policy/policy_external/src/sql_pt_queries.cc @@ -271,13 +271,21 @@ const std::string kCreateSchema = " REFERENCES `application`(`id`) " "); " "CREATE TABLE IF NOT EXISTS `request_type`( " - " `request_type` VARCHAR(50) NOT NULL, " + " `request_type` VARCHAR(50), " " `application_id` VARCHAR(45) NOT NULL COLLATE NOCASE, " " PRIMARY KEY(`request_type`,`application_id`), " " CONSTRAINT `fk_app_type_application1` " " FOREIGN KEY(`application_id`) " " REFERENCES `application`(`id`) " "); " + "CREATE TABLE IF NOT EXISTS `request_subtype`( " + " `request_subtype` VARCHAR(50), " + " `application_id` VARCHAR(45) NOT NULL COLLATE NOCASE, " + " PRIMARY KEY(`request_subtype`,`application_id`), " + " CONSTRAINT `fk_request_subtype_app_id` " + " FOREIGN KEY(`application_id`) " + " REFERENCES `application`(`id`) " + "); " "CREATE INDEX IF NOT EXISTS `app_type.fk_app_type_application1_idx` " " ON `app_type`(`application_id` COLLATE NOCASE); " "CREATE TABLE IF NOT EXISTS `consent_group`( " @@ -482,6 +490,7 @@ const std::string kDropSchema = "DROP INDEX IF EXISTS `app_type.fk_app_type_application1_idx`; " "DROP TABLE IF EXISTS `app_type`; " "DROP TABLE IF EXISTS `request_type`; " + "DROP TABLE IF EXISTS `request_subtype`; " "DROP INDEX IF EXISTS `nickname.fk_nickname_application1_idx`; " "DROP TABLE IF EXISTS `nickname`; " "DROP INDEX IF EXISTS `app_level.fk_app_level_language2_idx`; " @@ -636,6 +645,11 @@ const std::string kInsertRequestType = "INSERT OR IGNORE INTO `request_type` (`application_id`, `request_type`) " "VALUES (?, ?)"; +const std::string kInsertRequestSubType = + "INSERT INTO `request_subtype` (`application_id`, " + "`request_subtype`) " + "VALUES (?, ?)"; + const std::string kUpdateVersion = "UPDATE `version` SET `number`= ?"; const std::string kInsertMessageType = @@ -760,6 +774,11 @@ const std::string kSelectRequestTypes = "SELECT DISTINCT `request_type` FROM `request_type` WHERE `application_id` " "= ?"; +const std::string kSelectRequestSubTypes = + "SELECT DISTINCT `request_subtype` FROM `request_subtype` WHERE " + "`application_id` " + "= ?"; + const std::string kSelectSecondsBetweenRetries = "SELECT `value` FROM `seconds_between_retry` ORDER BY `index`"; @@ -805,6 +824,8 @@ const std::string kDeleteApplication = "DELETE FROM `application`"; const std::string kDeleteRequestType = "DELETE FROM `request_type`"; +const std::string kDeleteRequestSubType = "DELETE FROM `request_subtype`"; + const std::string kSelectApplicationRevoked = "SELECT `is_revoked` FROM `application` WHERE `id` = ?"; |