SQL(
    PRAGMA foreign_keys = ON;
    BEGIN TRANSACTION;
)
/*TODO: secure_by_default should be 0 by default*/
CREATE_TABLE(GlobalProperties)
    COLUMN_NOT_NULL(secure_by_default,       INT,          DEFAULT 1)
    COLUMN_NOT_NULL(roaming_data_usage,      TINYINT,      DEFAULT 1)
    COLUMN_NOT_NULL(cookie_sharing_mode,          INT,          DEFAULT 0)
CREATE_TABLE_END()

SQL(
    INSERT INTO GlobalProperties DEFAULT VALUES;
)

CREATE_TABLE(WidgetInfo)
    COLUMN_NOT_NULL(app_id,         INTEGER, PRIMARY KEY AUTOINCREMENT)
    COLUMN(widget_type,             INT,     DEFAULT 1)
    COLUMN(widget_id,               TEXT,    DEFAULT '')
    COLUMN(widget_version,          TEXT,    DEFAULT '')
    COLUMN(widget_width,            INT,     DEFAULT 0)
    COLUMN(widget_height,           INT,     DEFAULT 0)
    COLUMN(author_name,             TEXT,    DEFAULT '')
    COLUMN(author_email,            TEXT,    DEFAULT '')
    COLUMN(author_href,             TEXT,    DEFAULT '')
    COLUMN(base_folder,             TEXT,    DEFAULT '')
    COLUMN(webkit_plugins_required, TINYINT, DEFAULT 0)
    COLUMN(security_domain,         INT,     DEFAULT 0)
    COLUMN(csp_policy,              TEXT,    DEFAULT '')
    COLUMN(csp_policy_report_only,  TEXT,    DEFAULT '')
    COLUMN(recognized,              INT,     DEFAULT 0)
    COLUMN(wac_signed,              INT,     DEFAULT 0)
    COLUMN(distributor_signed,      INT,     DEFAULT 0)
    COLUMN(min_version,             TEXT,    DEFAULT '1.0')
    COLUMN_NOT_NULL(back_supported, TINYINT, DEFAULT 0)
    COLUMN(access_network,          TINYINT, DEFAULT 0)
    COLUMN(defaultlocale,           TEXT,    DEFAULT 0)
    COLUMN_NOT_NULL(tizen_pkgid,    TEXT,    DEFAULT '')
    COLUMN_NOT_NULL(tizen_appid,    TEXT,    DEFAULT 0 UNIQUE)
    COLUMN(pkg_type,                INT,     DEFAULT 0)
    COLUMN(security_model_version,  INT,     DEFAULT 0)
CREATE_TABLE_END()

SQL(
    CREATE INDEX IF NOT EXISTS WidgetInfo_AppidIndex ON WidgetInfo(tizen_appid);
)

CREATE_TABLE(WidgetCertificate)
    COLUMN_NOT_NULL(app_id,                 INT,)
    COLUMN_NOT_NULL(cert_source,            INT,    CHECK(cert_source between 0 and 1))
    COLUMN_NOT_NULL(encoded_chain,          VARCHAR(16000),)
    TABLE_CONSTRAINTS(
        FOREIGN KEY (app_id) REFERENCES WidgetInfo (app_id) ON DELETE CASCADE
    )
CREATE_TABLE_END()

CREATE_TABLE(WidgetWindowModes)
    COLUMN_NOT_NULL(app_id,         INT,)
    COLUMN_NOT_NULL(window_mode,    VARCHAR(256),)
    TABLE_CONSTRAINTS(
        FOREIGN KEY (app_id) REFERENCES WidgetInfo (app_id) ON DELETE CASCADE
    )
CREATE_TABLE_END()

CREATE_TABLE(LocalizedWidgetInfo)
    COLUMN_NOT_NULL(app_id,         INT,)
    COLUMN_NOT_NULL(widget_locale,  TEXT,)
    COLUMN(widget_name,             TEXT,)
    COLUMN(widget_shortname,        TEXT,)
    COLUMN(widget_description,      TEXT,)
    COLUMN(widget_license,          TEXT,)
    COLUMN(widget_license_file,     TEXT,)
    COLUMN(widget_license_href,     TEXT,)

    TABLE_CONSTRAINTS(
        PRIMARY KEY (app_id, widget_locale),
        FOREIGN KEY (app_id) REFERENCES WidgetInfo (app_id) ON DELETE CASCADE
    )
