Fix bug in migration script

This commit is contained in:
Mike Schwörer 2023-06-18 00:24:53 +02:00
parent b71f1885ec
commit bbc9a79996
Signed by: Mikescher
GPG Key ID: D3C7172E0A70F8CF

View File

@ -306,8 +306,8 @@ func migrateUser(ctx context.Context, dbnew sq.DB, dbold sq.DB, user OldUser, ap
_, err = dbnew.Exec(ctx, "INSERT INTO subscriptions (subscription_id, subscriber_user_id, channel_owner_user_id, channel_internal_name, channel_id, timestamp_created, confirmed) VALUES (:sid, :suid, :ouid, :cnam, :cid, :ts, :conf)", sq.PP{ _, err = dbnew.Exec(ctx, "INSERT INTO subscriptions (subscription_id, subscriber_user_id, channel_owner_user_id, channel_internal_name, channel_id, timestamp_created, confirmed) VALUES (:sid, :suid, :ouid, :cnam, :cid, :ts, :conf)", sq.PP{
"sid": models.NewSubscriptionID(), "sid": models.NewSubscriptionID(),
"suid": user.UserId, "suid": userid,
"ouid": user.UserId, "ouid": userid,
"cnam": "main", "cnam": "main",
"cid": mainChannelID, "cid": mainChannelID,
"ts": user.TimestampCreated.UnixMilli(), "ts": user.TimestampCreated.UnixMilli(),