github.com/status-im/status-go@v1.1.0/appdatabase/migrations/sql/1682073779_settings_table_remove_latest_derived_path_column.up.sql (about)

     1  CREATE TABLE settings_bu (
     2    address VARCHAR NOT NULL,
     3    chaos_mode BOOLEAN DEFAULT false,
     4    currency VARCHAR DEFAULT 'usd',
     5    current_network VARCHAR NOT NULL,
     6    custom_bootnodes BLOB,
     7    custom_bootnodes_enabled BLOB,
     8    dapps_address VARCHAR NOT NULL,
     9    eip1581_address VARCHAR,
    10    fleet VARCHAR,
    11    hide_home_tooltip BOOLEAN DEFAULT false,
    12    installation_id VARCHAR NOT NULL,
    13    key_uid VARCHAR NOT NULL,
    14    keycard_instance_uid VARCHAR,
    15    keycard_paired_on UNSIGNED BIGINT,
    16    keycard_pairing VARCHAR,
    17    last_updated UNSIGNED BIGINT,
    18    log_level VARCHAR,
    19    mnemonic VARCHAR,
    20    name VARCHAR NOT NULL,
    21    networks BLOB NOT NULL,
    22    node_config BLOB,
    23    notifications_enabled BOOLEAN DEFAULT false,
    24    photo_path BLOB NOT NULL,
    25    pinned_mailservers BLOB,
    26    preferred_name VARCHAR,
    27    preview_privacy BOOLEAN DEFAULT false,
    28    public_key VARCHAR NOT NULL,
    29    remember_syncing_choice BOOLEAN DEFAULT false,
    30    signing_phrase VARCHAR NOT NULL,
    31    stickers_packs_installed BLOB,
    32    stickers_recent_stickers BLOB,
    33    syncing_on_mobile_network BOOLEAN DEFAULT false,
    34    synthetic_id VARCHAR DEFAULT 'id' PRIMARY KEY,
    35    usernames BLOB,
    36    wallet_root_address VARCHAR NOT NULL,
    37    wallet_set_up_passed BOOLEAN DEFAULT false,
    38    wallet_visible_tokens VARCHAR,
    39    stickers_packs_pending BLOB,
    40    waku_enabled BOOLEAN DEFAULT false,
    41    waku_bloom_filter_mode BOOLEAN DEFAULT false,
    42    appearance INT NOT NULL DEFAULT 0,
    43    remote_push_notifications_enabled BOOLEAN DEFAULT FALSE,
    44    send_push_notifications BOOLEAN DEFAULT TRUE,
    45    push_notifications_server_enabled BOOLEAN DEFAULT FALSE,
    46    push_notifications_from_contacts_only BOOLEAN DEFAULT FALSE,
    47    push_notifications_block_mentions BOOLEAN DEFAULT FALSE,
    48    webview_allow_permission_requests BOOLEAN DEFAULT FALSE,
    49    use_mailservers BOOLEAN DEFAULT TRUE,
    50    link_preview_request_enabled BOOLEAN DEFAULT TRUE,
    51    link_previews_enabled_sites BLOB,
    52    profile_pictures_visibility INT NOT NULL DEFAULT 1,
    53    anon_metrics_should_send BOOLEAN DEFAULT false,
    54    messages_from_contacts_only BOOLEAN DEFAULT FALSE,
    55    default_sync_period INTEGER DEFAULT 777600, -- 9 days
    56    current_user_status BLOB,
    57    send_status_updates BOOLEAN DEFAULT TRUE,
    58    gif_recents BLOB,
    59    gif_favorites BLOB,
    60    opensea_enabled BOOLEAN DEFAULT false,
    61    profile_pictures_show_to INT NOT NULL DEFAULT 1,
    62    telemetry_server_url VARCHAR NOT NULL DEFAULT "",
    63    backup_enabled BOOLEAN DEFAULT TRUE,
    64    last_backup INT NOT NULL DEFAULT 0,
    65    backup_fetched BOOLEAN DEFAULT FALSE,
    66    auto_message_enabled BOOLEAN DEFAULT FALSE,
    67    gif_api_key TEXT NOT NULL DEFAULT "",
    68    display_name TEXT NOT NULL DEFAULT "",
    69    test_networks_enabled BOOLEAN NOT NULL DEFAULT FALSE,
    70    mutual_contact_enabled BOOLEAN DEFAULT FALSE,
    71    bio TEXT NOT NULL DEFAULT "",
    72    mnemonic_removed BOOLEAN NOT NULL DEFAULT FALSE
    73  ) WITHOUT ROWID;
    74  
    75  INSERT INTO settings_bu SELECT
    76    address,
    77    chaos_mode,
    78    currency,
    79    current_network,
    80    custom_bootnodes,
    81    custom_bootnodes_enabled,
    82    dapps_address,
    83    eip1581_address,
    84    fleet,
    85    hide_home_tooltip,
    86    installation_id,
    87    key_uid,
    88    keycard_instance_uid,
    89    keycard_paired_on,
    90    keycard_pairing,
    91    last_updated UNSIGNED,
    92    log_level,
    93    mnemonic,
    94    name,
    95    networks,
    96    node_config,
    97    notifications_enabled,
    98    photo_path,
    99    pinned_mailservers,
   100    preferred_name,
   101    preview_privacy,
   102    public_key,
   103    remember_syncing_choice,
   104    signing_phrase,
   105    stickers_packs_installed,
   106    stickers_recent_stickers,
   107    syncing_on_mobile_network,
   108    synthetic_id,
   109    usernames,
   110    wallet_root_address,
   111    wallet_set_up_passed,
   112    wallet_visible_tokens,
   113    stickers_packs_pending,
   114    waku_enabled,
   115    waku_bloom_filter_mode,
   116    appearance,
   117    remote_push_notifications_enabled,
   118    send_push_notifications,
   119    push_notifications_server_enabled,
   120    push_notifications_from_contacts_only,
   121    push_notifications_block_mentions,
   122    webview_allow_permission_requests,
   123    use_mailservers,
   124    link_preview_request_enabled,
   125    link_previews_enabled_sites,
   126    profile_pictures_visibility,
   127    anon_metrics_should_send,
   128    messages_from_contacts_only,
   129    default_sync_period,
   130    current_user_status,
   131    send_status_updates,
   132    gif_recents,
   133    gif_favorites,
   134    opensea_enabled,
   135    profile_pictures_show_to,
   136    telemetry_server_url,
   137    backup_enabled,
   138    last_backup,
   139    backup_fetched,
   140    auto_message_enabled,
   141    gif_api_key,
   142    display_name,
   143    test_networks_enabled,
   144    mutual_contact_enabled,
   145    bio,
   146    mnemonic_removed
   147  FROM settings;
   148  
   149  DROP TABLE settings;
   150  
   151  ALTER TABLE settings_bu RENAME TO settings;
   152  
   153  UPDATE settings SET default_sync_period = 777600; -- 9 days