CREATE_TABLE_END()

CREATE_TABLE(WidgetExtendedInfo)
    COLUMN_NOT_NULL(app_id,     INTEGER,        PRIMARY KEY)
    COLUMN(last_update_time,    BIGINT,         DEFAULT 0)
    COLUMN(install_time,        BIGINT,         DEFAULT 0)
    COLUMN(option_state,        INT,            DEFAULT 0)
    COLUMN(share_href,          TEXT,           DEFAULT '')
    COLUMN(signature_type,      INT,            DEFAULT 0)
    COLUMN(updated,             INT,            DEFAULT 0)
    COLUMN(update_policy,       INT,            DEFAULT 0)
    COLUMN_NOT_NULL(test_widget, INT, CHECK(test_widget between 0 and 1) DEFAULT 0)
    COLUMN(splash_img_src,      TEXT,           DEFAULT '')
    COLUMN(background_page,     TEXT,           DEFAULT '')
    COLUMN(installed_path,      TEXT,           DEFAULT '')
    TABLE_CONSTRAINTS(
        FOREIGN KEY(app_id) REFERENCES WidgetInfo (app_id) ON DELETE CASCADE
    )
CREATE_TABLE_END()

CREATE_TABLE(WidgetPreference)
    COLUMN_NOT_NULL(app_id,     INTEGER,)
    COLUMN_NOT_NULL(tizen_appid,    TEXT,           DEFAULT 0)
    COLUMN_NOT_NULL(key_name,       TEXT,)
    COLUMN(key_value,               TEXT,           DEFAULT '')
    COLUMN(readonly,                INT,            DEFAULT 0)

    TABLE_CONSTRAINTS(
        PRIMARY KEY(app_id, key_name),
        FOREIGN KEY(app_id) REFERENCES WidgetInfo (app_id) ON DELETE CASCADE
    )
CREATE_TABLE_END()

CREATE_TABLE(WidgetFeature)
    COLUMN_NOT_NULL(widget_feature_id,  INTEGER,        primary key autoincrement)
    COLUMN_NOT_NULL(app_id,             INT,)
    COLUMN_NOT_NULL(name,               TEXT,)
    COLUMN_NOT_NULL(rejected,           INT,)
    TABLE_CONSTRAINTS(
        FOREIGN KEY (app_id) REFERENCES WidgetInfo (app_id) ON DELETE CASCADE
    )
CREATE_TABLE_END()

CREATE_TABLE(WidgetPrivilege)
    COLUMN_NOT_NULL(widget_privilege_id, INTEGER,        primary key autoincrement)
    COLUMN_NOT_NULL(app_id,              INT,)
    COLUMN_NOT_NULL(name,                TEXT,)
    TABLE_CONSTRAINTS(
        FOREIGN KEY (app_id) REFERENCES WidgetInfo (app_id) ON DELETE CASCADE
    )
CREATE_TABLE_END()

CREATE_TABLE(WidgetIcon)
    COLUMN_NOT_NULL(icon_id,        INTEGER,   primary key autoincrement)
    COLUMN_NOT_NULL(app_id,         INT,)
    COLUMN_NOT_NULL(icon_src,       TEXT,)
    COLUMN(icon_width,              INT,            DEFAULT 0)
    COLUMN(icon_height,             INT,            DEFAULT 0)
    TABLE_CONSTRAINTS(
        FOREIGN KEY(app_id) REFERENCES WidgetInfo (app_id) ON DELETE CASCADE
    )
CREATE_TABLE_END()

CREATE_TABLE(WidgetLocalizedIcon)
    COLUMN_NOT_NULL(app_id,         INT,)   /* TODO key duplicated for efficiency - ORM doesn't support JOIN */
    COLUMN_NOT_NULL(icon_id,        INTEGER,)
    COLUMN_NOT_NULL(widget_locale,  TEXT,)
    TABLE_CONSTRAINTS(
        FOREIGN KEY(icon_id) REFERENCES WidgetIcon (icon_id) ON DELETE CASCADE,
        PRIMARY KEY(icon_id, widget_locale)
    )
CREATE_TABLE_END()

CREATE_TABLE(WidgetStartFile)
    COLUMN_NOT_NULL(start_file_id,  INTEGER,   primary key autoincrement)
    COLUMN_NOT_NULL(app_id,         INT,)
    COLUMN_NOT_NULL(src,            TEXT,)
    TABLE_CONSTRAINTS(
        FOREIGN KEY(app_id) REFERENCES WidgetInfo (app_id) ON DELETE CASCADE
    )
