feat: remove foreign key and triggers (#345)

This commit is contained in:
boojack
2022-10-26 23:00:09 +08:00
committed by GitHub
parent 4e00b1b0cd
commit 9705406b82
12 changed files with 161 additions and 207 deletions

View File

@@ -230,6 +230,9 @@ func createUser(ctx context.Context, tx *sql.Tx, create *api.UserCreate) (*userR
func patchUser(ctx context.Context, tx *sql.Tx, patch *api.UserPatch) (*userRaw, error) {
set, args := []string{}, []interface{}{}
if v := patch.UpdatedTs; v != nil {
set, args = append(set, "updated_ts = ?"), append(args, *v)
}
if v := patch.RowStatus; v != nil {
set, args = append(set, "row_status = ?"), append(args, *v)
}