mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
fix: data conflict handler
This commit is contained in:
@ -44,9 +44,10 @@ func (d *DB) UpsertMigrationHistory(ctx context.Context, upsert *store.UpsertMig
|
||||
qb := squirrel.Insert("migration_history").
|
||||
Columns("version").
|
||||
Values(upsert.Version).
|
||||
Suffix("ON CONFLICT (version) DO UPDATE SET version = ?", upsert.Version)
|
||||
Suffix("ON CONFLICT (version) DO NOTHING").
|
||||
PlaceholderFormat(squirrel.Dollar)
|
||||
|
||||
query, args, err := qb.PlaceholderFormat(squirrel.Dollar).ToSql()
|
||||
query, args, err := qb.ToSql()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
Reference in New Issue
Block a user