CREATE_TABLE_END()

CREATE_TABLE(WidgetLocalizedStartFile)
    COLUMN_NOT_NULL(app_id,         INT,)   /* TODO key duplicated for efficiency - ORM doesn't support JOIN */
    COLUMN_NOT_NULL(start_file_id,  INTEGER,)
    COLUMN_NOT_NULL(widget_locale,  TEXT,)
    COLUMN_NOT_NULL(type,           TEXT,)
    COLUMN_NOT_NULL(encoding,       TEXT,)
    TABLE_CONSTRAINTS(
        FOREIGN KEY(start_file_id) REFERENCES WidgetStartFile (start_file_id) ON DELETE CASCADE,
        PRIMARY KEY(start_file_id, widget_locale)
    )
CREATE_TABLE_END()

CREATE_TABLE(WidgetExternalLocations)
    COLUMN_NOT_NULL(app_id,         INT,)
    COLUMN_NOT_NULL(path,  TEXT,)
    TABLE_CONSTRAINTS(
        FOREIGN KEY(app_id) REFERENCES WidgetInfo (app_id) ON DELETE CASCADE,
        PRIMARY KEY(app_id, path)
    )
CREATE_TABLE_END()

CREATE_TABLE(WidgetAccessHost)
    COLUMN_NOT_NULL(app_id,     INT,)
    COLUMN_NOT_NULL(host,       TEXT,)

    TABLE_CONSTRAINTS(
        PRIMARY KEY(app_id, host)
        FOREIGN KEY (app_id) REFERENCES WidgetInfo (app_id) ON DELETE CASCADE)
CREATE_TABLE_END()

CREATE_TABLE(WidgetCertificateFingerprint)
    COLUMN_NOT_NULL(app_id,     INT,)
    COLUMN_NOT_NULL(owner,      INT,)
    COLUMN_NOT_NULL(chainid,    INT,)
    COLUMN_NOT_NULL(type,       INT,)
    COLUMN(md5_fingerprint,     TEXT,)
    COLUMN(sha1_fingerprint,    TEXT,)
    COLUMN(common_name,         VARCHAR(64),)

    TABLE_CONSTRAINTS(
        PRIMARY KEY(app_id, chainid, owner, type)
        FOREIGN KEY (app_id) REFERENCES WidgetInfo (app_id) ON DELETE CASCADE
    )
CREATE_TABLE_END()

CREATE_TABLE(WidgetWARPInfo)
    COLUMN_NOT_NULL(app_id,     INT,)
    COLUMN_NOT_NULL(iri,        TEXT,)
    COLUMN(subdomain_access,    INT,        CHECK(subdomain_access between 0 and 1))

    TABLE_CONSTRAINTS(
        PRIMARY KEY(app_id, iri)
        FOREIGN KEY (app_id) REFERENCES WidgetInfo (app_id) ON DELETE CASCADE
    )
CREATE_TABLE_END()

CREATE_TABLE(WidgetAllowNavigation)
    COLUMN_NOT_NULL(app_id,     INT,)
    COLUMN_NOT_NULL(scheme,     TEXT,)
    COLUMN_NOT_NULL(host,       TEXT,)

    TABLE_CONSTRAINTS(
        PRIMARY KEY(app_id, scheme, host)
        FOREIGN KEY (app_id) REFERENCES WidgetInfo (app_id) ON DELETE CASCADE
    )
CREATE_TABLE_END()

CREATE_TABLE(WidgetSecuritySettings)
    COLUMN_NOT_NULL(app_id,                 INT,)
    COLUMN_NOT_NULL(security_popup_usage,   INT, DEFAULT 1)
    COLUMN_NOT_NULL(geolocation_usage,      INT, DEFAULT 1)
    COLUMN_NOT_NULL(web_notification_usage, INT, DEFAULT 1)
    COLUMN_NOT_NULL(web_database_usage,     INT, DEFAULT 1)
    TABLE_CONSTRAINTS(
        FOREIGN KEY (app_id) REFERENCES WidgetInfo (app_id) ON DELETE CASCADE
    )
CREATE_TABLE_END()

