fix bots tbale constraint

This commit is contained in:
divyam234 2024-01-20 15:45:16 +05:30
parent f75d12d31f
commit 0505fc6ac6
3 changed files with 8 additions and 2 deletions

View file

@ -200,7 +200,7 @@ func uploadCleanJob(logger *zap.Logger) {
func folderSizeUpdate(logger *zap.Logger) {
database.DB.Exec("call teldrive.update_size();")
logger.Info("updates folder sizes")
logger.Info("updated folder sizes")
}

View file

@ -0,0 +1,6 @@
-- +goose Up
-- +goose StatementBegin
ALTER TABLE teldrive.bots DROP CONSTRAINT IF EXISTS btoken_user_un;
ALTER TABLE teldrive.bots DROP CONSTRAINT IF EXISTS btoken_user_channel_un;
ALTER TABLE teldrive.bots ADD CONSTRAINT btoken_user_channel_un UNIQUE (user_id,token,channel_id);
-- +goose StatementEnd

@ -1 +1 @@
Subproject commit 1ae405f113ebe394390e9611fb774636aab7e501
Subproject commit ba0336510bf348ba0b95722e1b620de5fb296a38