mirror of
https://codeberg.org/superseriousbusiness/gotosocial.git
synced 2024-12-21 08:31:53 +03:00
07727753b9
* Add whereNotEmptyAndNotNull * Add GetRemoteOlderThanDays * Add GetRemoteOlderThanDays * Add PruneRemote to Manager interface * Start implementing PruneRemote * add new attachment + status to tests * fix up and test GetRemoteOlderThan * fix bad import * PruneRemote: return number pruned * add Cached column to mediaattachment * update + test pruneRemote * update mediaTest * use Cached column * upstep bun to latest version * embed structs in mediaAttachment * migrate mediaAttachment to new format * don't default cached to true * select only remote media * update db dependencies * step bun back to last working version * update pruneRemote to use Cached field * fix storage path of test attachments * add recache logic to manager * fix trimmed aspect ratio * test prune and recache * return errwithcode * tidy up different paths for emoji vs attachment * fix incorrect thumbnail type being stored * expose TransportController to media processor * implement tee-ing recached content * add thoughts of dog to test fedi attachments * test get remote files * add comment on PruneRemote * add postData cleanup to recache * test thumbnail fetching * add incredible diagram * go mod tidy * buffer pipes for recache streaming * test for client stops reading after 1kb * add media-remote-cache-days to config * add cron package * wrap logrus so it's available to cron * start and stop cron jobs gracefully
14 KiB
14 KiB
1.0.20 (2021-12-19)
Bug Fixes
- add Event.QueryTemplate and change Event.Query to be always formatted (52b1ccd)
- change GetTableName to return formatted table name in case ModelTableExpr (95144dd)
- change ScanAndCount to work with transactions (5b3f2c0)
- dbfixture: directly call funcs bypassing template eval (a61974b)
- don't append CASCADE by default in drop table/column queries (26457ea)
- migrate: mark migrations as applied on error so the migration can be rolled back (8ce33fb)
- respect nullzero when appending struct fields. Fixes #339 (ffd02f3)
- reuse tx for relation join (#366) (60bdb1a)
Features
- add
Dialect()
to Transaction and IDB interface (693f1e1) - add model embedding via embed:prefix_ (9a2cedc)
- change the default logoutput to stderr (4bf5773), closes #349
1.0.19 (2021-11-30)
Features
- add support for column:name to specify column name (e37b460)
1.0.18 (2021-11-24)
Bug Fixes
- use correct operation for UpdateQuery (687a004)
Features
- add pgdriver.Notify (7ee443d)
- CreateTableQuery.PartitionBy and CreateTableQuery.TableSpace (cd3ab4d)
- pgdriver: add CopyFrom and CopyTo (0b97703)
- support InsertQuery.Ignore on PostgreSQL (1aa9d14)
1.0.17 (2021-11-11)
Bug Fixes
- don't call rollback when tx is already done (8246c2a)
- mysql: escape backslash char in strings (fb32029)
1.0.16 (2021-11-07)
Bug Fixes
- call query hook when tx is started, committed, or rolled back (30e85b5)
- pgdialect: auto-enable array support if the sql type is an array (62c1012)
Features
- support multiple tag options join:left_col1=right_col1,join:left_col2=right_col2 (78cd5aa)
- tag: log with bad tag name (4e82d75)
1.0.15 (2021-10-29)
Bug Fixes
Features
1.0.14 (2021-10-24)
Bug Fixes
- correct binary serialization for mysql (#259) (e899f50)
- correctly escape single quotes in pg arrays (3010847)
- use BLOB sql type to encode []byte in MySQL and SQLite (725ec88)
Features
- warn when there are args but no placeholders (06dde21)
1.0.13 (2021-10-17)
Breaking Change
- pgdriver: enable TLS by default with InsecureSkipVerify=true (15ec635)
Features
1.0.12 (2021-10-14)
Bug Fixes
- add InsertQuery.ColumnExpr to specify columns (60ffe29)
- bundebug: change WithVerbose to accept a bool flag (b2f8b91)
- pgdialect: fix bytea[] handling (a5ca013)
- pgdriver: rename DriverOption to Option (51c1702)
- support allowzero on the soft delete field (d0abec7)
Features
- bundebug: allow to configure the hook using env var, for example, BUNDEBUG={0,1,2} (ce92852)
- bunotel: report DBStats metrics (b9b1575)
- pgdriver: add Error.StatementTimeout (8a7934d)
- pgdriver: allow setting Network in config (b24b5d8)
1.0.11 (2021-10-05)
Bug Fixes
- mysqldialect: remove duplicate AppendTime (8d42090)
1.0.10 (2021-10-05)
Bug Fixes
- add UpdateQuery.OmitZero (2294db6)
- make ExcludeColumn work with many-to-many queries (300e12b)
- mysqldialect: append time in local timezone (e763cc8)
- tagparser: improve parsing options with brackets (0daa61e)
Features
- add timetz parsing (6e415c4)
1.0.9 (2021-09-27)
Bug Fixes
- change DBStats to use uint32 instead of uint64 to make it work on i386 (caca2a7)
Features
- add IQuery and QueryEvent.IQuery (b762942)
- add QueryEvent.Model (7688201)
- bunotel: add experimental bun.query.timing metric (2cdb384)
- pgdriver: add Config.ConnParams to session config params (408caf0)
- pgdriver: allow specifying timeout in DSN (7dbc71b)
1.0.8 (2021-09-18)
Bug Fixes
- don't append soft delete where for insert queries with on conflict clause (27c477c)
- improve bun.NullTime to accept string (73ad6f5)
- make allowzero work with auto-detected primary keys (82ca87c)
- support soft deletes on nil model (0556e3c)
1.0.7 (2021-09-15)
Bug Fixes
- don't append zero time as NULL without nullzero tag (3b8d9cb)
- pgdriver: return PostgreSQL DATE as a string (40be0e8)
- specify table alias for soft delete where (5fff1dc)
Features
- add SelectQuery.Exists helper (c3e59c1)
1.0.6 (2021-09-11)
Bug Fixes
- change unique tag to create a separate unique constraint (8401615)
- improve zero checker for ptr values (2b3623d)
v1.0.5 - Sep 09 2021
- chore: tweak bundebug colors
- fix: check if table is present when appending columns
- fix: copy []byte when scanning
v1.0.4 - Sep 08 2021
- Added support for MariaDB.
- Restored default
SET
forON CONFLICT DO UPDATE
queries.
v1.0.3 - Sep 06 2021
- Fixed bulk soft deletes.
- pgdialect: fixed scanning into an array pointer.
v1.0.2 - Sep 04 2021
- Changed to completely ignore fields marked with
bun:"-"
. If you want to be able to scan into such columns, usebun:",scanonly"
. - pgdriver: fixed SASL authentication handling.
v1.0.1 - Sep 02 2021
- pgdriver: added erroneous zero writes retry.
- Improved column handling in Relation callback.
v1.0.0 - Sep 01 2021
- First stable release.
v0.4.1 - Aug 18 2021
- Fixed migrate package to properly rollback migrations.
- Added
allowzero
tag option that undoesnullzero
option.
v0.4.0 - Aug 11 2021
- Changed
WhereGroup
function to accept*SelectQuery
. - Fixed query hooks for count queries.
v0.3.4 - Jul 19 2021
- Renamed
migrate.CreateGo
toCreateGoMigration
. - Added
migrate.WithPackageName
to customize the Go package name in generated migrations. - Renamed
migrate.CreateSQL
toCreateSQLMigrations
and changedCreateSQLMigrations
to create both up and down migration files.
v0.3.1 - Jul 12 2021
- Renamed
alias
field struct tag toalt
so it is not confused with column alias. - Reworked migrate package API. See migrate example for details.
v0.3.0 - Jul 09 2021
- Changed migrate package to return structured data instead of logging the progress. See migrate example for details.
v0.2.14 - Jul 01 2021
- Added sqliteshim by Ivan Trubach.
- Added support for MySQL 5.7 in addition to MySQL 8.
v0.2.12 - Jun 29 2021
- Fixed scanners for net.IP and net.IPNet.
v0.2.10 - Jun 29 2021
- Fixed pgdriver to format passed query args.
v0.2.9 - Jun 27 2021
- Added support for prepared statements in pgdriver.
v0.2.7 - Jun 26 2021
-
Added
UpdateQuery.Bulk
helper to generate bulk-update queries.Before:
models := []Model{ {42, "hello"}, {43, "world"}, } return db.NewUpdate(). With("_data", db.NewValues(&models)). Model(&models). Table("_data"). Set("model.str = _data.str"). Where("model.id = _data.id")
Now:
db.NewUpdate(). Model(&models). Bulk()
v0.2.5 - Jun 25 2021
- Changed time.Time to always append zero time as
NULL
. - Added
db.RunInTx
helper.
v0.2.4 - Jun 21 2021
- Added SSL support to pgdriver.
v0.2.3 - Jun 20 2021
- Replaced
ForceDelete(ctx)
withForceDelete().Exec(ctx)
for soft deletes.
v0.2.1 - Jun 17 2021
- Renamed
DBI
toIConn
.IConn
is a common interface for*sql.DB
,*sql.Conn
, and*sql.Tx
. - Added
IDB
.IDB
is a common interface for*bun.DB
,bun.Conn
, andbun.Tx
.
v0.2.0 - Jun 16 2021
- Changed model hooks. See model-hooks example.
- Renamed
has-one
tobelongs-to
. Renamedbelongs-to
tohas-one
. Previously Bun used incorrect names for these relations.