CREATE_TABLE(FeaturesList)
    COLUMN_NOT_NULL(FeatureUUID,            INTEGER,    primary key autoincrement)
    COLUMN_NOT_NULL(FeatureName,            TEXT,       unique)
    COLUMN_NOT_NULL(PluginPropertiesId,     INT,)

    TABLE_CONSTRAINTS(
        FOREIGN KEY (PluginPropertiesId) REFERENCES PluginProperties (PluginPropertiesId) ON DELETE CASCADE
    )
CREATE_TABLE_END()

CREATE_TABLE(PluginProperties)
    COLUMN_NOT_NULL(PluginPropertiesId,     INTEGER,    primary key autoincrement)
    COLUMN_NOT_NULL(InstallationState,      INTEGER,    DEFAULT 0)
    COLUMN_NOT_NULL(PluginLibraryName,      TEXT,       unique)
    COLUMN(PluginLibraryPath,               TEXT,)
CREATE_TABLE_END()

CREATE_TABLE(PluginDependencies)
    COLUMN_NOT_NULL(PluginPropertiesId,              INTEGER,    not null)
    COLUMN_NOT_NULL(RequiredPluginPropertiesId,      INTEGER,    not null)

    TABLE_CONSTRAINTS(
        FOREIGN KEY (PluginPropertiesId) REFERENCES PluginProperties (PluginPropertiesId) ON DELETE CASCADE
    )
CREATE_TABLE_END()

CREATE_TABLE(PluginImplementedObjects)
    COLUMN_NOT_NULL(PluginObject,           TEXT,       unique)
    COLUMN_NOT_NULL(PluginPropertiesId,     INTEGER,    not null)

    TABLE_CONSTRAINTS(
        FOREIGN KEY (PluginPropertiesId) REFERENCES PluginProperties (PluginPropertiesId) ON DELETE CASCADE
    )
CREATE_TABLE_END()

CREATE_TABLE(PluginRequiredObjects)
    COLUMN_NOT_NULL(PluginPropertiesId,     INTEGER,    not null)
    COLUMN_NOT_NULL(PluginObject,           TEXT,       not null)

    TABLE_CONSTRAINTS(
        FOREIGN KEY (PluginPropertiesId) REFERENCES PluginProperties (PluginPropertiesId) ON DELETE CASCADE
    )
CREATE_TABLE_END()

CREATE_TABLE(DeviceCapabilities)
    COLUMN_NOT_NULL(DeviceCapID,            INTEGER,    primary key autoincrement)
    COLUMN_NOT_NULL(DeviceCapName,          TEXT,       unique)
    COLUMN(DeviceCapDefaultValue,           INT,)
CREATE_TABLE_END()

CREATE_TABLE(FeatureDeviceCapProxy)
    COLUMN_NOT_NULL(FeatureUUID,            INT,        not null)
    COLUMN_NOT_NULL(DeviceCapID,            INT,        not null)

    TABLE_CONSTRAINTS(
        FOREIGN KEY (FeatureUUID) REFERENCES FeaturesList (FeatureUUID) ON DELETE CASCADE
        FOREIGN KEY (DeviceCapID) REFERENCES DeviceCapabilities (DeviceCapID) ON DELETE CASCADE
        PRIMARY KEY(FeatureUUID,DeviceCapID)
    )
CREATE_TABLE_END()

CREATE_TABLE(OCSPResponseStorage)
    COLUMN_NOT_NULL(cert_chain,        TEXT,       primary key)
    COLUMN(end_entity_check,           INT,)
    COLUMN(ocsp_status,                INT,)
    COLUMN(next_update_time,           BIGINT,)
CREATE_TABLE_END()

CREATE_TABLE(CRLResponseStorage)
    COLUMN_NOT_NULL(distribution_point,TEXT,       primary key)
    COLUMN_NOT_NULL(crl_body,          TEXT,)
    COLUMN(next_update_time,           BIGINT,)
CREATE_TABLE_END()

CREATE_TABLE(SettingsList)
    COLUMN_NOT_NULL(appId,          INT,)
    COLUMN_NOT_NULL(settingName,    TEXT,)
    COLUMN_NOT_NULL(settingValue,   TEXT,)
    TABLE_CONSTRAINTS(
        FOREIGN KEY (appId) REFERENCES WidgetInfo (app_id) ON DELETE CASCADE
    )
CREATE_TABLE_END()

