diff --git a/appdatabase/migrations/bindata.go b/appdatabase/migrations/bindata.go index 9abbf2c0e..b702ff310 100644 --- a/appdatabase/migrations/bindata.go +++ b/appdatabase/migrations/bindata.go @@ -1,18 +1,19 @@ -// Code generated by go-bindata. +// Code generated by go-bindata. DO NOT EDIT. // sources: -// 1640111208_dummy.up.sql -// 1642666031_add_removed_clock_to_bookmarks.up.sql -// 1643644541_gif_api_key_setting.up.sql -// 1644188994_recent_stickers.up.sql -// 1646841105_add_emoji_account.up.sql -// doc.go -// DO NOT EDIT! +// 1640111208_dummy.up.sql (258B) +// 1642666031_add_removed_clock_to_bookmarks.up.sql (117B) +// 1643644541_gif_api_key_setting.up.sql (108B) +// 1644188994_recent_stickers.up.sql (79B) +// 1646659233_add_address_to_dapp_permisssion.up.sql (700B) +// 1646841105_add_emoji_account.up.sql (96B) +// doc.go (74B) package migrations import ( "bytes" "compress/gzip" + "crypto/sha256" "fmt" "io" "io/ioutil" @@ -25,7 +26,7 @@ import ( func bindataRead(data []byte, name string) ([]byte, error) { gz, err := gzip.NewReader(bytes.NewBuffer(data)) if err != nil { - return nil, fmt.Errorf("Read %q: %v", name, err) + return nil, fmt.Errorf("read %q: %w", name, err) } var buf bytes.Buffer @@ -33,7 +34,7 @@ func bindataRead(data []byte, name string) ([]byte, error) { clErr := gz.Close() if err != nil { - return nil, fmt.Errorf("Read %q: %v", name, err) + return nil, fmt.Errorf("read %q: %w", name, err) } if clErr != nil { return nil, err @@ -43,8 +44,9 @@ func bindataRead(data []byte, name string) ([]byte, error) { } type asset struct { - bytes []byte - info os.FileInfo + bytes []byte + info os.FileInfo + digest [sha256.Size]byte } type bindataFileInfo struct { @@ -88,8 +90,8 @@ func _1640111208_dummyUpSql() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "1640111208_dummy.up.sql", size: 258, mode: os.FileMode(436), modTime: time.Unix(1646839963, 0)} - a := &asset{bytes: bytes, info: info} + info := bindataFileInfo{name: "1640111208_dummy.up.sql", size: 258, mode: os.FileMode(0664), modTime: time.Unix(1647246959, 0)} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x3e, 0xf0, 0xae, 0x20, 0x6e, 0x75, 0xd1, 0x36, 0x14, 0xf2, 0x40, 0xe5, 0xd6, 0x7a, 0xc4, 0xa5, 0x72, 0xaa, 0xb5, 0x4d, 0x71, 0x97, 0xb8, 0xe8, 0x95, 0x22, 0x95, 0xa2, 0xac, 0xaf, 0x48, 0x58}} return a, nil } @@ -108,8 +110,8 @@ func _1642666031_add_removed_clock_to_bookmarksUpSql() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "1642666031_add_removed_clock_to_bookmarks.up.sql", size: 117, mode: os.FileMode(436), modTime: time.Unix(1646839963, 0)} - a := &asset{bytes: bytes, info: info} + info := bindataFileInfo{name: "1642666031_add_removed_clock_to_bookmarks.up.sql", size: 117, mode: os.FileMode(0664), modTime: time.Unix(1647246959, 0)} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x84, 0x4e, 0x38, 0x99, 0x7a, 0xc, 0x90, 0x13, 0xec, 0xfe, 0x2f, 0x55, 0xff, 0xb7, 0xb6, 0xaa, 0x96, 0xc6, 0x92, 0x79, 0xcc, 0xee, 0x4e, 0x99, 0x53, 0xfe, 0x1c, 0xbb, 0x32, 0x2, 0xa4, 0x27}} return a, nil } @@ -128,8 +130,8 @@ func _1643644541_gif_api_key_settingUpSql() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "1643644541_gif_api_key_setting.up.sql", size: 108, mode: os.FileMode(436), modTime: time.Unix(1646839963, 0)} - a := &asset{bytes: bytes, info: info} + info := bindataFileInfo{name: "1643644541_gif_api_key_setting.up.sql", size: 108, mode: os.FileMode(0664), modTime: time.Unix(1647246959, 0)} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x1b, 0x94, 0x28, 0xfb, 0x66, 0xd1, 0x7c, 0xb8, 0x89, 0xe2, 0xb4, 0x71, 0x65, 0x24, 0x57, 0x22, 0x95, 0x38, 0x97, 0x3, 0x9b, 0xc6, 0xa4, 0x41, 0x7b, 0xba, 0xf7, 0xdb, 0x70, 0xf7, 0x20, 0x3a}} return a, nil } @@ -148,8 +150,28 @@ func _1644188994_recent_stickersUpSql() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "1644188994_recent_stickers.up.sql", size: 79, mode: os.FileMode(436), modTime: time.Unix(1646839963, 0)} - a := &asset{bytes: bytes, info: info} + info := bindataFileInfo{name: "1644188994_recent_stickers.up.sql", size: 79, mode: os.FileMode(0664), modTime: time.Unix(1647246959, 0)} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x1e, 0xad, 0xaa, 0x30, 0xbf, 0x4, 0x7, 0xf8, 0xc3, 0x3, 0xb8, 0x97, 0x23, 0x2b, 0xbd, 0x1c, 0x60, 0x69, 0xb0, 0x42, 0x5e, 0x6b, 0xd, 0xa7, 0xa3, 0x6b, 0x2e, 0xdc, 0x70, 0x13, 0x72, 0x7}} + return a, nil +} + +var __1646659233_add_address_to_dapp_permisssionUpSql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x7c\x51\xcd\x6e\x82\x40\x18\xbc\xf3\x14\x13\x4e\x98\x10\x0f\x5e\x49\x0f\x5b\xfc\x30\x9b\xc2\xae\x5d\x96\x44\x4f\x84\x14\x4c\xb6\x51\xb0\xa2\xef\xdf\xb0\xfc\x08\x36\xe9\x0d\xe6\x9b\x19\x66\x86\x50\x11\xd3\x04\xcd\xde\x63\x02\x8f\x20\xa4\x06\x1d\x78\xaa\x53\x94\xc5\xf5\xda\xe6\x1b\x78\x0e\x00\x98\x12\x5c\x68\xda\x91\xc2\x5e\xf1\x84\xa9\x23\x3e\xe8\x08\x96\x69\xc9\x45\xa8\x28\x21\xa1\xad\x5a\x64\x71\xec\x5b\x49\x5d\x5c\x2a\x68\x3a\xe8\xfe\xb5\x28\xcb\x5b\xd5\xb6\x16\x99\x98\x28\xab\x53\xf1\x38\xdf\xe1\xba\x3d\x2b\x94\x22\xd5\x8a\x71\xa1\xf1\xa8\xcd\xcf\xa3\xca\xfb\x1c\x9d\x59\x3e\x5a\x64\x82\x7f\x66\x04\xaf\x03\xfd\x01\x5c\x39\xab\xc0\x71\xfe\xe9\x73\xad\x6e\x17\xd3\xb6\xa6\xa9\x9f\xad\x3a\xef\xdc\x94\x30\xf5\xfd\x25\xfc\x93\xbd\x0c\xdc\x5f\x23\xa9\x88\xef\x44\x37\x81\x37\x78\xac\xa0\x28\x22\x45\x22\xa4\x69\x3b\xaf\x83\xa5\xc0\x96\x62\xd2\x84\x90\xa5\x21\xdb\x92\x0d\xca\x45\x4a\x4a\x77\x9b\xca\x69\xe9\x94\x62\x0a\x87\xcf\xd8\xf5\x7c\xb8\x2e\x22\x25\x93\x9e\xf2\x22\x5b\x16\x6a\xab\x73\xf5\x75\x1f\xbd\xd6\xa6\xf4\xe7\x84\xf5\xac\xcf\xe9\xd6\x5c\xe6\x37\x7c\x37\xa6\x9e\x42\x34\xd3\xe3\xda\xfe\xc0\xb7\x85\x8d\x2d\xdb\xe1\x81\xe3\x6c\x95\xdc\x0f\x4b\xcf\x28\xc1\x1c\x1f\x63\xb3\x58\x93\xfa\xcb\xcd\x37\x50\x24\x58\x42\x58\xd6\x09\x16\x82\x31\xd9\x93\xda\xdb\xfe\x06\x00\x00\xff\xff\xb0\x41\x9a\x48\xbc\x02\x00\x00") + +func _1646659233_add_address_to_dapp_permisssionUpSqlBytes() ([]byte, error) { + return bindataRead( + __1646659233_add_address_to_dapp_permisssionUpSql, + "1646659233_add_address_to_dapp_permisssion.up.sql", + ) +} + +func _1646659233_add_address_to_dapp_permisssionUpSql() (*asset, error) { + bytes, err := _1646659233_add_address_to_dapp_permisssionUpSqlBytes() + if err != nil { + return nil, err + } + + info := bindataFileInfo{name: "1646659233_add_address_to_dapp_permisssion.up.sql", size: 700, mode: os.FileMode(0664), modTime: time.Unix(1647247370, 0)} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xed, 0xb0, 0x35, 0xcc, 0x2e, 0x16, 0xe6, 0x15, 0x86, 0x2c, 0x37, 0x80, 0xae, 0xa3, 0xc5, 0x31, 0x78, 0x5, 0x9d, 0xcd, 0x7b, 0xeb, 0x5f, 0xf2, 0xb3, 0x74, 0x72, 0xdf, 0xcf, 0x88, 0xb, 0x40}} return a, nil } @@ -168,8 +190,8 @@ func _1646841105_add_emoji_accountUpSql() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "1646841105_add_emoji_account.up.sql", size: 96, mode: os.FileMode(436), modTime: time.Unix(1646839402, 0)} - a := &asset{bytes: bytes, info: info} + info := bindataFileInfo{name: "1646841105_add_emoji_account.up.sql", size: 96, mode: os.FileMode(0664), modTime: time.Unix(1647247370, 0)} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xe6, 0x77, 0x29, 0x95, 0x18, 0x64, 0x82, 0x63, 0xe7, 0xaf, 0x6c, 0xa9, 0x15, 0x7d, 0x46, 0xa6, 0xbc, 0xdf, 0xa7, 0xd, 0x2b, 0xd2, 0x2d, 0x97, 0x4d, 0xa, 0x6b, 0xd, 0x6e, 0x90, 0x42, 0x5c}} return a, nil } @@ -188,8 +210,8 @@ func docGo() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "doc.go", size: 74, mode: os.FileMode(436), modTime: time.Unix(1646818623, 0)} - a := &asset{bytes: bytes, info: info} + info := bindataFileInfo{name: "doc.go", size: 74, mode: os.FileMode(0664), modTime: time.Unix(1647246959, 0)} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xde, 0x7c, 0x28, 0xcd, 0x47, 0xf2, 0xfa, 0x7c, 0x51, 0x2d, 0xd8, 0x38, 0xb, 0xb0, 0x34, 0x9d, 0x4c, 0x62, 0xa, 0x9e, 0x28, 0xc3, 0x31, 0x23, 0xd9, 0xbb, 0x89, 0x9f, 0xa0, 0x89, 0x1f, 0xe8}} return a, nil } @@ -197,8 +219,8 @@ func docGo() (*asset, error) { // It returns an error if the asset could not be found or // could not be loaded. func Asset(name string) ([]byte, error) { - cannonicalName := strings.Replace(name, "\\", "/", -1) - if f, ok := _bindata[cannonicalName]; ok { + canonicalName := strings.Replace(name, "\\", "/", -1) + if f, ok := _bindata[canonicalName]; ok { a, err := f() if err != nil { return nil, fmt.Errorf("Asset %s can't read by error: %v", name, err) @@ -208,6 +230,12 @@ func Asset(name string) ([]byte, error) { return nil, fmt.Errorf("Asset %s not found", name) } +// AssetString returns the asset contents as a string (instead of a []byte). +func AssetString(name string) (string, error) { + data, err := Asset(name) + return string(data), err +} + // MustAsset is like Asset but panics when Asset would return an error. // It simplifies safe initialization of global variables. func MustAsset(name string) []byte { @@ -219,12 +247,18 @@ func MustAsset(name string) []byte { return a } +// MustAssetString is like AssetString but panics when Asset would return an +// error. It simplifies safe initialization of global variables. +func MustAssetString(name string) string { + return string(MustAsset(name)) +} + // AssetInfo loads and returns the asset info for the given name. // It returns an error if the asset could not be found or // could not be loaded. func AssetInfo(name string) (os.FileInfo, error) { - cannonicalName := strings.Replace(name, "\\", "/", -1) - if f, ok := _bindata[cannonicalName]; ok { + canonicalName := strings.Replace(name, "\\", "/", -1) + if f, ok := _bindata[canonicalName]; ok { a, err := f() if err != nil { return nil, fmt.Errorf("AssetInfo %s can't read by error: %v", name, err) @@ -234,6 +268,33 @@ func AssetInfo(name string) (os.FileInfo, error) { return nil, fmt.Errorf("AssetInfo %s not found", name) } +// AssetDigest returns the digest of the file with the given name. It returns an +// error if the asset could not be found or the digest could not be loaded. +func AssetDigest(name string) ([sha256.Size]byte, error) { + canonicalName := strings.Replace(name, "\\", "/", -1) + if f, ok := _bindata[canonicalName]; ok { + a, err := f() + if err != nil { + return [sha256.Size]byte{}, fmt.Errorf("AssetDigest %s can't read by error: %v", name, err) + } + return a.digest, nil + } + return [sha256.Size]byte{}, fmt.Errorf("AssetDigest %s not found", name) +} + +// Digests returns a map of all known files and their checksums. +func Digests() (map[string][sha256.Size]byte, error) { + mp := make(map[string][sha256.Size]byte, len(_bindata)) + for name := range _bindata { + a, err := _bindata[name]() + if err != nil { + return nil, err + } + mp[name] = a.digest + } + return mp, nil +} + // AssetNames returns the names of the assets. func AssetNames() []string { names := make([]string, 0, len(_bindata)) @@ -245,14 +306,18 @@ func AssetNames() []string { // _bindata is a table, holding each asset generator, mapped to its name. var _bindata = map[string]func() (*asset, error){ - "1640111208_dummy.up.sql": _1640111208_dummyUpSql, - "1642666031_add_removed_clock_to_bookmarks.up.sql": _1642666031_add_removed_clock_to_bookmarksUpSql, - "1643644541_gif_api_key_setting.up.sql": _1643644541_gif_api_key_settingUpSql, - "1644188994_recent_stickers.up.sql": _1644188994_recent_stickersUpSql, - "1646841105_add_emoji_account.up.sql": _1646841105_add_emoji_accountUpSql, - "doc.go": docGo, + "1640111208_dummy.up.sql": _1640111208_dummyUpSql, + "1642666031_add_removed_clock_to_bookmarks.up.sql": _1642666031_add_removed_clock_to_bookmarksUpSql, + "1643644541_gif_api_key_setting.up.sql": _1643644541_gif_api_key_settingUpSql, + "1644188994_recent_stickers.up.sql": _1644188994_recent_stickersUpSql, + "1646659233_add_address_to_dapp_permisssion.up.sql": _1646659233_add_address_to_dapp_permisssionUpSql, + "1646841105_add_emoji_account.up.sql": _1646841105_add_emoji_accountUpSql, + "doc.go": docGo, } +// AssetDebug is true if the assets were built with the debug flag enabled. +const AssetDebug = false + // AssetDir returns the file names below a certain // directory embedded in the file by go-bindata. // For example if you run go-bindata on data/... and data contains the @@ -262,15 +327,15 @@ var _bindata = map[string]func() (*asset, error){ // img/ // a.png // b.png -// then AssetDir("data") would return []string{"foo.txt", "img"} -// AssetDir("data/img") would return []string{"a.png", "b.png"} -// AssetDir("foo.txt") and AssetDir("notexist") would return an error +// then AssetDir("data") would return []string{"foo.txt", "img"}, +// AssetDir("data/img") would return []string{"a.png", "b.png"}, +// AssetDir("foo.txt") and AssetDir("notexist") would return an error, and // AssetDir("") will return []string{"data"}. func AssetDir(name string) ([]string, error) { node := _bintree if len(name) != 0 { - cannonicalName := strings.Replace(name, "\\", "/", -1) - pathList := strings.Split(cannonicalName, "/") + canonicalName := strings.Replace(name, "\\", "/", -1) + pathList := strings.Split(canonicalName, "/") for _, p := range pathList { node = node.Children[p] if node == nil { @@ -292,16 +357,18 @@ type bintree struct { Func func() (*asset, error) Children map[string]*bintree } + var _bintree = &bintree{nil, map[string]*bintree{ - "1640111208_dummy.up.sql": &bintree{_1640111208_dummyUpSql, map[string]*bintree{}}, - "1642666031_add_removed_clock_to_bookmarks.up.sql": &bintree{_1642666031_add_removed_clock_to_bookmarksUpSql, map[string]*bintree{}}, - "1643644541_gif_api_key_setting.up.sql": &bintree{_1643644541_gif_api_key_settingUpSql, map[string]*bintree{}}, - "1644188994_recent_stickers.up.sql": &bintree{_1644188994_recent_stickersUpSql, map[string]*bintree{}}, - "1646841105_add_emoji_account.up.sql": &bintree{_1646841105_add_emoji_accountUpSql, map[string]*bintree{}}, - "doc.go": &bintree{docGo, map[string]*bintree{}}, + "1640111208_dummy.up.sql": {_1640111208_dummyUpSql, map[string]*bintree{}}, + "1642666031_add_removed_clock_to_bookmarks.up.sql": {_1642666031_add_removed_clock_to_bookmarksUpSql, map[string]*bintree{}}, + "1643644541_gif_api_key_setting.up.sql": {_1643644541_gif_api_key_settingUpSql, map[string]*bintree{}}, + "1644188994_recent_stickers.up.sql": {_1644188994_recent_stickersUpSql, map[string]*bintree{}}, + "1646659233_add_address_to_dapp_permisssion.up.sql": {_1646659233_add_address_to_dapp_permisssionUpSql, map[string]*bintree{}}, + "1646841105_add_emoji_account.up.sql": {_1646841105_add_emoji_accountUpSql, map[string]*bintree{}}, + "doc.go": {docGo, map[string]*bintree{}}, }} -// RestoreAsset restores an asset under the given directory +// RestoreAsset restores an asset under the given directory. func RestoreAsset(dir, name string) error { data, err := Asset(name) if err != nil { @@ -319,14 +386,10 @@ func RestoreAsset(dir, name string) error { if err != nil { return err } - err = os.Chtimes(_filePath(dir, name), info.ModTime(), info.ModTime()) - if err != nil { - return err - } - return nil + return os.Chtimes(_filePath(dir, name), info.ModTime(), info.ModTime()) } -// RestoreAssets restores an asset under the given directory recursively +// RestoreAssets restores an asset under the given directory recursively. func RestoreAssets(dir, name string) error { children, err := AssetDir(name) // File @@ -344,7 +407,6 @@ func RestoreAssets(dir, name string) error { } func _filePath(dir, name string) string { - cannonicalName := strings.Replace(name, "\\", "/", -1) - return filepath.Join(append([]string{dir}, strings.Split(cannonicalName, "/")...)...) + canonicalName := strings.Replace(name, "\\", "/", -1) + return filepath.Join(append([]string{dir}, strings.Split(canonicalName, "/")...)...) } - diff --git a/appdatabase/migrations/sql/1646659233_add_address_to_dapp_permisssion.up.sql b/appdatabase/migrations/sql/1646659233_add_address_to_dapp_permisssion.up.sql new file mode 100644 index 000000000..c431f46f0 --- /dev/null +++ b/appdatabase/migrations/sql/1646659233_add_address_to_dapp_permisssion.up.sql @@ -0,0 +1,22 @@ +CREATE TABLE IF NOT EXISTS dapps_2 ( + id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, + name TEXT, + address TEXT NOT NULL default "", + CONSTRAINT unique_dapps_name_address UNIQUE (name,address) +); + +CREATE TABLE IF NOT EXISTS permissions_2 ( + dapp_id int NOT NULL, + permission TEXT NOT NULL, + FOREIGN KEY(dapp_id) REFERENCES dapps_2(id) ON DELETE CASCADE +); + +INSERT INTO dapps_2 SELECT NULL, name, "" FROM dapps; + +INSERT INTO permissions_2 select dapps_2.id, permissions.permission from permissions join dapps_2 on dapps_2.name = permissions.dapp_name; + +DROP TABLE permissions; +DROP TABLE dapps; + +ALTER TABLE permissions_2 RENAME TO permissions; +ALTER TABLE dapps_2 RENAME TO dapps; \ No newline at end of file diff --git a/appdatabase/migrationsprevnodecfg/bindata.go b/appdatabase/migrationsprevnodecfg/bindata.go index e9bfc3966..8f565d6a6 100644 --- a/appdatabase/migrationsprevnodecfg/bindata.go +++ b/appdatabase/migrationsprevnodecfg/bindata.go @@ -1,66 +1,66 @@ -// Code generated by go-bindata. +// Code generated by go-bindata. DO NOT EDIT. // sources: -// 0001_app.down.sql -// 0001_app.up.sql -// 0002_tokens.down.sql -// 0002_tokens.up.sql -// 0003_settings.down.sql -// 0003_settings.up.sql -// 0004_pending_stickers.down.sql -// 0004_pending_stickers.up.sql -// 0005_waku_mode.down.sql -// 0005_waku_mode.up.sql -// 0006_appearance.up.sql -// 0007_enable_waku_default.up.sql -// 0008_add_push_notifications.up.sql -// 0009_enable_sending_push_notifications.down.sql -// 0009_enable_sending_push_notifications.up.sql -// 0010_add_block_mentions.down.sql -// 0010_add_block_mentions.up.sql -// 0011_allow_webview_permission_requests.down.sql -// 0011_allow_webview_permission_requests.up.sql -// 0012_pending_transactions.down.sql -// 0012_pending_transactions.up.sql -// 0013_favourites.down.sql -// 0013_favourites.up.sql -// 0014_add_use_mailservers.down.sql -// 0014_add_use_mailservers.up.sql -// 0015_link_previews.down.sql -// 0015_link_previews.up.sql -// 0016_local_notifications_preferences.down.sql -// 0016_local_notifications_preferences.up.sql -// 0017_bookmarks.down.sql -// 0017_bookmarks.up.sql -// 0018_profile_pictures_visibility.up.sql -// 0019_blocks_ranges_extra_data.up.sql -// 0020_metrics.up.sql -// 0021_add_session_id_to_metrics.up.sql -// 0022_pending_transfers.up.sql -// 1618237885_settings_anon_metrics_should_send.up.sql -// 1618395756_contacts_only.up.sql -// 1622184614_add_default_sync_period.up.sql -// 1625872445_user_status.up.sql -// 1627983977_add_gif_to_settings.up.sql -// 1628580203_add_hidden_account.up.sql -// 1629123384_add_id_to_app_metrics.up.sql -// 1630401853_add_opensea_enabled_to_settings.up.sql -// 1630464455_create-saved_addresses-table.down.sql -// 1630464455_create-saved_addresses-table.up.sql -// 1630485153_networks.down.sql -// 1630485153_networks.up.sql -// 1632262444_profile_pictures_show_to.up.sql -// 1635942153_add_telemetry_server_url_to_settings.up.sql -// 1635942154_add_backup_setting.up.sql -// 1637745568_add_auto_message_setting.up.sql -// 1640111208_nodeconfig.up.sql -// doc.go -// DO NOT EDIT! +// 0001_app.down.sql (356B) +// 0001_app.up.sql (2.967kB) +// 0002_tokens.down.sql (19B) +// 0002_tokens.up.sql (248B) +// 0003_settings.down.sql (118B) +// 0003_settings.up.sql (1.311kB) +// 0004_pending_stickers.down.sql (0) +// 0004_pending_stickers.up.sql (61B) +// 0005_waku_mode.down.sql (0) +// 0005_waku_mode.up.sql (146B) +// 0006_appearance.up.sql (67B) +// 0007_enable_waku_default.up.sql (38B) +// 0008_add_push_notifications.up.sql (349B) +// 0009_enable_sending_push_notifications.down.sql (49B) +// 0009_enable_sending_push_notifications.up.sql (49B) +// 0010_add_block_mentions.down.sql (83B) +// 0010_add_block_mentions.up.sql (89B) +// 0011_allow_webview_permission_requests.down.sql (0) +// 0011_allow_webview_permission_requests.up.sql (88B) +// 0012_pending_transactions.down.sql (33B) +// 0012_pending_transactions.up.sql (321B) +// 0013_favourites.down.sql (23B) +// 0013_favourites.up.sql (132B) +// 0014_add_use_mailservers.down.sql (0) +// 0014_add_use_mailservers.up.sql (111B) +// 0015_link_previews.down.sql (0) +// 0015_link_previews.up.sql (203B) +// 0016_local_notifications_preferences.down.sql (43B) +// 0016_local_notifications_preferences.up.sql (204B) +// 0017_bookmarks.down.sql (22B) +// 0017_bookmarks.up.sql (147B) +// 0018_profile_pictures_visibility.up.sql (84B) +// 0019_blocks_ranges_extra_data.up.sql (89B) +// 0020_metrics.up.sql (235B) +// 0021_add_session_id_to_metrics.up.sql (55B) +// 0022_pending_transfers.up.sql (706B) +// 1618237885_settings_anon_metrics_should_send.up.sql (80B) +// 1618395756_contacts_only.up.sql (136B) +// 1622184614_add_default_sync_period.up.sql (125B) +// 1625872445_user_status.up.sql (351B) +// 1627983977_add_gif_to_settings.up.sql (102B) +// 1628580203_add_hidden_account.up.sql (67B) +// 1629123384_add_id_to_app_metrics.up.sql (589B) +// 1630401853_add_opensea_enabled_to_settings.up.sql (70B) +// 1630464455_create-saved_addresses-table.down.sql (28B) +// 1630464455_create-saved_addresses-table.up.sql (187B) +// 1630485153_networks.down.sql (21B) +// 1630485153_networks.up.sql (394B) +// 1632262444_profile_pictures_show_to.up.sql (81B) +// 1635942153_add_telemetry_server_url_to_settings.up.sql (128B) +// 1635942154_add_backup_setting.up.sql (287B) +// 1637745568_add_auto_message_setting.up.sql (122B) +// 1640111208_nodeconfig.up.sql (7.659kB) +// doc.go (85B) package migrationsprevnodecfg import ( "bytes" "compress/gzip" + "crypto/sha256" "fmt" "io" "io/ioutil" @@ -73,7 +73,7 @@ import ( func bindataRead(data []byte, name string) ([]byte, error) { gz, err := gzip.NewReader(bytes.NewBuffer(data)) if err != nil { - return nil, fmt.Errorf("Read %q: %v", name, err) + return nil, fmt.Errorf("read %q: %w", name, err) } var buf bytes.Buffer @@ -81,7 +81,7 @@ func bindataRead(data []byte, name string) ([]byte, error) { clErr := gz.Close() if err != nil { - return nil, fmt.Errorf("Read %q: %v", name, err) + return nil, fmt.Errorf("read %q: %w", name, err) } if clErr != nil { return nil, err @@ -91,8 +91,9 @@ func bindataRead(data []byte, name string) ([]byte, error) { } type asset struct { - bytes []byte - info os.FileInfo + bytes []byte + info os.FileInfo + digest [sha256.Size]byte } type bindataFileInfo struct { @@ -136,8 +137,8 @@ func _0001_appDownSql() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "0001_app.down.sql", size: 356, mode: os.FileMode(436), modTime: time.Unix(1646839963, 0)} - a := &asset{bytes: bytes, info: info} + info := bindataFileInfo{name: "0001_app.down.sql", size: 356, mode: os.FileMode(0664), modTime: time.Unix(1647246959, 0)} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xb5, 0x25, 0xa0, 0xf8, 0x7d, 0x2d, 0xd, 0xcf, 0x18, 0xe4, 0x73, 0xc3, 0x95, 0xf5, 0x24, 0x20, 0xa9, 0xe6, 0x9e, 0x1d, 0x93, 0xe5, 0xc5, 0xad, 0x93, 0x8f, 0x5e, 0x40, 0xb5, 0x30, 0xaa, 0x25}} return a, nil } @@ -156,8 +157,8 @@ func _0001_appUpSql() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "0001_app.up.sql", size: 2967, mode: os.FileMode(436), modTime: time.Unix(1646839963, 0)} - a := &asset{bytes: bytes, info: info} + info := bindataFileInfo{name: "0001_app.up.sql", size: 2967, mode: os.FileMode(0664), modTime: time.Unix(1647246959, 0)} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xf7, 0x3a, 0xa7, 0xf2, 0x8f, 0xfa, 0x82, 0x7c, 0xc5, 0x49, 0xac, 0xac, 0xf, 0xc, 0x77, 0xe2, 0xba, 0xe8, 0x4d, 0xe, 0x6f, 0x5d, 0x2c, 0x2c, 0x18, 0x80, 0xc2, 0x1d, 0xe, 0x25, 0xe, 0x18}} return a, nil } @@ -176,8 +177,8 @@ func _0002_tokensDownSql() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "0002_tokens.down.sql", size: 19, mode: os.FileMode(436), modTime: time.Unix(1646839963, 0)} - a := &asset{bytes: bytes, info: info} + info := bindataFileInfo{name: "0002_tokens.down.sql", size: 19, mode: os.FileMode(0664), modTime: time.Unix(1647246959, 0)} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xd1, 0x31, 0x2, 0xcc, 0x2f, 0x38, 0x90, 0xf7, 0x58, 0x37, 0x47, 0xf4, 0x18, 0xf7, 0x72, 0x74, 0x67, 0x14, 0x7e, 0xf3, 0xb1, 0xd6, 0x5f, 0xb0, 0xd5, 0xe7, 0x91, 0xf4, 0x26, 0x77, 0x8e, 0x68}} return a, nil } @@ -196,8 +197,8 @@ func _0002_tokensUpSql() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "0002_tokens.up.sql", size: 248, mode: os.FileMode(436), modTime: time.Unix(1646839963, 0)} - a := &asset{bytes: bytes, info: info} + info := bindataFileInfo{name: "0002_tokens.up.sql", size: 248, mode: os.FileMode(0664), modTime: time.Unix(1647246959, 0)} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xcc, 0xd6, 0xde, 0xd3, 0x7b, 0xee, 0x92, 0x11, 0x38, 0xa4, 0xeb, 0x84, 0xca, 0xcb, 0x37, 0x75, 0x5, 0x77, 0x7f, 0x14, 0x39, 0xee, 0xa1, 0x8b, 0xd4, 0x5c, 0x6e, 0x55, 0x6, 0x50, 0x16, 0xd4}} return a, nil } @@ -216,8 +217,8 @@ func _0003_settingsDownSql() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "0003_settings.down.sql", size: 118, mode: os.FileMode(436), modTime: time.Unix(1646839963, 0)} - a := &asset{bytes: bytes, info: info} + info := bindataFileInfo{name: "0003_settings.down.sql", size: 118, mode: os.FileMode(0664), modTime: time.Unix(1647246959, 0)} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xe5, 0xa6, 0xf5, 0xc0, 0x60, 0x64, 0x77, 0xe2, 0xe7, 0x3c, 0x9b, 0xb1, 0x52, 0xa9, 0x95, 0x16, 0xf8, 0x60, 0x2f, 0xa5, 0xeb, 0x46, 0xb9, 0xb9, 0x8f, 0x4c, 0xf4, 0xfd, 0xbb, 0xe7, 0xe5, 0xe5}} return a, nil } @@ -236,8 +237,8 @@ func _0003_settingsUpSql() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "0003_settings.up.sql", size: 1311, mode: os.FileMode(436), modTime: time.Unix(1646839963, 0)} - a := &asset{bytes: bytes, info: info} + info := bindataFileInfo{name: "0003_settings.up.sql", size: 1311, mode: os.FileMode(0664), modTime: time.Unix(1647246959, 0)} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xea, 0x35, 0x0, 0xeb, 0xe2, 0x33, 0x68, 0xb9, 0xf4, 0xf6, 0x8e, 0x9e, 0x10, 0xe9, 0x58, 0x68, 0x28, 0xb, 0xcd, 0xec, 0x74, 0x71, 0xa7, 0x9a, 0x5a, 0x77, 0x59, 0xb1, 0x13, 0x1c, 0xa1, 0x5b}} return a, nil } @@ -256,8 +257,8 @@ func _0004_pending_stickersDownSql() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "0004_pending_stickers.down.sql", size: 0, mode: os.FileMode(436), modTime: time.Unix(1646839963, 0)} - a := &asset{bytes: bytes, info: info} + info := bindataFileInfo{name: "0004_pending_stickers.down.sql", size: 0, mode: os.FileMode(0664), modTime: time.Unix(1647246959, 0)} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xe3, 0xb0, 0xc4, 0x42, 0x98, 0xfc, 0x1c, 0x14, 0x9a, 0xfb, 0xf4, 0xc8, 0x99, 0x6f, 0xb9, 0x24, 0x27, 0xae, 0x41, 0xe4, 0x64, 0x9b, 0x93, 0x4c, 0xa4, 0x95, 0x99, 0x1b, 0x78, 0x52, 0xb8, 0x55}} return a, nil } @@ -276,8 +277,8 @@ func _0004_pending_stickersUpSql() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "0004_pending_stickers.up.sql", size: 61, mode: os.FileMode(436), modTime: time.Unix(1646839963, 0)} - a := &asset{bytes: bytes, info: info} + info := bindataFileInfo{name: "0004_pending_stickers.up.sql", size: 61, mode: os.FileMode(0664), modTime: time.Unix(1647246959, 0)} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x3c, 0xed, 0x25, 0xdf, 0x75, 0x2, 0x6c, 0xf0, 0xa2, 0xa8, 0x37, 0x62, 0x65, 0xad, 0xfd, 0x98, 0xa0, 0x9d, 0x63, 0x94, 0xdf, 0x6b, 0x46, 0xe0, 0x68, 0xec, 0x9c, 0x7f, 0x77, 0xdd, 0xb3, 0x6}} return a, nil } @@ -296,8 +297,8 @@ func _0005_waku_modeDownSql() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "0005_waku_mode.down.sql", size: 0, mode: os.FileMode(436), modTime: time.Unix(1646839963, 0)} - a := &asset{bytes: bytes, info: info} + info := bindataFileInfo{name: "0005_waku_mode.down.sql", size: 0, mode: os.FileMode(0664), modTime: time.Unix(1647246959, 0)} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xe3, 0xb0, 0xc4, 0x42, 0x98, 0xfc, 0x1c, 0x14, 0x9a, 0xfb, 0xf4, 0xc8, 0x99, 0x6f, 0xb9, 0x24, 0x27, 0xae, 0x41, 0xe4, 0x64, 0x9b, 0x93, 0x4c, 0xa4, 0x95, 0x99, 0x1b, 0x78, 0x52, 0xb8, 0x55}} return a, nil } @@ -316,8 +317,8 @@ func _0005_waku_modeUpSql() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "0005_waku_mode.up.sql", size: 146, mode: os.FileMode(436), modTime: time.Unix(1646839963, 0)} - a := &asset{bytes: bytes, info: info} + info := bindataFileInfo{name: "0005_waku_mode.up.sql", size: 146, mode: os.FileMode(0664), modTime: time.Unix(1647246959, 0)} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xa6, 0x91, 0xc, 0xd7, 0x89, 0x61, 0x2e, 0x4c, 0x5a, 0xb6, 0x67, 0xd1, 0xc1, 0x42, 0x24, 0x38, 0xd6, 0x1b, 0x75, 0x41, 0x9c, 0x23, 0xb0, 0xca, 0x5c, 0xf1, 0x5c, 0xd0, 0x13, 0x92, 0x3e, 0xe1}} return a, nil } @@ -336,8 +337,8 @@ func _0006_appearanceUpSql() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "0006_appearance.up.sql", size: 67, mode: os.FileMode(436), modTime: time.Unix(1646839963, 0)} - a := &asset{bytes: bytes, info: info} + info := bindataFileInfo{name: "0006_appearance.up.sql", size: 67, mode: os.FileMode(0664), modTime: time.Unix(1647246959, 0)} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xae, 0x6, 0x25, 0x6c, 0xe4, 0x9d, 0xa7, 0x72, 0xe8, 0xbc, 0xe4, 0x1f, 0x1e, 0x2d, 0x7c, 0xb7, 0xf6, 0xa3, 0xec, 0x3b, 0x4e, 0x93, 0x2e, 0xa4, 0xec, 0x6f, 0xe5, 0x95, 0x94, 0xe8, 0x4, 0xfb}} return a, nil } @@ -356,8 +357,8 @@ func _0007_enable_waku_defaultUpSql() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "0007_enable_waku_default.up.sql", size: 38, mode: os.FileMode(436), modTime: time.Unix(1646839963, 0)} - a := &asset{bytes: bytes, info: info} + info := bindataFileInfo{name: "0007_enable_waku_default.up.sql", size: 38, mode: os.FileMode(0664), modTime: time.Unix(1647246959, 0)} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xd4, 0x42, 0xb6, 0xe5, 0x48, 0x41, 0xeb, 0xc0, 0x7e, 0x3b, 0xe6, 0x8e, 0x96, 0x33, 0x20, 0x92, 0x24, 0x5a, 0x60, 0xfa, 0xa0, 0x3, 0x5e, 0x76, 0x4b, 0x89, 0xaa, 0x37, 0x66, 0xbc, 0x26, 0x11}} return a, nil } @@ -376,8 +377,8 @@ func _0008_add_push_notificationsUpSql() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "0008_add_push_notifications.up.sql", size: 349, mode: os.FileMode(436), modTime: time.Unix(1646839963, 0)} - a := &asset{bytes: bytes, info: info} + info := bindataFileInfo{name: "0008_add_push_notifications.up.sql", size: 349, mode: os.FileMode(0664), modTime: time.Unix(1647246959, 0)} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x5a, 0x0, 0xbf, 0xd0, 0xdd, 0xcd, 0x73, 0xe0, 0x7c, 0x56, 0xef, 0xdc, 0x57, 0x61, 0x94, 0x64, 0x70, 0xb9, 0xfa, 0xa1, 0x2a, 0x36, 0xc, 0x2f, 0xf8, 0x95, 0xa, 0x57, 0x3e, 0x7a, 0xd7, 0x12}} return a, nil } @@ -396,8 +397,8 @@ func _0009_enable_sending_push_notificationsDownSql() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "0009_enable_sending_push_notifications.down.sql", size: 49, mode: os.FileMode(436), modTime: time.Unix(1646839963, 0)} - a := &asset{bytes: bytes, info: info} + info := bindataFileInfo{name: "0009_enable_sending_push_notifications.down.sql", size: 49, mode: os.FileMode(0664), modTime: time.Unix(1647246959, 0)} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xe9, 0xae, 0x1b, 0x41, 0xcb, 0x9c, 0x2c, 0x93, 0xc6, 0x2a, 0x77, 0x3, 0xb9, 0x51, 0xe0, 0x68, 0x68, 0x0, 0xf7, 0x5b, 0xb3, 0x1e, 0x94, 0x44, 0xba, 0x9c, 0xd0, 0x3b, 0x80, 0x21, 0x6f, 0xb5}} return a, nil } @@ -416,8 +417,8 @@ func _0009_enable_sending_push_notificationsUpSql() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "0009_enable_sending_push_notifications.up.sql", size: 49, mode: os.FileMode(436), modTime: time.Unix(1646839963, 0)} - a := &asset{bytes: bytes, info: info} + info := bindataFileInfo{name: "0009_enable_sending_push_notifications.up.sql", size: 49, mode: os.FileMode(0664), modTime: time.Unix(1647246959, 0)} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x1b, 0x80, 0xe4, 0x9c, 0xc8, 0xb8, 0xd5, 0xef, 0xce, 0x74, 0x9b, 0x7b, 0xdd, 0xa, 0x99, 0x1e, 0xef, 0x7f, 0xb8, 0x99, 0x84, 0x4, 0x0, 0x6b, 0x1d, 0x2c, 0xa, 0xf8, 0x2c, 0x4f, 0xb5, 0x44}} return a, nil } @@ -436,8 +437,8 @@ func _0010_add_block_mentionsDownSql() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "0010_add_block_mentions.down.sql", size: 83, mode: os.FileMode(436), modTime: time.Unix(1646839963, 0)} - a := &asset{bytes: bytes, info: info} + info := bindataFileInfo{name: "0010_add_block_mentions.down.sql", size: 83, mode: os.FileMode(0664), modTime: time.Unix(1647246959, 0)} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x6d, 0x9e, 0x27, 0x1e, 0xba, 0x9f, 0xca, 0xae, 0x98, 0x2e, 0x6e, 0xe3, 0xdd, 0xac, 0x73, 0x34, 0x4e, 0x69, 0x92, 0xb5, 0xf6, 0x9, 0xab, 0x50, 0x35, 0xd, 0xee, 0xeb, 0x3e, 0xcc, 0x7e, 0xce}} return a, nil } @@ -456,8 +457,8 @@ func _0010_add_block_mentionsUpSql() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "0010_add_block_mentions.up.sql", size: 89, mode: os.FileMode(436), modTime: time.Unix(1646839963, 0)} - a := &asset{bytes: bytes, info: info} + info := bindataFileInfo{name: "0010_add_block_mentions.up.sql", size: 89, mode: os.FileMode(0664), modTime: time.Unix(1647246959, 0)} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xd7, 0x23, 0x85, 0xa2, 0xb5, 0xb6, 0xb4, 0x3f, 0xdc, 0x4e, 0xff, 0xe2, 0x6b, 0x66, 0x68, 0x5e, 0xb2, 0xb4, 0x14, 0xb2, 0x1b, 0x4d, 0xb1, 0xce, 0xf7, 0x6, 0x58, 0xa7, 0xaf, 0x93, 0x3f, 0x25}} return a, nil } @@ -476,8 +477,8 @@ func _0011_allow_webview_permission_requestsDownSql() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "0011_allow_webview_permission_requests.down.sql", size: 0, mode: os.FileMode(436), modTime: time.Unix(1646839963, 0)} - a := &asset{bytes: bytes, info: info} + info := bindataFileInfo{name: "0011_allow_webview_permission_requests.down.sql", size: 0, mode: os.FileMode(0664), modTime: time.Unix(1647246959, 0)} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xe3, 0xb0, 0xc4, 0x42, 0x98, 0xfc, 0x1c, 0x14, 0x9a, 0xfb, 0xf4, 0xc8, 0x99, 0x6f, 0xb9, 0x24, 0x27, 0xae, 0x41, 0xe4, 0x64, 0x9b, 0x93, 0x4c, 0xa4, 0x95, 0x99, 0x1b, 0x78, 0x52, 0xb8, 0x55}} return a, nil } @@ -496,8 +497,8 @@ func _0011_allow_webview_permission_requestsUpSql() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "0011_allow_webview_permission_requests.up.sql", size: 88, mode: os.FileMode(436), modTime: time.Unix(1646839963, 0)} - a := &asset{bytes: bytes, info: info} + info := bindataFileInfo{name: "0011_allow_webview_permission_requests.up.sql", size: 88, mode: os.FileMode(0664), modTime: time.Unix(1647246959, 0)} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x43, 0x5f, 0x22, 0x4c, 0x98, 0x1d, 0xc6, 0xf4, 0x89, 0xaf, 0xf4, 0x44, 0xba, 0xf8, 0x28, 0xa7, 0xb5, 0xb9, 0xf0, 0xf2, 0xcb, 0x5, 0x59, 0x7a, 0xc, 0xdf, 0xd3, 0x38, 0xa4, 0xb8, 0x98, 0xc2}} return a, nil } @@ -516,8 +517,8 @@ func _0012_pending_transactionsDownSql() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "0012_pending_transactions.down.sql", size: 33, mode: os.FileMode(436), modTime: time.Unix(1646839963, 0)} - a := &asset{bytes: bytes, info: info} + info := bindataFileInfo{name: "0012_pending_transactions.down.sql", size: 33, mode: os.FileMode(0664), modTime: time.Unix(1647246959, 0)} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x7e, 0x41, 0xfe, 0x5c, 0xd8, 0xc3, 0x29, 0xfd, 0x31, 0x78, 0x99, 0x7a, 0xeb, 0x17, 0x62, 0x88, 0x41, 0xb3, 0xe7, 0xb5, 0x5, 0x0, 0x90, 0xa1, 0x7, 0x1a, 0x23, 0x88, 0x81, 0xba, 0x56, 0x9d}} return a, nil } @@ -536,8 +537,8 @@ func _0012_pending_transactionsUpSql() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "0012_pending_transactions.up.sql", size: 321, mode: os.FileMode(436), modTime: time.Unix(1646839963, 0)} - a := &asset{bytes: bytes, info: info} + info := bindataFileInfo{name: "0012_pending_transactions.up.sql", size: 321, mode: os.FileMode(0664), modTime: time.Unix(1647246959, 0)} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xd, 0x17, 0xff, 0xd7, 0xa7, 0x49, 0x1e, 0x7b, 0x34, 0x63, 0x7c, 0x53, 0xaa, 0x6b, 0x2d, 0xc8, 0xe0, 0x82, 0x21, 0x90, 0x3a, 0x94, 0xf1, 0xa6, 0xe4, 0x70, 0xe5, 0x85, 0x1a, 0x48, 0x25, 0xb}} return a, nil } @@ -556,8 +557,8 @@ func _0013_favouritesDownSql() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "0013_favourites.down.sql", size: 23, mode: os.FileMode(436), modTime: time.Unix(1646839963, 0)} - a := &asset{bytes: bytes, info: info} + info := bindataFileInfo{name: "0013_favourites.down.sql", size: 23, mode: os.FileMode(0664), modTime: time.Unix(1647246959, 0)} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x32, 0xf8, 0x55, 0x13, 0x4f, 0x4a, 0x19, 0x83, 0x9c, 0xda, 0x34, 0xb8, 0x3, 0x54, 0x82, 0x1e, 0x99, 0x36, 0x6b, 0x42, 0x3, 0xf6, 0x43, 0xde, 0xe6, 0x32, 0xb6, 0xdf, 0xe2, 0x59, 0x8c, 0x84}} return a, nil } @@ -576,8 +577,8 @@ func _0013_favouritesUpSql() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "0013_favourites.up.sql", size: 132, mode: os.FileMode(436), modTime: time.Unix(1646839963, 0)} - a := &asset{bytes: bytes, info: info} + info := bindataFileInfo{name: "0013_favourites.up.sql", size: 132, mode: os.FileMode(0664), modTime: time.Unix(1647246959, 0)} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xbe, 0x1, 0x27, 0x38, 0x76, 0xf5, 0xcb, 0x61, 0xda, 0x5b, 0xce, 0xd9, 0x8b, 0x18, 0x77, 0x61, 0x84, 0xe7, 0x22, 0xe2, 0x13, 0x99, 0xab, 0x32, 0xbc, 0xbe, 0xed, 0x1f, 0x2f, 0xb0, 0xe4, 0x8d}} return a, nil } @@ -596,8 +597,8 @@ func _0014_add_use_mailserversDownSql() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "0014_add_use_mailservers.down.sql", size: 0, mode: os.FileMode(436), modTime: time.Unix(1646839963, 0)} - a := &asset{bytes: bytes, info: info} + info := bindataFileInfo{name: "0014_add_use_mailservers.down.sql", size: 0, mode: os.FileMode(0664), modTime: time.Unix(1647246959, 0)} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xe3, 0xb0, 0xc4, 0x42, 0x98, 0xfc, 0x1c, 0x14, 0x9a, 0xfb, 0xf4, 0xc8, 0x99, 0x6f, 0xb9, 0x24, 0x27, 0xae, 0x41, 0xe4, 0x64, 0x9b, 0x93, 0x4c, 0xa4, 0x95, 0x99, 0x1b, 0x78, 0x52, 0xb8, 0x55}} return a, nil } @@ -616,8 +617,8 @@ func _0014_add_use_mailserversUpSql() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "0014_add_use_mailservers.up.sql", size: 111, mode: os.FileMode(436), modTime: time.Unix(1646839963, 0)} - a := &asset{bytes: bytes, info: info} + info := bindataFileInfo{name: "0014_add_use_mailservers.up.sql", size: 111, mode: os.FileMode(0664), modTime: time.Unix(1647246959, 0)} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xc9, 0xba, 0x65, 0xbf, 0x1b, 0xc9, 0x6d, 0x45, 0xf2, 0xf5, 0x30, 0x7c, 0xc1, 0xde, 0xb8, 0xe3, 0x3f, 0xa9, 0x2f, 0x9f, 0xea, 0x1, 0x29, 0x29, 0x65, 0xe7, 0x38, 0xab, 0xa4, 0x62, 0xf, 0xd0}} return a, nil } @@ -636,8 +637,8 @@ func _0015_link_previewsDownSql() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "0015_link_previews.down.sql", size: 0, mode: os.FileMode(436), modTime: time.Unix(1646839963, 0)} - a := &asset{bytes: bytes, info: info} + info := bindataFileInfo{name: "0015_link_previews.down.sql", size: 0, mode: os.FileMode(0664), modTime: time.Unix(1647246959, 0)} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xe3, 0xb0, 0xc4, 0x42, 0x98, 0xfc, 0x1c, 0x14, 0x9a, 0xfb, 0xf4, 0xc8, 0x99, 0x6f, 0xb9, 0x24, 0x27, 0xae, 0x41, 0xe4, 0x64, 0x9b, 0x93, 0x4c, 0xa4, 0x95, 0x99, 0x1b, 0x78, 0x52, 0xb8, 0x55}} return a, nil } @@ -656,8 +657,8 @@ func _0015_link_previewsUpSql() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "0015_link_previews.up.sql", size: 203, mode: os.FileMode(436), modTime: time.Unix(1646839963, 0)} - a := &asset{bytes: bytes, info: info} + info := bindataFileInfo{name: "0015_link_previews.up.sql", size: 203, mode: os.FileMode(0664), modTime: time.Unix(1647246959, 0)} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xb1, 0xf7, 0x38, 0x25, 0xa6, 0xfc, 0x6b, 0x9, 0xe4, 0xd9, 0xbf, 0x58, 0x7b, 0x80, 0xd8, 0x48, 0x63, 0xde, 0xa5, 0x5e, 0x30, 0xa3, 0xeb, 0x68, 0x8e, 0x6a, 0x9f, 0xfd, 0xf4, 0x46, 0x41, 0x34}} return a, nil } @@ -676,8 +677,8 @@ func _0016_local_notifications_preferencesDownSql() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "0016_local_notifications_preferences.down.sql", size: 43, mode: os.FileMode(436), modTime: time.Unix(1646839963, 0)} - a := &asset{bytes: bytes, info: info} + info := bindataFileInfo{name: "0016_local_notifications_preferences.down.sql", size: 43, mode: os.FileMode(0664), modTime: time.Unix(1647246959, 0)} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xe0, 0x50, 0xc7, 0xdd, 0x53, 0x9c, 0x5d, 0x1e, 0xb5, 0x71, 0x25, 0x50, 0x58, 0xcf, 0x6d, 0xbe, 0x5a, 0x8, 0x12, 0xc9, 0x13, 0xd, 0x9a, 0x3d, 0x4b, 0x7a, 0x2f, 0x1b, 0xe5, 0x23, 0x52, 0x78}} return a, nil } @@ -696,8 +697,8 @@ func _0016_local_notifications_preferencesUpSql() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "0016_local_notifications_preferences.up.sql", size: 204, mode: os.FileMode(436), modTime: time.Unix(1646839963, 0)} - a := &asset{bytes: bytes, info: info} + info := bindataFileInfo{name: "0016_local_notifications_preferences.up.sql", size: 204, mode: os.FileMode(0664), modTime: time.Unix(1647246959, 0)} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x3f, 0x3a, 0x16, 0x25, 0xdf, 0xba, 0x62, 0xd3, 0x81, 0x73, 0xc, 0x10, 0x85, 0xbc, 0x8d, 0xe, 0x1d, 0x62, 0xcb, 0xb, 0x6d, 0x8c, 0x4f, 0x63, 0x5f, 0xe2, 0xd, 0xc5, 0x46, 0xa8, 0x35, 0x5b}} return a, nil } @@ -716,8 +717,8 @@ func _0017_bookmarksDownSql() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "0017_bookmarks.down.sql", size: 22, mode: os.FileMode(436), modTime: time.Unix(1646839963, 0)} - a := &asset{bytes: bytes, info: info} + info := bindataFileInfo{name: "0017_bookmarks.down.sql", size: 22, mode: os.FileMode(0664), modTime: time.Unix(1647246959, 0)} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x9a, 0x13, 0x2a, 0x44, 0xb0, 0x3, 0x18, 0x63, 0xb8, 0x33, 0xda, 0x3a, 0xeb, 0xb8, 0xcb, 0xd1, 0x98, 0x29, 0xa7, 0xf0, 0x6, 0x9d, 0xc9, 0x62, 0xe7, 0x89, 0x7f, 0x77, 0xaf, 0xec, 0x6b, 0x8f}} return a, nil } @@ -736,8 +737,8 @@ func _0017_bookmarksUpSql() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "0017_bookmarks.up.sql", size: 147, mode: os.FileMode(436), modTime: time.Unix(1646839963, 0)} - a := &asset{bytes: bytes, info: info} + info := bindataFileInfo{name: "0017_bookmarks.up.sql", size: 147, mode: os.FileMode(0664), modTime: time.Unix(1647246959, 0)} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xbc, 0x47, 0xe1, 0xe3, 0xd8, 0xc6, 0x4, 0x6d, 0x5f, 0x2f, 0xa, 0x51, 0xa6, 0x8c, 0x6a, 0xe0, 0x3d, 0x8c, 0x91, 0x47, 0xbc, 0x1, 0x75, 0x46, 0x92, 0x2, 0x18, 0x6e, 0xe3, 0x4f, 0x18, 0x57}} return a, nil } @@ -756,8 +757,8 @@ func _0018_profile_pictures_visibilityUpSql() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "0018_profile_pictures_visibility.up.sql", size: 84, mode: os.FileMode(436), modTime: time.Unix(1646839963, 0)} - a := &asset{bytes: bytes, info: info} + info := bindataFileInfo{name: "0018_profile_pictures_visibility.up.sql", size: 84, mode: os.FileMode(0664), modTime: time.Unix(1647246959, 0)} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xc9, 0xe3, 0xc5, 0xec, 0x83, 0x55, 0x45, 0x57, 0x7a, 0xaa, 0xd2, 0xa7, 0x59, 0xa7, 0x87, 0xef, 0x63, 0x19, 0x9c, 0x46, 0x9c, 0xc5, 0x32, 0x89, 0xa4, 0x68, 0x70, 0xd8, 0x83, 0x43, 0xa4, 0x72}} return a, nil } @@ -776,8 +777,8 @@ func _0019_blocks_ranges_extra_dataUpSql() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "0019_blocks_ranges_extra_data.up.sql", size: 89, mode: os.FileMode(436), modTime: time.Unix(1646839963, 0)} - a := &asset{bytes: bytes, info: info} + info := bindataFileInfo{name: "0019_blocks_ranges_extra_data.up.sql", size: 89, mode: os.FileMode(0664), modTime: time.Unix(1647246959, 0)} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xa3, 0x96, 0x32, 0x58, 0xf0, 0xb9, 0xe1, 0x70, 0x81, 0xca, 0x8d, 0x45, 0x57, 0x8a, 0x7, 0x5d, 0x9e, 0x2a, 0x30, 0xb, 0xad, 0x5f, 0xf8, 0xd4, 0x30, 0x94, 0x73, 0x37, 0x8d, 0xc1, 0x9a, 0xed}} return a, nil } @@ -796,8 +797,8 @@ func _0020_metricsUpSql() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "0020_metrics.up.sql", size: 235, mode: os.FileMode(436), modTime: time.Unix(1646839963, 0)} - a := &asset{bytes: bytes, info: info} + info := bindataFileInfo{name: "0020_metrics.up.sql", size: 235, mode: os.FileMode(0664), modTime: time.Unix(1647246959, 0)} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xe8, 0x32, 0xbc, 0xb6, 0x9b, 0x5a, 0x8f, 0x9f, 0x4c, 0x90, 0x81, 0x3e, 0x2e, 0xd1, 0x23, 0xcd, 0xf1, 0x83, 0x35, 0xca, 0x66, 0x87, 0x52, 0x4e, 0x30, 0x3e, 0x4f, 0xa8, 0xfd, 0x30, 0x16, 0xbd}} return a, nil } @@ -816,8 +817,8 @@ func _0021_add_session_id_to_metricsUpSql() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "0021_add_session_id_to_metrics.up.sql", size: 55, mode: os.FileMode(436), modTime: time.Unix(1646839963, 0)} - a := &asset{bytes: bytes, info: info} + info := bindataFileInfo{name: "0021_add_session_id_to_metrics.up.sql", size: 55, mode: os.FileMode(0664), modTime: time.Unix(1647246959, 0)} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xb7, 0x81, 0xfc, 0x97, 0xd1, 0x8b, 0xea, 0x8e, 0xd7, 0xc2, 0x53, 0x62, 0xe9, 0xbc, 0xf, 0x8c, 0x46, 0x41, 0x41, 0xb7, 0x6, 0x35, 0xf5, 0xba, 0xbb, 0x28, 0x50, 0x48, 0xbf, 0x36, 0x90, 0x5c}} return a, nil } @@ -836,8 +837,8 @@ func _0022_pending_transfersUpSql() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "0022_pending_transfers.up.sql", size: 706, mode: os.FileMode(436), modTime: time.Unix(1646839963, 0)} - a := &asset{bytes: bytes, info: info} + info := bindataFileInfo{name: "0022_pending_transfers.up.sql", size: 706, mode: os.FileMode(0664), modTime: time.Unix(1647246959, 0)} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x6a, 0x9, 0xe6, 0x6, 0xae, 0x60, 0xdd, 0xbb, 0x76, 0xac, 0xe0, 0x57, 0x30, 0x67, 0x37, 0x93, 0x40, 0x13, 0xec, 0xf2, 0x6e, 0x61, 0xa, 0x14, 0xb2, 0xb1, 0xbd, 0x91, 0xf8, 0x89, 0xb3, 0xe3}} return a, nil } @@ -856,8 +857,8 @@ func _1618237885_settings_anon_metrics_should_sendUpSql() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "1618237885_settings_anon_metrics_should_send.up.sql", size: 80, mode: os.FileMode(436), modTime: time.Unix(1646839963, 0)} - a := &asset{bytes: bytes, info: info} + info := bindataFileInfo{name: "1618237885_settings_anon_metrics_should_send.up.sql", size: 80, mode: os.FileMode(0664), modTime: time.Unix(1647246959, 0)} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xea, 0x6c, 0x1d, 0x1f, 0x54, 0x62, 0x18, 0x22, 0x5c, 0xa7, 0x8c, 0x59, 0x24, 0xd3, 0x4d, 0x55, 0xc4, 0x2a, 0x9e, 0x4c, 0x37, 0x6b, 0xfd, 0xac, 0xec, 0xb7, 0x68, 0x21, 0x26, 0x26, 0xf3, 0x92}} return a, nil } @@ -876,8 +877,8 @@ func _1618395756_contacts_onlyUpSql() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "1618395756_contacts_only.up.sql", size: 136, mode: os.FileMode(436), modTime: time.Unix(1646839963, 0)} - a := &asset{bytes: bytes, info: info} + info := bindataFileInfo{name: "1618395756_contacts_only.up.sql", size: 136, mode: os.FileMode(0664), modTime: time.Unix(1647246959, 0)} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x1, 0xe3, 0xd0, 0xe7, 0xf2, 0x6e, 0xbf, 0x27, 0xf6, 0xe2, 0x2e, 0x16, 0x4b, 0x52, 0x3b, 0xcf, 0x63, 0x52, 0xfc, 0x1d, 0x43, 0xba, 0x42, 0xf9, 0x1e, 0x1e, 0x39, 0x40, 0xed, 0x0, 0x20, 0xa8}} return a, nil } @@ -896,8 +897,8 @@ func _1622184614_add_default_sync_periodUpSql() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "1622184614_add_default_sync_period.up.sql", size: 125, mode: os.FileMode(436), modTime: time.Unix(1646839963, 0)} - a := &asset{bytes: bytes, info: info} + info := bindataFileInfo{name: "1622184614_add_default_sync_period.up.sql", size: 125, mode: os.FileMode(0664), modTime: time.Unix(1647246959, 0)} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x60, 0x39, 0xeb, 0x8f, 0xdc, 0x1, 0x56, 0xc1, 0x9b, 0xaa, 0xda, 0x44, 0xe0, 0xdb, 0xda, 0x2c, 0xe7, 0x71, 0x8d, 0xbc, 0xc1, 0x9a, 0x4f, 0x48, 0xe0, 0x5e, 0x81, 0x1e, 0x8e, 0x6a, 0x4d, 0x3}} return a, nil } @@ -916,8 +917,8 @@ func _1625872445_user_statusUpSql() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "1625872445_user_status.up.sql", size: 351, mode: os.FileMode(436), modTime: time.Unix(1646839963, 0)} - a := &asset{bytes: bytes, info: info} + info := bindataFileInfo{name: "1625872445_user_status.up.sql", size: 351, mode: os.FileMode(0664), modTime: time.Unix(1647246959, 0)} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xf5, 0xa, 0xfe, 0x7a, 0xcc, 0x9e, 0x35, 0x26, 0xb, 0xc8, 0xf2, 0x7d, 0xfa, 0x4b, 0xcf, 0x53, 0x20, 0x76, 0xc7, 0xd, 0xbc, 0x78, 0x4f, 0x74, 0x2d, 0x2e, 0x2e, 0x7e, 0x62, 0xae, 0x78, 0x1f}} return a, nil } @@ -936,8 +937,8 @@ func _1627983977_add_gif_to_settingsUpSql() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "1627983977_add_gif_to_settings.up.sql", size: 102, mode: os.FileMode(436), modTime: time.Unix(1646839963, 0)} - a := &asset{bytes: bytes, info: info} + info := bindataFileInfo{name: "1627983977_add_gif_to_settings.up.sql", size: 102, mode: os.FileMode(0664), modTime: time.Unix(1647246959, 0)} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x63, 0xe6, 0xe1, 0x97, 0x64, 0x4c, 0xe2, 0x14, 0xb1, 0x96, 0x3a, 0xb0, 0xb9, 0xb7, 0xb5, 0x78, 0x4a, 0x39, 0x69, 0x89, 0xb7, 0x89, 0x19, 0xb8, 0x89, 0x1, 0xc5, 0xc2, 0x85, 0x53, 0xe2, 0x83}} return a, nil } @@ -956,8 +957,8 @@ func _1628580203_add_hidden_accountUpSql() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "1628580203_add_hidden_account.up.sql", size: 67, mode: os.FileMode(436), modTime: time.Unix(1646839963, 0)} - a := &asset{bytes: bytes, info: info} + info := bindataFileInfo{name: "1628580203_add_hidden_account.up.sql", size: 67, mode: os.FileMode(0664), modTime: time.Unix(1647246959, 0)} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xcb, 0x30, 0xf1, 0xd4, 0x60, 0xe2, 0x28, 0x14, 0xcb, 0x16, 0xb, 0x9, 0xea, 0x17, 0xa, 0x9e, 0x89, 0xa8, 0x32, 0x32, 0xf8, 0x4d, 0xa0, 0xe1, 0xe5, 0x79, 0xbd, 0x7d, 0x79, 0xe9, 0x4c, 0x9e}} return a, nil } @@ -976,8 +977,8 @@ func _1629123384_add_id_to_app_metricsUpSql() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "1629123384_add_id_to_app_metrics.up.sql", size: 589, mode: os.FileMode(436), modTime: time.Unix(1646839963, 0)} - a := &asset{bytes: bytes, info: info} + info := bindataFileInfo{name: "1629123384_add_id_to_app_metrics.up.sql", size: 589, mode: os.FileMode(0664), modTime: time.Unix(1647246959, 0)} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xdf, 0x66, 0xc0, 0x69, 0xb, 0xad, 0x49, 0x7c, 0x8c, 0x67, 0xb8, 0xd6, 0x8d, 0x5d, 0x86, 0x1f, 0xa4, 0x53, 0xf5, 0x8, 0x1, 0xfd, 0x38, 0x49, 0xee, 0x84, 0xc0, 0xd8, 0x17, 0x72, 0x3, 0xb3}} return a, nil } @@ -996,8 +997,8 @@ func _1630401853_add_opensea_enabled_to_settingsUpSql() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "1630401853_add_opensea_enabled_to_settings.up.sql", size: 70, mode: os.FileMode(436), modTime: time.Unix(1646839963, 0)} - a := &asset{bytes: bytes, info: info} + info := bindataFileInfo{name: "1630401853_add_opensea_enabled_to_settings.up.sql", size: 70, mode: os.FileMode(0664), modTime: time.Unix(1647246959, 0)} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x6, 0x91, 0x86, 0x15, 0xc8, 0x99, 0xe3, 0xae, 0xa, 0x6e, 0x94, 0x48, 0x51, 0x5b, 0x18, 0xe0, 0xbc, 0xaf, 0x34, 0x75, 0x55, 0x61, 0xd4, 0xc1, 0x85, 0xc7, 0x3d, 0x99, 0x9e, 0x1f, 0x37, 0x56}} return a, nil } @@ -1016,8 +1017,8 @@ func _1630464455_createSaved_addressesTableDownSql() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "1630464455_create-saved_addresses-table.down.sql", size: 28, mode: os.FileMode(436), modTime: time.Unix(1646839963, 0)} - a := &asset{bytes: bytes, info: info} + info := bindataFileInfo{name: "1630464455_create-saved_addresses-table.down.sql", size: 28, mode: os.FileMode(0664), modTime: time.Unix(1647246959, 0)} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x23, 0x52, 0x39, 0xb5, 0x42, 0xac, 0xcb, 0xa1, 0x44, 0xb7, 0x94, 0x26, 0x24, 0xb2, 0x12, 0xc, 0xc5, 0xbf, 0x63, 0x13, 0x6f, 0x3c, 0x4, 0x7b, 0xf0, 0xd, 0xfa, 0x55, 0x9e, 0x51, 0xf9, 0x7a}} return a, nil } @@ -1036,8 +1037,8 @@ func _1630464455_createSaved_addressesTableUpSql() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "1630464455_create-saved_addresses-table.up.sql", size: 187, mode: os.FileMode(436), modTime: time.Unix(1646839963, 0)} - a := &asset{bytes: bytes, info: info} + info := bindataFileInfo{name: "1630464455_create-saved_addresses-table.up.sql", size: 187, mode: os.FileMode(0664), modTime: time.Unix(1647246959, 0)} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x32, 0xf, 0x56, 0x18, 0xeb, 0x4e, 0xac, 0xd8, 0xd6, 0x91, 0xae, 0x83, 0xcf, 0x91, 0x9e, 0x4, 0x4b, 0x2, 0x1f, 0x6d, 0xba, 0xf6, 0x3, 0xf2, 0x98, 0x72, 0xf6, 0x91, 0x29, 0x96, 0x0, 0x35}} return a, nil } @@ -1056,8 +1057,8 @@ func _1630485153_networksDownSql() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "1630485153_networks.down.sql", size: 21, mode: os.FileMode(436), modTime: time.Unix(1646839963, 0)} - a := &asset{bytes: bytes, info: info} + info := bindataFileInfo{name: "1630485153_networks.down.sql", size: 21, mode: os.FileMode(0664), modTime: time.Unix(1647246959, 0)} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xbb, 0x3e, 0x57, 0xb7, 0xf7, 0x8, 0xbd, 0xb5, 0xc2, 0xea, 0xc, 0x45, 0xb7, 0x7, 0x9, 0xca, 0xe7, 0x48, 0x7e, 0x56, 0x4e, 0x44, 0x78, 0x8e, 0xe3, 0x87, 0x63, 0xaf, 0x16, 0x3f, 0xf9, 0x71}} return a, nil } @@ -1076,8 +1077,8 @@ func _1630485153_networksUpSql() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "1630485153_networks.up.sql", size: 394, mode: os.FileMode(436), modTime: time.Unix(1646839963, 0)} - a := &asset{bytes: bytes, info: info} + info := bindataFileInfo{name: "1630485153_networks.up.sql", size: 394, mode: os.FileMode(0664), modTime: time.Unix(1647246959, 0)} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xed, 0x9, 0x1d, 0x3, 0x86, 0xbd, 0xc5, 0xde, 0x3c, 0x1b, 0x40, 0x41, 0x7c, 0x61, 0x8, 0x80, 0x53, 0x87, 0x1b, 0x5a, 0x56, 0xd, 0x88, 0x1d, 0x60, 0x24, 0xce, 0x7b, 0x8f, 0xff, 0xaf, 0x36}} return a, nil } @@ -1096,8 +1097,8 @@ func _1632262444_profile_pictures_show_toUpSql() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "1632262444_profile_pictures_show_to.up.sql", size: 81, mode: os.FileMode(436), modTime: time.Unix(1646839963, 0)} - a := &asset{bytes: bytes, info: info} + info := bindataFileInfo{name: "1632262444_profile_pictures_show_to.up.sql", size: 81, mode: os.FileMode(0664), modTime: time.Unix(1647246959, 0)} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xc3, 0xa2, 0x5a, 0x94, 0xde, 0x86, 0x2a, 0x29, 0xf5, 0xb3, 0x36, 0xe7, 0x53, 0x81, 0x55, 0xc9, 0xb5, 0xc3, 0xf4, 0x8c, 0x65, 0x2c, 0x4c, 0x48, 0xfd, 0x3c, 0xb7, 0x14, 0xb4, 0xea, 0x7a, 0x13}} return a, nil } @@ -1116,8 +1117,8 @@ func _1635942153_add_telemetry_server_url_to_settingsUpSql() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "1635942153_add_telemetry_server_url_to_settings.up.sql", size: 128, mode: os.FileMode(436), modTime: time.Unix(1646839963, 0)} - a := &asset{bytes: bytes, info: info} + info := bindataFileInfo{name: "1635942153_add_telemetry_server_url_to_settings.up.sql", size: 128, mode: os.FileMode(0664), modTime: time.Unix(1647246959, 0)} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x6e, 0x9b, 0x1d, 0x39, 0x9c, 0x8d, 0x50, 0x86, 0xdf, 0xe5, 0x81, 0x55, 0xdc, 0x31, 0xcd, 0xb7, 0xc7, 0x5a, 0x67, 0x3b, 0x21, 0x99, 0xa5, 0x74, 0xb8, 0xd3, 0x58, 0xae, 0x29, 0x68, 0x2a, 0x8d}} return a, nil } @@ -1136,8 +1137,8 @@ func _1635942154_add_backup_settingUpSql() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "1635942154_add_backup_setting.up.sql", size: 287, mode: os.FileMode(436), modTime: time.Unix(1646839963, 0)} - a := &asset{bytes: bytes, info: info} + info := bindataFileInfo{name: "1635942154_add_backup_setting.up.sql", size: 287, mode: os.FileMode(0664), modTime: time.Unix(1647246959, 0)} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xb7, 0xe7, 0xfb, 0x70, 0x80, 0x5, 0xb4, 0x7b, 0x67, 0x8, 0x6e, 0x5f, 0x45, 0x17, 0xd9, 0x5f, 0x18, 0x66, 0x2f, 0x8a, 0x4f, 0xd4, 0x15, 0xe5, 0x2b, 0xbb, 0x25, 0x7a, 0x30, 0xad, 0x4c, 0x1a}} return a, nil } @@ -1156,8 +1157,8 @@ func _1637745568_add_auto_message_settingUpSql() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "1637745568_add_auto_message_setting.up.sql", size: 122, mode: os.FileMode(436), modTime: time.Unix(1646839963, 0)} - a := &asset{bytes: bytes, info: info} + info := bindataFileInfo{name: "1637745568_add_auto_message_setting.up.sql", size: 122, mode: os.FileMode(0664), modTime: time.Unix(1647246959, 0)} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x1d, 0xd8, 0xd2, 0xc2, 0x3a, 0xd7, 0xf1, 0x96, 0x6a, 0x35, 0xe5, 0x5c, 0xb9, 0xed, 0x4b, 0xf2, 0x5f, 0x80, 0x43, 0xca, 0x40, 0x57, 0x7e, 0xd7, 0x41, 0x9f, 0x70, 0x9f, 0xaf, 0x2a, 0xfc, 0x8f}} return a, nil } @@ -1176,8 +1177,8 @@ func _1640111208_nodeconfigUpSql() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "1640111208_nodeconfig.up.sql", size: 7659, mode: os.FileMode(436), modTime: time.Unix(1646839963, 0)} - a := &asset{bytes: bytes, info: info} + info := bindataFileInfo{name: "1640111208_nodeconfig.up.sql", size: 7659, mode: os.FileMode(0664), modTime: time.Unix(1647246959, 0)} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x8e, 0x5a, 0xc6, 0xed, 0x6, 0xcb, 0x51, 0x8b, 0x78, 0xe9, 0x10, 0x37, 0xd1, 0xad, 0x9b, 0x76, 0x9a, 0xb9, 0x72, 0x85, 0xe7, 0x8a, 0x7f, 0xf0, 0x81, 0xf8, 0x33, 0x59, 0x67, 0x8e, 0xeb, 0xb1}} return a, nil } @@ -1196,8 +1197,8 @@ func docGo() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "doc.go", size: 85, mode: os.FileMode(436), modTime: time.Unix(1646839963, 0)} - a := &asset{bytes: bytes, info: info} + info := bindataFileInfo{name: "doc.go", size: 85, mode: os.FileMode(0664), modTime: time.Unix(1647246959, 0)} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xe5, 0xd2, 0xea, 0xc5, 0xd, 0xc4, 0x7f, 0x95, 0x8e, 0xd5, 0xf5, 0x96, 0xf2, 0x1b, 0xcb, 0xc7, 0xc2, 0x46, 0x1, 0x78, 0x1d, 0x5d, 0x59, 0x19, 0x99, 0xdd, 0x5b, 0xf5, 0x63, 0xa5, 0x25, 0xb8}} return a, nil } @@ -1205,8 +1206,8 @@ func docGo() (*asset, error) { // It returns an error if the asset could not be found or // could not be loaded. func Asset(name string) ([]byte, error) { - cannonicalName := strings.Replace(name, "\\", "/", -1) - if f, ok := _bindata[cannonicalName]; ok { + canonicalName := strings.Replace(name, "\\", "/", -1) + if f, ok := _bindata[canonicalName]; ok { a, err := f() if err != nil { return nil, fmt.Errorf("Asset %s can't read by error: %v", name, err) @@ -1216,6 +1217,12 @@ func Asset(name string) ([]byte, error) { return nil, fmt.Errorf("Asset %s not found", name) } +// AssetString returns the asset contents as a string (instead of a []byte). +func AssetString(name string) (string, error) { + data, err := Asset(name) + return string(data), err +} + // MustAsset is like Asset but panics when Asset would return an error. // It simplifies safe initialization of global variables. func MustAsset(name string) []byte { @@ -1227,12 +1234,18 @@ func MustAsset(name string) []byte { return a } +// MustAssetString is like AssetString but panics when Asset would return an +// error. It simplifies safe initialization of global variables. +func MustAssetString(name string) string { + return string(MustAsset(name)) +} + // AssetInfo loads and returns the asset info for the given name. // It returns an error if the asset could not be found or // could not be loaded. func AssetInfo(name string) (os.FileInfo, error) { - cannonicalName := strings.Replace(name, "\\", "/", -1) - if f, ok := _bindata[cannonicalName]; ok { + canonicalName := strings.Replace(name, "\\", "/", -1) + if f, ok := _bindata[canonicalName]; ok { a, err := f() if err != nil { return nil, fmt.Errorf("AssetInfo %s can't read by error: %v", name, err) @@ -1242,6 +1255,33 @@ func AssetInfo(name string) (os.FileInfo, error) { return nil, fmt.Errorf("AssetInfo %s not found", name) } +// AssetDigest returns the digest of the file with the given name. It returns an +// error if the asset could not be found or the digest could not be loaded. +func AssetDigest(name string) ([sha256.Size]byte, error) { + canonicalName := strings.Replace(name, "\\", "/", -1) + if f, ok := _bindata[canonicalName]; ok { + a, err := f() + if err != nil { + return [sha256.Size]byte{}, fmt.Errorf("AssetDigest %s can't read by error: %v", name, err) + } + return a.digest, nil + } + return [sha256.Size]byte{}, fmt.Errorf("AssetDigest %s not found", name) +} + +// Digests returns a map of all known files and their checksums. +func Digests() (map[string][sha256.Size]byte, error) { + mp := make(map[string][sha256.Size]byte, len(_bindata)) + for name := range _bindata { + a, err := _bindata[name]() + if err != nil { + return nil, err + } + mp[name] = a.digest + } + return mp, nil +} + // AssetNames returns the names of the assets. func AssetNames() []string { names := make([]string, 0, len(_bindata)) @@ -1253,62 +1293,65 @@ func AssetNames() []string { // _bindata is a table, holding each asset generator, mapped to its name. var _bindata = map[string]func() (*asset, error){ - "0001_app.down.sql": _0001_appDownSql, - "0001_app.up.sql": _0001_appUpSql, - "0002_tokens.down.sql": _0002_tokensDownSql, - "0002_tokens.up.sql": _0002_tokensUpSql, - "0003_settings.down.sql": _0003_settingsDownSql, - "0003_settings.up.sql": _0003_settingsUpSql, - "0004_pending_stickers.down.sql": _0004_pending_stickersDownSql, - "0004_pending_stickers.up.sql": _0004_pending_stickersUpSql, - "0005_waku_mode.down.sql": _0005_waku_modeDownSql, - "0005_waku_mode.up.sql": _0005_waku_modeUpSql, - "0006_appearance.up.sql": _0006_appearanceUpSql, - "0007_enable_waku_default.up.sql": _0007_enable_waku_defaultUpSql, - "0008_add_push_notifications.up.sql": _0008_add_push_notificationsUpSql, - "0009_enable_sending_push_notifications.down.sql": _0009_enable_sending_push_notificationsDownSql, - "0009_enable_sending_push_notifications.up.sql": _0009_enable_sending_push_notificationsUpSql, - "0010_add_block_mentions.down.sql": _0010_add_block_mentionsDownSql, - "0010_add_block_mentions.up.sql": _0010_add_block_mentionsUpSql, - "0011_allow_webview_permission_requests.down.sql": _0011_allow_webview_permission_requestsDownSql, - "0011_allow_webview_permission_requests.up.sql": _0011_allow_webview_permission_requestsUpSql, - "0012_pending_transactions.down.sql": _0012_pending_transactionsDownSql, - "0012_pending_transactions.up.sql": _0012_pending_transactionsUpSql, - "0013_favourites.down.sql": _0013_favouritesDownSql, - "0013_favourites.up.sql": _0013_favouritesUpSql, - "0014_add_use_mailservers.down.sql": _0014_add_use_mailserversDownSql, - "0014_add_use_mailservers.up.sql": _0014_add_use_mailserversUpSql, - "0015_link_previews.down.sql": _0015_link_previewsDownSql, - "0015_link_previews.up.sql": _0015_link_previewsUpSql, - "0016_local_notifications_preferences.down.sql": _0016_local_notifications_preferencesDownSql, - "0016_local_notifications_preferences.up.sql": _0016_local_notifications_preferencesUpSql, - "0017_bookmarks.down.sql": _0017_bookmarksDownSql, - "0017_bookmarks.up.sql": _0017_bookmarksUpSql, - "0018_profile_pictures_visibility.up.sql": _0018_profile_pictures_visibilityUpSql, - "0019_blocks_ranges_extra_data.up.sql": _0019_blocks_ranges_extra_dataUpSql, - "0020_metrics.up.sql": _0020_metricsUpSql, - "0021_add_session_id_to_metrics.up.sql": _0021_add_session_id_to_metricsUpSql, - "0022_pending_transfers.up.sql": _0022_pending_transfersUpSql, - "1618237885_settings_anon_metrics_should_send.up.sql": _1618237885_settings_anon_metrics_should_sendUpSql, - "1618395756_contacts_only.up.sql": _1618395756_contacts_onlyUpSql, - "1622184614_add_default_sync_period.up.sql": _1622184614_add_default_sync_periodUpSql, - "1625872445_user_status.up.sql": _1625872445_user_statusUpSql, - "1627983977_add_gif_to_settings.up.sql": _1627983977_add_gif_to_settingsUpSql, - "1628580203_add_hidden_account.up.sql": _1628580203_add_hidden_accountUpSql, - "1629123384_add_id_to_app_metrics.up.sql": _1629123384_add_id_to_app_metricsUpSql, - "1630401853_add_opensea_enabled_to_settings.up.sql": _1630401853_add_opensea_enabled_to_settingsUpSql, - "1630464455_create-saved_addresses-table.down.sql": _1630464455_createSaved_addressesTableDownSql, - "1630464455_create-saved_addresses-table.up.sql": _1630464455_createSaved_addressesTableUpSql, - "1630485153_networks.down.sql": _1630485153_networksDownSql, - "1630485153_networks.up.sql": _1630485153_networksUpSql, - "1632262444_profile_pictures_show_to.up.sql": _1632262444_profile_pictures_show_toUpSql, + "0001_app.down.sql": _0001_appDownSql, + "0001_app.up.sql": _0001_appUpSql, + "0002_tokens.down.sql": _0002_tokensDownSql, + "0002_tokens.up.sql": _0002_tokensUpSql, + "0003_settings.down.sql": _0003_settingsDownSql, + "0003_settings.up.sql": _0003_settingsUpSql, + "0004_pending_stickers.down.sql": _0004_pending_stickersDownSql, + "0004_pending_stickers.up.sql": _0004_pending_stickersUpSql, + "0005_waku_mode.down.sql": _0005_waku_modeDownSql, + "0005_waku_mode.up.sql": _0005_waku_modeUpSql, + "0006_appearance.up.sql": _0006_appearanceUpSql, + "0007_enable_waku_default.up.sql": _0007_enable_waku_defaultUpSql, + "0008_add_push_notifications.up.sql": _0008_add_push_notificationsUpSql, + "0009_enable_sending_push_notifications.down.sql": _0009_enable_sending_push_notificationsDownSql, + "0009_enable_sending_push_notifications.up.sql": _0009_enable_sending_push_notificationsUpSql, + "0010_add_block_mentions.down.sql": _0010_add_block_mentionsDownSql, + "0010_add_block_mentions.up.sql": _0010_add_block_mentionsUpSql, + "0011_allow_webview_permission_requests.down.sql": _0011_allow_webview_permission_requestsDownSql, + "0011_allow_webview_permission_requests.up.sql": _0011_allow_webview_permission_requestsUpSql, + "0012_pending_transactions.down.sql": _0012_pending_transactionsDownSql, + "0012_pending_transactions.up.sql": _0012_pending_transactionsUpSql, + "0013_favourites.down.sql": _0013_favouritesDownSql, + "0013_favourites.up.sql": _0013_favouritesUpSql, + "0014_add_use_mailservers.down.sql": _0014_add_use_mailserversDownSql, + "0014_add_use_mailservers.up.sql": _0014_add_use_mailserversUpSql, + "0015_link_previews.down.sql": _0015_link_previewsDownSql, + "0015_link_previews.up.sql": _0015_link_previewsUpSql, + "0016_local_notifications_preferences.down.sql": _0016_local_notifications_preferencesDownSql, + "0016_local_notifications_preferences.up.sql": _0016_local_notifications_preferencesUpSql, + "0017_bookmarks.down.sql": _0017_bookmarksDownSql, + "0017_bookmarks.up.sql": _0017_bookmarksUpSql, + "0018_profile_pictures_visibility.up.sql": _0018_profile_pictures_visibilityUpSql, + "0019_blocks_ranges_extra_data.up.sql": _0019_blocks_ranges_extra_dataUpSql, + "0020_metrics.up.sql": _0020_metricsUpSql, + "0021_add_session_id_to_metrics.up.sql": _0021_add_session_id_to_metricsUpSql, + "0022_pending_transfers.up.sql": _0022_pending_transfersUpSql, + "1618237885_settings_anon_metrics_should_send.up.sql": _1618237885_settings_anon_metrics_should_sendUpSql, + "1618395756_contacts_only.up.sql": _1618395756_contacts_onlyUpSql, + "1622184614_add_default_sync_period.up.sql": _1622184614_add_default_sync_periodUpSql, + "1625872445_user_status.up.sql": _1625872445_user_statusUpSql, + "1627983977_add_gif_to_settings.up.sql": _1627983977_add_gif_to_settingsUpSql, + "1628580203_add_hidden_account.up.sql": _1628580203_add_hidden_accountUpSql, + "1629123384_add_id_to_app_metrics.up.sql": _1629123384_add_id_to_app_metricsUpSql, + "1630401853_add_opensea_enabled_to_settings.up.sql": _1630401853_add_opensea_enabled_to_settingsUpSql, + "1630464455_create-saved_addresses-table.down.sql": _1630464455_createSaved_addressesTableDownSql, + "1630464455_create-saved_addresses-table.up.sql": _1630464455_createSaved_addressesTableUpSql, + "1630485153_networks.down.sql": _1630485153_networksDownSql, + "1630485153_networks.up.sql": _1630485153_networksUpSql, + "1632262444_profile_pictures_show_to.up.sql": _1632262444_profile_pictures_show_toUpSql, "1635942153_add_telemetry_server_url_to_settings.up.sql": _1635942153_add_telemetry_server_url_to_settingsUpSql, - "1635942154_add_backup_setting.up.sql": _1635942154_add_backup_settingUpSql, - "1637745568_add_auto_message_setting.up.sql": _1637745568_add_auto_message_settingUpSql, - "1640111208_nodeconfig.up.sql": _1640111208_nodeconfigUpSql, - "doc.go": docGo, + "1635942154_add_backup_setting.up.sql": _1635942154_add_backup_settingUpSql, + "1637745568_add_auto_message_setting.up.sql": _1637745568_add_auto_message_settingUpSql, + "1640111208_nodeconfig.up.sql": _1640111208_nodeconfigUpSql, + "doc.go": docGo, } +// AssetDebug is true if the assets were built with the debug flag enabled. +const AssetDebug = false + // AssetDir returns the file names below a certain // directory embedded in the file by go-bindata. // For example if you run go-bindata on data/... and data contains the @@ -1318,15 +1361,15 @@ var _bindata = map[string]func() (*asset, error){ // img/ // a.png // b.png -// then AssetDir("data") would return []string{"foo.txt", "img"} -// AssetDir("data/img") would return []string{"a.png", "b.png"} -// AssetDir("foo.txt") and AssetDir("notexist") would return an error +// then AssetDir("data") would return []string{"foo.txt", "img"}, +// AssetDir("data/img") would return []string{"a.png", "b.png"}, +// AssetDir("foo.txt") and AssetDir("notexist") would return an error, and // AssetDir("") will return []string{"data"}. func AssetDir(name string) ([]string, error) { node := _bintree if len(name) != 0 { - cannonicalName := strings.Replace(name, "\\", "/", -1) - pathList := strings.Split(cannonicalName, "/") + canonicalName := strings.Replace(name, "\\", "/", -1) + pathList := strings.Split(canonicalName, "/") for _, p := range pathList { node = node.Children[p] if node == nil { @@ -1348,64 +1391,65 @@ type bintree struct { Func func() (*asset, error) Children map[string]*bintree } + var _bintree = &bintree{nil, map[string]*bintree{ - "0001_app.down.sql": &bintree{_0001_appDownSql, map[string]*bintree{}}, - "0001_app.up.sql": &bintree{_0001_appUpSql, map[string]*bintree{}}, - "0002_tokens.down.sql": &bintree{_0002_tokensDownSql, map[string]*bintree{}}, - "0002_tokens.up.sql": &bintree{_0002_tokensUpSql, map[string]*bintree{}}, - "0003_settings.down.sql": &bintree{_0003_settingsDownSql, map[string]*bintree{}}, - "0003_settings.up.sql": &bintree{_0003_settingsUpSql, map[string]*bintree{}}, - "0004_pending_stickers.down.sql": &bintree{_0004_pending_stickersDownSql, map[string]*bintree{}}, - "0004_pending_stickers.up.sql": &bintree{_0004_pending_stickersUpSql, map[string]*bintree{}}, - "0005_waku_mode.down.sql": &bintree{_0005_waku_modeDownSql, map[string]*bintree{}}, - "0005_waku_mode.up.sql": &bintree{_0005_waku_modeUpSql, map[string]*bintree{}}, - "0006_appearance.up.sql": &bintree{_0006_appearanceUpSql, map[string]*bintree{}}, - "0007_enable_waku_default.up.sql": &bintree{_0007_enable_waku_defaultUpSql, map[string]*bintree{}}, - "0008_add_push_notifications.up.sql": &bintree{_0008_add_push_notificationsUpSql, map[string]*bintree{}}, - "0009_enable_sending_push_notifications.down.sql": &bintree{_0009_enable_sending_push_notificationsDownSql, map[string]*bintree{}}, - "0009_enable_sending_push_notifications.up.sql": &bintree{_0009_enable_sending_push_notificationsUpSql, map[string]*bintree{}}, - "0010_add_block_mentions.down.sql": &bintree{_0010_add_block_mentionsDownSql, map[string]*bintree{}}, - "0010_add_block_mentions.up.sql": &bintree{_0010_add_block_mentionsUpSql, map[string]*bintree{}}, - "0011_allow_webview_permission_requests.down.sql": &bintree{_0011_allow_webview_permission_requestsDownSql, map[string]*bintree{}}, - "0011_allow_webview_permission_requests.up.sql": &bintree{_0011_allow_webview_permission_requestsUpSql, map[string]*bintree{}}, - "0012_pending_transactions.down.sql": &bintree{_0012_pending_transactionsDownSql, map[string]*bintree{}}, - "0012_pending_transactions.up.sql": &bintree{_0012_pending_transactionsUpSql, map[string]*bintree{}}, - "0013_favourites.down.sql": &bintree{_0013_favouritesDownSql, map[string]*bintree{}}, - "0013_favourites.up.sql": &bintree{_0013_favouritesUpSql, map[string]*bintree{}}, - "0014_add_use_mailservers.down.sql": &bintree{_0014_add_use_mailserversDownSql, map[string]*bintree{}}, - "0014_add_use_mailservers.up.sql": &bintree{_0014_add_use_mailserversUpSql, map[string]*bintree{}}, - "0015_link_previews.down.sql": &bintree{_0015_link_previewsDownSql, map[string]*bintree{}}, - "0015_link_previews.up.sql": &bintree{_0015_link_previewsUpSql, map[string]*bintree{}}, - "0016_local_notifications_preferences.down.sql": &bintree{_0016_local_notifications_preferencesDownSql, map[string]*bintree{}}, - "0016_local_notifications_preferences.up.sql": &bintree{_0016_local_notifications_preferencesUpSql, map[string]*bintree{}}, - "0017_bookmarks.down.sql": &bintree{_0017_bookmarksDownSql, map[string]*bintree{}}, - "0017_bookmarks.up.sql": &bintree{_0017_bookmarksUpSql, map[string]*bintree{}}, - "0018_profile_pictures_visibility.up.sql": &bintree{_0018_profile_pictures_visibilityUpSql, map[string]*bintree{}}, - "0019_blocks_ranges_extra_data.up.sql": &bintree{_0019_blocks_ranges_extra_dataUpSql, map[string]*bintree{}}, - "0020_metrics.up.sql": &bintree{_0020_metricsUpSql, map[string]*bintree{}}, - "0021_add_session_id_to_metrics.up.sql": &bintree{_0021_add_session_id_to_metricsUpSql, map[string]*bintree{}}, - "0022_pending_transfers.up.sql": &bintree{_0022_pending_transfersUpSql, map[string]*bintree{}}, - "1618237885_settings_anon_metrics_should_send.up.sql": &bintree{_1618237885_settings_anon_metrics_should_sendUpSql, map[string]*bintree{}}, - "1618395756_contacts_only.up.sql": &bintree{_1618395756_contacts_onlyUpSql, map[string]*bintree{}}, - "1622184614_add_default_sync_period.up.sql": &bintree{_1622184614_add_default_sync_periodUpSql, map[string]*bintree{}}, - "1625872445_user_status.up.sql": &bintree{_1625872445_user_statusUpSql, map[string]*bintree{}}, - "1627983977_add_gif_to_settings.up.sql": &bintree{_1627983977_add_gif_to_settingsUpSql, map[string]*bintree{}}, - "1628580203_add_hidden_account.up.sql": &bintree{_1628580203_add_hidden_accountUpSql, map[string]*bintree{}}, - "1629123384_add_id_to_app_metrics.up.sql": &bintree{_1629123384_add_id_to_app_metricsUpSql, map[string]*bintree{}}, - "1630401853_add_opensea_enabled_to_settings.up.sql": &bintree{_1630401853_add_opensea_enabled_to_settingsUpSql, map[string]*bintree{}}, - "1630464455_create-saved_addresses-table.down.sql": &bintree{_1630464455_createSaved_addressesTableDownSql, map[string]*bintree{}}, - "1630464455_create-saved_addresses-table.up.sql": &bintree{_1630464455_createSaved_addressesTableUpSql, map[string]*bintree{}}, - "1630485153_networks.down.sql": &bintree{_1630485153_networksDownSql, map[string]*bintree{}}, - "1630485153_networks.up.sql": &bintree{_1630485153_networksUpSql, map[string]*bintree{}}, - "1632262444_profile_pictures_show_to.up.sql": &bintree{_1632262444_profile_pictures_show_toUpSql, map[string]*bintree{}}, - "1635942153_add_telemetry_server_url_to_settings.up.sql": &bintree{_1635942153_add_telemetry_server_url_to_settingsUpSql, map[string]*bintree{}}, - "1635942154_add_backup_setting.up.sql": &bintree{_1635942154_add_backup_settingUpSql, map[string]*bintree{}}, - "1637745568_add_auto_message_setting.up.sql": &bintree{_1637745568_add_auto_message_settingUpSql, map[string]*bintree{}}, - "1640111208_nodeconfig.up.sql": &bintree{_1640111208_nodeconfigUpSql, map[string]*bintree{}}, - "doc.go": &bintree{docGo, map[string]*bintree{}}, + "0001_app.down.sql": {_0001_appDownSql, map[string]*bintree{}}, + "0001_app.up.sql": {_0001_appUpSql, map[string]*bintree{}}, + "0002_tokens.down.sql": {_0002_tokensDownSql, map[string]*bintree{}}, + "0002_tokens.up.sql": {_0002_tokensUpSql, map[string]*bintree{}}, + "0003_settings.down.sql": {_0003_settingsDownSql, map[string]*bintree{}}, + "0003_settings.up.sql": {_0003_settingsUpSql, map[string]*bintree{}}, + "0004_pending_stickers.down.sql": {_0004_pending_stickersDownSql, map[string]*bintree{}}, + "0004_pending_stickers.up.sql": {_0004_pending_stickersUpSql, map[string]*bintree{}}, + "0005_waku_mode.down.sql": {_0005_waku_modeDownSql, map[string]*bintree{}}, + "0005_waku_mode.up.sql": {_0005_waku_modeUpSql, map[string]*bintree{}}, + "0006_appearance.up.sql": {_0006_appearanceUpSql, map[string]*bintree{}}, + "0007_enable_waku_default.up.sql": {_0007_enable_waku_defaultUpSql, map[string]*bintree{}}, + "0008_add_push_notifications.up.sql": {_0008_add_push_notificationsUpSql, map[string]*bintree{}}, + "0009_enable_sending_push_notifications.down.sql": {_0009_enable_sending_push_notificationsDownSql, map[string]*bintree{}}, + "0009_enable_sending_push_notifications.up.sql": {_0009_enable_sending_push_notificationsUpSql, map[string]*bintree{}}, + "0010_add_block_mentions.down.sql": {_0010_add_block_mentionsDownSql, map[string]*bintree{}}, + "0010_add_block_mentions.up.sql": {_0010_add_block_mentionsUpSql, map[string]*bintree{}}, + "0011_allow_webview_permission_requests.down.sql": {_0011_allow_webview_permission_requestsDownSql, map[string]*bintree{}}, + "0011_allow_webview_permission_requests.up.sql": {_0011_allow_webview_permission_requestsUpSql, map[string]*bintree{}}, + "0012_pending_transactions.down.sql": {_0012_pending_transactionsDownSql, map[string]*bintree{}}, + "0012_pending_transactions.up.sql": {_0012_pending_transactionsUpSql, map[string]*bintree{}}, + "0013_favourites.down.sql": {_0013_favouritesDownSql, map[string]*bintree{}}, + "0013_favourites.up.sql": {_0013_favouritesUpSql, map[string]*bintree{}}, + "0014_add_use_mailservers.down.sql": {_0014_add_use_mailserversDownSql, map[string]*bintree{}}, + "0014_add_use_mailservers.up.sql": {_0014_add_use_mailserversUpSql, map[string]*bintree{}}, + "0015_link_previews.down.sql": {_0015_link_previewsDownSql, map[string]*bintree{}}, + "0015_link_previews.up.sql": {_0015_link_previewsUpSql, map[string]*bintree{}}, + "0016_local_notifications_preferences.down.sql": {_0016_local_notifications_preferencesDownSql, map[string]*bintree{}}, + "0016_local_notifications_preferences.up.sql": {_0016_local_notifications_preferencesUpSql, map[string]*bintree{}}, + "0017_bookmarks.down.sql": {_0017_bookmarksDownSql, map[string]*bintree{}}, + "0017_bookmarks.up.sql": {_0017_bookmarksUpSql, map[string]*bintree{}}, + "0018_profile_pictures_visibility.up.sql": {_0018_profile_pictures_visibilityUpSql, map[string]*bintree{}}, + "0019_blocks_ranges_extra_data.up.sql": {_0019_blocks_ranges_extra_dataUpSql, map[string]*bintree{}}, + "0020_metrics.up.sql": {_0020_metricsUpSql, map[string]*bintree{}}, + "0021_add_session_id_to_metrics.up.sql": {_0021_add_session_id_to_metricsUpSql, map[string]*bintree{}}, + "0022_pending_transfers.up.sql": {_0022_pending_transfersUpSql, map[string]*bintree{}}, + "1618237885_settings_anon_metrics_should_send.up.sql": {_1618237885_settings_anon_metrics_should_sendUpSql, map[string]*bintree{}}, + "1618395756_contacts_only.up.sql": {_1618395756_contacts_onlyUpSql, map[string]*bintree{}}, + "1622184614_add_default_sync_period.up.sql": {_1622184614_add_default_sync_periodUpSql, map[string]*bintree{}}, + "1625872445_user_status.up.sql": {_1625872445_user_statusUpSql, map[string]*bintree{}}, + "1627983977_add_gif_to_settings.up.sql": {_1627983977_add_gif_to_settingsUpSql, map[string]*bintree{}}, + "1628580203_add_hidden_account.up.sql": {_1628580203_add_hidden_accountUpSql, map[string]*bintree{}}, + "1629123384_add_id_to_app_metrics.up.sql": {_1629123384_add_id_to_app_metricsUpSql, map[string]*bintree{}}, + "1630401853_add_opensea_enabled_to_settings.up.sql": {_1630401853_add_opensea_enabled_to_settingsUpSql, map[string]*bintree{}}, + "1630464455_create-saved_addresses-table.down.sql": {_1630464455_createSaved_addressesTableDownSql, map[string]*bintree{}}, + "1630464455_create-saved_addresses-table.up.sql": {_1630464455_createSaved_addressesTableUpSql, map[string]*bintree{}}, + "1630485153_networks.down.sql": {_1630485153_networksDownSql, map[string]*bintree{}}, + "1630485153_networks.up.sql": {_1630485153_networksUpSql, map[string]*bintree{}}, + "1632262444_profile_pictures_show_to.up.sql": {_1632262444_profile_pictures_show_toUpSql, map[string]*bintree{}}, + "1635942153_add_telemetry_server_url_to_settings.up.sql": {_1635942153_add_telemetry_server_url_to_settingsUpSql, map[string]*bintree{}}, + "1635942154_add_backup_setting.up.sql": {_1635942154_add_backup_settingUpSql, map[string]*bintree{}}, + "1637745568_add_auto_message_setting.up.sql": {_1637745568_add_auto_message_settingUpSql, map[string]*bintree{}}, + "1640111208_nodeconfig.up.sql": {_1640111208_nodeconfigUpSql, map[string]*bintree{}}, + "doc.go": {docGo, map[string]*bintree{}}, }} -// RestoreAsset restores an asset under the given directory +// RestoreAsset restores an asset under the given directory. func RestoreAsset(dir, name string) error { data, err := Asset(name) if err != nil { @@ -1423,14 +1467,10 @@ func RestoreAsset(dir, name string) error { if err != nil { return err } - err = os.Chtimes(_filePath(dir, name), info.ModTime(), info.ModTime()) - if err != nil { - return err - } - return nil + return os.Chtimes(_filePath(dir, name), info.ModTime(), info.ModTime()) } -// RestoreAssets restores an asset under the given directory recursively +// RestoreAssets restores an asset under the given directory recursively. func RestoreAssets(dir, name string) error { children, err := AssetDir(name) // File @@ -1448,7 +1488,6 @@ func RestoreAssets(dir, name string) error { } func _filePath(dir, name string) string { - cannonicalName := strings.Replace(name, "\\", "/", -1) - return filepath.Join(append([]string{dir}, strings.Split(cannonicalName, "/")...)...) + canonicalName := strings.Replace(name, "\\", "/", -1) + return filepath.Join(append([]string{dir}, strings.Split(canonicalName, "/")...)...) } - diff --git a/services/permissions/api.go b/services/permissions/api.go index f0d699f14..443632eb0 100644 --- a/services/permissions/api.go +++ b/services/permissions/api.go @@ -22,5 +22,9 @@ func (api *API) GetDappPermissions(ctx context.Context) ([]DappPermissions, erro } func (api *API) DeleteDappPermissions(ctx context.Context, name string) error { - return api.db.DeletePermission(name) + return api.db.DeletePermission(name, "") +} + +func (api *API) DeleteDappPermissionsByNameAndAddress(ctx context.Context, name string, address string) error { + return api.db.DeletePermission(name, address) } diff --git a/services/permissions/api_test.go b/services/permissions/api_test.go index f7441d6ed..a1d7c5e49 100644 --- a/services/permissions/api_test.go +++ b/services/permissions/api_test.go @@ -56,7 +56,8 @@ func TestDappPermissionsStored(t *testing.T) { sort.Slice(rst, func(i, j int) bool { return rst[i].Name < rst[j].Name }) - require.Equal(t, expected, rst) + require.Equal(t, expected[0].Name, rst[0].Name) + require.Equal(t, expected[0].Permissions, rst[0].Permissions) data, err := json.Marshal(rst) require.NoError(t, err) @@ -77,7 +78,9 @@ func TestDappPermissionsReplacedOnUpdated(t *testing.T) { rst, err := api.GetDappPermissions(context.TODO()) require.NoError(t, err) require.Len(t, rst, 1) - require.Equal(t, perms, rst[0]) + require.Equal(t, perms.Name, rst[0].Name) + require.Equal(t, perms.Permissions, rst[0].Permissions) + } func TestDappPermissionsDeleted(t *testing.T) { diff --git a/services/permissions/database.go b/services/permissions/database.go index 3f5dd62fa..767975cbe 100644 --- a/services/permissions/database.go +++ b/services/permissions/database.go @@ -19,8 +19,10 @@ func NewDB(db *sql.DB) *Database { } type DappPermissions struct { + ID int Name string `json:"dapp"` Permissions []string `json:"permissions,omitempty"` + Address string `json:"address,omitempty"` } func (db *Database) AddPermissions(perms DappPermissions) (err error) { @@ -35,13 +37,41 @@ func (db *Database) AddPermissions(perms DappPermissions) (err error) { } _ = tx.Rollback() }() - - dInsert, err := tx.Prepare("INSERT OR REPLACE INTO dapps(name) VALUES(?)") + dRows, err := tx.Query("SELECT id FROM dapps where name = ? AND address = ?", perms.Name, perms.Address) if err != nil { return } - _, err = dInsert.Exec(perms.Name) - dInsert.Close() + defer dRows.Close() + + var id int64 + if dRows.Next() { + err = dRows.Scan(&id) + if err != nil { + return + } + } else { + dInsert, err := tx.Prepare("INSERT INTO dapps(name, address) VALUES(?, ?)") + if err != nil { + return err + } + res, err := dInsert.Exec(perms.Name, perms.Address) + dInsert.Close() + if err != nil { + return err + } + + id, err = res.LastInsertId() + if err != nil { + return err + } + } + + pDelete, err := tx.Prepare("DELETE FROM permissions WHERE dapp_id = ?") + if err != nil { + return + } + defer pDelete.Close() + _, err = pDelete.Exec(id) if err != nil { return } @@ -49,13 +79,14 @@ func (db *Database) AddPermissions(perms DappPermissions) (err error) { if len(perms.Permissions) == 0 { return } - pInsert, err := tx.Prepare("INSERT INTO permissions(dapp_name, permission) VALUES(?, ?)") + + pInsert, err := tx.Prepare("INSERT INTO permissions(dapp_id, permission) VALUES(?, ?)") if err != nil { return } defer pInsert.Close() for _, perm := range perms.Permissions { - _, err = pInsert.Exec(perms.Name, perm) + _, err = pInsert.Exec(id, perm) if err != nil { return } @@ -77,36 +108,36 @@ func (db *Database) GetPermissions() (rst []DappPermissions, err error) { }() // FULL and RIGHT joins are not supported - dRows, err := tx.Query("SELECT name FROM dapps") + dRows, err := tx.Query("SELECT id, name, address FROM dapps") if err != nil { return } defer dRows.Close() - dapps := map[string]*DappPermissions{} + dapps := map[int]*DappPermissions{} for dRows.Next() { perms := DappPermissions{} - err = dRows.Scan(&perms.Name) + err = dRows.Scan(&perms.ID, &perms.Name, &perms.Address) if err != nil { return nil, err } - dapps[perms.Name] = &perms + dapps[perms.ID] = &perms } - pRows, err := tx.Query("SELECT dapp_name, permission from permissions") + pRows, err := tx.Query("SELECT dapp_id, permission from permissions") if err != nil { return } defer pRows.Close() var ( - name string + id int permission string ) for pRows.Next() { - err = pRows.Scan(&name, &permission) + err = pRows.Scan(&id, &permission) if err != nil { return } - dapps[name].Permissions = append(dapps[name].Permissions, permission) + dapps[id].Permissions = append(dapps[id].Permissions, permission) } rst = make([]DappPermissions, 0, len(dapps)) for key := range dapps { @@ -116,55 +147,22 @@ func (db *Database) GetPermissions() (rst []DappPermissions, err error) { return rst, nil } -func (db *Database) GetPermissionsByDappName(dappName string) (rst *DappPermissions, err error) { - tx, err := db.db.Begin() +func (db *Database) DeletePermission(name string, address string) error { + _, err := db.db.Exec("DELETE FROM dapps WHERE name = ? AND address = ?", name, address) + return err +} + +func (db *Database) HasPermission(dappName string, address string, permission string) (bool, error) { + var id int64 + err := db.db.QueryRow("SELECT id FROM dapps where name = ? AND address = ?", dappName, address).Scan(&id) if err != nil { - return - } - defer func() { - if err == nil { - err = tx.Commit() - return - } - _ = tx.Rollback() - }() - - rst = &DappPermissions{ - Name: dappName, + return false, nil } - pRows, err := tx.Query("SELECT permission from permissions WHERE dapp_name = ?", dappName) - if err == sql.ErrNoRows { - return nil, nil - } else if err != nil { - return nil, err - } - defer pRows.Close() - - var permission string - for pRows.Next() { - err = pRows.Scan(&permission) - if err != nil { - return - } - rst.Permissions = append(rst.Permissions, permission) - } - - return rst, nil -} - -func (db *Database) DeletePermission(name string) error { - _, err := db.db.Exec("DELETE FROM dapps WHERE name = ?", name) - return err -} - -func (db *Database) DeleteDappPermission(dappName, permission string) error { - _, err := db.db.Exec("DELETE FROM permissions WHERE dapp_name = ? AND permission = ?", dappName, permission) - return err -} - -func (db *Database) HasPermission(dappName string, permission string) (bool, error) { var count uint64 - err := db.db.QueryRow(`SELECT COUNT(1) FROM permissions WHERE dapp_name = ? AND permission = ?`, dappName, permission).Scan(&count) + err = db.db.QueryRow( + `SELECT COUNT(1) FROM permissions WHERE dapp_id = ? AND permission = ?`, + id, permission, + ).Scan(&count) return count > 0, err } diff --git a/services/web3provider/api.go b/services/web3provider/api.go index 89ed8792f..6dca30c45 100644 --- a/services/web3provider/api.go +++ b/services/web3provider/api.go @@ -83,6 +83,7 @@ type Web3SendAsyncReadOnlyRequest struct { MessageID interface{} `json:"messageId"` Payload ETHPayload `json:"payload"` Hostname string `json:"hostname"` + Address string `json:"address,omitempty"` } type Web3SendAsyncReadOnlyError struct { @@ -100,6 +101,7 @@ type Web3SendAsyncReadOnlyResponse struct { type APIRequest struct { MessageID interface{} `json:"messageId,omitempty"` + Address string `json:"address,omitempty"` Hostname string `json:"hostname"` Permission string `json:"permission"` } @@ -300,7 +302,7 @@ func (api *API) web3SignatureResponse(request Web3SendAsyncReadOnlyRequest) (*We } func (api *API) ProcessWeb3ReadOnlyRequest(request Web3SendAsyncReadOnlyRequest) (*Web3SendAsyncReadOnlyResponse, error) { - hasPermission, err := api.s.permissionsDB.HasPermission(request.Hostname, PermissionWeb3) + hasPermission, err := api.s.permissionsDB.HasPermission(request.Hostname, request.Address, PermissionWeb3) if err != nil { return nil, err } @@ -356,8 +358,7 @@ func (api *API) ProcessAPIRequest(request APIRequest) (*APIResponse, error) { if request.Permission == "" { return nil, ErrorInvalidAPIRequest } - - hasPermission, err := api.s.permissionsDB.HasPermission(request.Hostname, request.Permission) + hasPermission, err := api.s.permissionsDB.HasPermission(request.Hostname, request.Address, request.Permission) if err != nil { return nil, err } @@ -373,7 +374,6 @@ func (api *API) ProcessAPIRequest(request APIRequest) (*APIResponse, error) { IsAllowed: false, }, nil } - var data interface{} switch request.Permission { case PermissionWeb3: @@ -393,7 +393,6 @@ func (api *API) ProcessAPIRequest(request APIRequest) (*APIResponse, error) { default: return nil, ErrorUnknownPermission } - return &APIResponse{ ProviderResponse: ProviderResponse{ ResponseType: ResponseAPI,