Set synced_to/from to 24 hours ago

This commit is contained in:
Andrea Maria Piana 2021-05-31 14:42:38 +02:00
parent 3a61c3bae9
commit 319461e9b7
3 changed files with 28 additions and 3 deletions

View file

@ -883,7 +883,7 @@ 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(0644), modTime: time.Unix(1622442755, 0)}
info := bindataFileInfo{name: "1622184614_add_default_sync_period.up.sql", size: 125, mode: os.FileMode(0644), modTime: time.Unix(1622464937, 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
}

View file

@ -33,6 +33,7 @@
// 1621933219_add_mentioned.up.sql (70B)
// 1622010048_add_unviewed_mentions_count.up.sql (114B)
// 1622061278_add_message_activity_center_notification_field.up.sql (80B)
// 1622464518_set_synced_to_from.up.sql (105B)
// README.md (554B)
// doc.go (850B)
@ -763,6 +764,26 @@ func _1622061278_add_message_activity_center_notification_fieldUpSql() (*asset,
return a, nil
}
var __1622464518_set_synced_to_fromUpSql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x0a\x0d\x70\x71\x0c\x71\x55\x48\xce\x48\x2c\x29\x56\x08\x76\x0d\x51\x28\xae\xcc\x4b\x4e\x4d\x89\x2f\xc9\x57\xb0\x55\x28\x2e\x29\x4a\x2b\xc9\xcc\x4d\xd5\x50\x57\x2d\x56\xd7\x51\x50\xcf\xcb\x2f\x57\xd7\x54\xd0\x55\xb0\x30\x33\x31\x30\xd0\x81\x29\x4d\x2b\xca\xcf\x25\xa4\xd8\x9a\x0b\x10\x00\x00\xff\xff\x55\xfe\xb4\x0a\x69\x00\x00\x00")
func _1622464518_set_synced_to_fromUpSqlBytes() ([]byte, error) {
return bindataRead(
__1622464518_set_synced_to_fromUpSql,
"1622464518_set_synced_to_from.up.sql",
)
}
func _1622464518_set_synced_to_fromUpSql() (*asset, error) {
bytes, err := _1622464518_set_synced_to_fromUpSqlBytes()
if err != nil {
return nil, err
}
info := bindataFileInfo{name: "1622464518_set_synced_to_from.up.sql", size: 105, mode: os.FileMode(0644), modTime: time.Unix(1622464910, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x33, 0x3e, 0x2b, 0xa, 0x1e, 0xc7, 0x6d, 0x6f, 0xd1, 0x1d, 0xe8, 0x4b, 0xdd, 0x92, 0x76, 0xea, 0xf2, 0x3e, 0x15, 0x85, 0xc4, 0xc3, 0x31, 0xf1, 0xc0, 0xa2, 0xd7, 0x47, 0xde, 0x4e, 0xfd, 0xc6}}
return a, nil
}
var _readmeMd = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x54\x91\xc1\xce\xd3\x30\x10\x84\xef\x7e\x8a\x91\x7a\x01\xa9\x2a\x8f\xc0\x0d\x71\x82\x03\x48\x1c\xc9\x36\x9e\x36\x96\x1c\x6f\xf0\xae\x93\xe6\xed\x91\xa3\xc2\xdf\xff\x66\xed\xd8\x33\xdf\x78\x4f\xa7\x13\xbe\xea\x06\x57\x6c\x35\x39\x31\xa7\x7b\x15\x4f\x5a\xec\x73\x08\xbf\x08\x2d\x79\x7f\x4a\x43\x5b\x86\x17\xfd\x8c\x21\xea\x56\x5e\x47\x90\x4a\x14\x75\x48\xde\x64\x37\x2c\x6a\x96\xae\x99\x48\x05\xf6\x27\x77\x13\xad\x08\xae\x8a\x51\xe7\x25\xf3\xf1\xa9\x9f\xf9\x58\x58\x2c\xad\xbc\xe0\x8b\x56\xf0\x21\x5d\xeb\x4c\x95\xb3\xae\x84\x60\xd4\xdc\xe6\x82\x5d\x1b\x36\x6d\x39\x62\x92\xf5\xb8\x11\xdb\x92\xd3\x28\xce\xe0\x13\xe1\x72\xcd\x3c\x63\xd4\x65\x87\xae\xac\xe8\xc3\x28\x2e\x67\x44\x66\x3a\x21\x25\xa2\x72\xac\x14\x67\xbc\x84\x9f\x53\x32\x8c\x52\x70\x25\x56\xd6\xfd\x8d\x05\x37\xad\x30\x9d\x9f\xa6\x86\x0f\xcd\x58\x7f\xcf\x34\x93\x3b\xed\x90\x9f\xa4\x1f\xcf\x30\x85\x4d\x07\x58\xaf\x7f\x25\xc4\x9d\xf3\x72\x64\x84\xd0\x7f\xf9\x9b\x3a\x2d\x84\xef\x85\x48\x66\x8d\xd8\x88\x9b\x8c\x8c\x98\x5b\xf6\x74\x14\x4e\x33\x0d\xc9\xe0\x93\x38\xda\x12\xc5\x69\xbd\xe4\xf0\x2e\x7a\x78\x07\x1c\xfe\x13\x9f\x91\x29\x31\x95\x7b\x7f\x62\x59\x37\xb4\xe5\x5e\x25\xfe\x33\xee\xd5\x53\x71\xd6\xda\x3a\xd8\xcb\xde\x2e\xf8\xa1\x90\x55\x53\x0c\xc7\xaa\x0d\xe9\x76\x14\x29\x1c\x7b\x68\xdd\x2f\xe1\x6f\x00\x00\x00\xff\xff\x3c\x0a\xc2\xfe\x2a\x02\x00\x00")
func readmeMdBytes() ([]byte, error) {
@ -960,6 +981,8 @@ var _bindata = map[string]func() (*asset, error){
"1622061278_add_message_activity_center_notification_field.up.sql": _1622061278_add_message_activity_center_notification_fieldUpSql,
"1622464518_set_synced_to_from.up.sql": _1622464518_set_synced_to_fromUpSql,
"README.md": readmeMd,
"doc.go": docGo,
@ -1039,8 +1062,9 @@ var _bintree = &bintree{nil, map[string]*bintree{
"1621933219_add_mentioned.up.sql": &bintree{_1621933219_add_mentionedUpSql, map[string]*bintree{}},
"1622010048_add_unviewed_mentions_count.up.sql": &bintree{_1622010048_add_unviewed_mentions_countUpSql, map[string]*bintree{}},
"1622061278_add_message_activity_center_notification_field.up.sql": &bintree{_1622061278_add_message_activity_center_notification_fieldUpSql, map[string]*bintree{}},
"README.md": &bintree{readmeMd, map[string]*bintree{}},
"doc.go": &bintree{docGo, map[string]*bintree{}},
"1622464518_set_synced_to_from.up.sql": &bintree{_1622464518_set_synced_to_fromUpSql, map[string]*bintree{}},
"README.md": &bintree{readmeMd, map[string]*bintree{}},
"doc.go": &bintree{docGo, map[string]*bintree{}},
}}
// RestoreAsset restores an asset under the given directory.

View file

@ -0,0 +1 @@
UPDATE chats SET synced_to = strftime('%s', 'now') - 86400, synced_from = strftime('%s', 'now') - 86400;