CREATE_TABLE(AppControlInfo)
    COLUMN_NOT_NULL(app_id,         INT,)
    COLUMN_NOT_NULL(execute_index,  INT,)
    COLUMN_NOT_NULL(src,            TEXT,)
    COLUMN_NOT_NULL(operation,      TEXT,)
    COLUMN_NOT_NULL(uri,            TEXT,)
    COLUMN_NOT_NULL(mime,           TEXT,)
    COLUMN_NOT_NULL(disposition,    TINYINT, DEFAULT 0)

    TABLE_CONSTRAINTS(
        PRIMARY KEY(app_id, operation, uri, mime)
        FOREIGN KEY(app_id) REFERENCES WidgetInfo (app_id) ON DELETE CASCADE
    )
CREATE_TABLE_END()

CREATE_TABLE(EncryptedResourceList)
    COLUMN_NOT_NULL(app_id,         INT,)
    COLUMN_NOT_NULL(resource,       TEXT,)
    COLUMN_NOT_NULL(size,           INT,)

    TABLE_CONSTRAINTS(
        FOREIGN KEY (app_id) REFERENCES WidgetInfo (app_id) ON DELETE CASCADE
    )
CREATE_TABLE_END()

/*TODO: It will be removed when user agent is fixed. User agent MUST be configurable in development...*/
CREATE_TABLE(UserAgents)
    COLUMN_NOT_NULL(key_name,   TEXT,)
    COLUMN(key_value,           TEXT,  DEFAULT '')

    TABLE_CONSTRAINTS(PRIMARY KEY(key_name))
CREATE_TABLE_END()

SQL(
    INSERT INTO UserAgents VALUES("Galaxy S", "Mozilla/5.0 (Linux; U; Android 2.3.7; en-gb; GT-I9000 Build/GRJ22) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1");
    INSERT INTO UserAgents VALUES("Galaxy S II", "Mozilla/5.0 (Linux; U; Android 2.3.5; en-gb; GT-I9100 Build/GINGERBREAD) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1");
    INSERT INTO UserAgents VALUES("Galaxy S III", "Mozilla/5.0 (Linux; U; Android 4.0.4; en-gb; GT-I9300 Build/IMM76D) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30");
    INSERT INTO UserAgents VALUES("SLP Galaxy", "Mozilla/5.0 (Linux; U; Android 2.3.4; en-us; GT-I9500 Build/GINGERBREAD) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1");
    INSERT INTO UserAgents VALUES("Tizen", "Mozilla/5.0 (Linux; U; Tizen 2.1; en-us; SAMSUNG GT-I8800) AppleWebKit/537.1 (KHTML, like Gecko) Version/2.1.0 Mobile");
    INSERT INTO UserAgents VALUES("Galaxy Nexus", "Mozilla/5.0 (Linux; U; Android 4.0.3; en-us; Galaxy Nexus Build/IML74K) AppleWebKit/535.7 (KHTML, like Gecko) Mobile Safari/535.7");
    INSERT INTO UserAgents VALUES("Samsung", "Mozilla/5.0 (SAMSUNG; SAMSUNG-GT-I9200/1.0; U; Linux/SLP/2.0; ko-kr) AppleWebKit/534.4 (KHTML, like Gecko) Dolfin/2.0 Mobile");
    INSERT INTO UserAgents VALUES("Samsung Dolfin", "SAMSUNG-GT-S8500/S8500XXJD2 SHP/VPP/R5 Dolfin/2.0 Nextreaming SMM-MMS/1.2.0 profile/MIDP-2.1 configuration/CLDC-1.1");
    INSERT INTO UserAgents VALUES("Apple iPhone 3", "Mozilla/5.0 (iPhone; U; CPU iPhone OS 3_1_3 like Mac OS X; en-us) AppleWebKit/528.18 (KHTML, like Gecko) Version/4.0 Mobile/7E18 Safari/528.16");
    INSERT INTO UserAgents VALUES("Apple iPhone 4", "Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_3_5 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8L1 Safari/6533.18.5");
    INSERT INTO UserAgents VALUES("Apple iOS 5", "Mozilla/5.0 (iPhone; CPU iPhone OS 5_0_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A405 Safari/7534.48.3");
    INSERT INTO UserAgents VALUES("Android 2.3 (Nexus One)", "Mozilla/5.0 (Linux; U; Android 2.3.4; en-us; Nexus One Build/GRJ22) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1");
    INSERT INTO UserAgents VALUES("Opera Mobi", "Opera/9.80 (Windows NT 6.1; U; Edition IBIS; en) Presto/2.6.30 Version/10.63");
    INSERT INTO UserAgents VALUES("Samsung Bada", "Mozilla/5.0 (SAMSUNG; SAMSUNG-GT-S8500/1.0; U; Bada/1.0; en-us) AppleWebKit/533.1 (KHTML, like Gecko) Dolfin/2.0 Mobile WVGA SMM-MMS/1.2.0 OPN-B");
    INSERT INTO UserAgents VALUES("Orange TV 3.2 iPhone", "Mozilla/5.0 (OrangeTVPlayer4iPhone/iPhone2,1; U; CPU iPhone OS 4_3 like Mac OS X; fr) AppleWebKit/525.18.1 (KHTML, like Gecko) Version/3.1.1 Mobile/5F136 Safari/525.20 OrangeAppliTVHTTPLS/3.2.16");
    INSERT INTO UserAgents VALUES("Orange TV 3.2 iPad", "Mozilla/5.0 (OrangeTVPlayer4iPhone/iPad1,1; U; CPU iPhone OS 4_3 like Mac OS X; fr) AppleWebKit/525.18.1 (KHTML, like Gecko) Version/3.1.1 Mobile/5F136 Safari/525.20 iPad=SIMENABLED OrangeAppliTVHTTPLS/3.2.16");
    INSERT INTO UserAgents VALUES("Orange TV 3.3 iOS", "OrangeTVPlayer4iPhone/_iOS_3.3.3_Apple_iPhone2,1_4.1_OrangeAppliTVHTTPLS/3.3.3");
    INSERT INTO UserAgents VALUES("Chrome Browser for android", "Mozilla/5.0 (Linux; U; Android 4.0.1; ko-kr; Galaxy Nexus Build/ITL41F) AppleWebKit/535.7 (KHTML, like Gecko) CrMo/16.0.912.75 Mobile Safari/535.7");
    INSERT INTO UserAgents VALUES("MANGO(Nokia 800C)", "Mozilla/5.0 (compatible; MSIE 9.0; Windows Phone OS 7.5; Trident/5.0; IEMobile/9.0; Nokia; 800C)");
    INSERT INTO UserAgents VALUES("Orange TV 3.2 Tizen", "Mozilla/5.0 (Linux; U; Tizen 1.0; fr-fr; GT-I8800) AppleWebKit/534.46 (KHTML, like Gecko) Mobile Tizen Browser/1.0 OrangeAppliTV/3.2.0");
    INSERT INTO UserAgents VALUES("System user agent", "");
    INSERT INTO UserAgents VALUES("Samsung Bada 2.0", "Mozilla/5.0 (SAMSUNG; SAMSUNG-GT-S8500/1.0; U; Bada/2.0; en-us) AppleWebKit/534.20 (KHTML, like Gecko) Mobile WVGA SMM-MMS/1.2.0 OPN-B Dolfin/3.0");
    INSERT INTO UserAgents VALUES("Samsung Desktop", "Mozilla/5.0 (U; Linux/SLP/2.0; ko-kr) AppleWebKit/533.1 (KHTML, like Gecko)");
    INSERT INTO UserAgents VALUES("Firefox 5", "Mozilla/5.0 (Windows NT 6.1; rv:9.0.1) Gecko/20100101 Firefox/9.0.1");
    INSERT INTO UserAgents VALUES("Firefox 5 Fennec(Mobile)", "Mozilla/5.0 (Android; Linux armv7l; rv:5.0) Gecko/20110615 Firefox/5.0 Fennec/5.0");
    INSERT INTO UserAgents VALUES("Safari 5.0", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/534.52.7 (KHTML, like Gecko) Version/5.1.2 Safari/534.52.7");
    INSERT INTO UserAgents VALUES("Google Chrome 18.0", "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/535.16 (KHTML, like Gecko) Chrome/18.0.1003.1 Safari/535.16");
    INSERT INTO UserAgents VALUES("Internet Explorer 9", "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)");
    INSERT INTO UserAgents VALUES("Galaxy Tab 10.1", "Mozilla/5.0 (Linux; U; Android 3.0.1; en-us; GT-P7100 Build/HRI83) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13");
    INSERT INTO UserAgents VALUES("iPad 2", "Mozilla/5.0 (iPad; U; CPU OS 4_3_5 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8L1 Safari/6533.18.5");
)
    SQL(
    COMMIT;
)
