feat(indexers): new IRC auth mechanism for RocketHD (#2085)

* chore(indexers): new IRC auth mechanism for RocketHD

* linting

* chore(indexers): remove NickServ fields from settings

* chore(indexers): database migrations

* chore(indexers): only do irc_channel migrations when password is not NULL

* feat(indexers): only bump schema once

* feat(indexers): add migrations for postgres
This commit is contained in:
martylukyy 2025-06-10 19:50:19 +02:00 committed by GitHub
parent 38b09ea4d5
commit a8b4ca69a2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 38 additions and 16 deletions

View file

@ -1356,5 +1356,22 @@ CREATE INDEX release_hybrid_index
`
ALTER TABLE list
ADD COLUMN skip_clean_sanitize BOOLEAN DEFAULT FALSE;
`,
`UPDATE irc_network
SET
auth_mechanism = 'NONE',
auth_account = '',
auth_password = ''
WHERE server = 'irc.rocket-hd.cc'
AND auth_mechanism != 'NONE';
UPDATE irc_channel
SET password = NULL
WHERE password IS NOT NULL
AND network_id IN (
SELECT id
FROM irc_network
WHERE server = 'irc.rocket-hd.cc'
);
`,
}

View file

@ -2001,5 +2001,22 @@ CREATE INDEX release_hybrid_index
`
ALTER TABLE list
ADD COLUMN skip_clean_sanitize BOOLEAN DEFAULT FALSE;
`,
`UPDATE irc_network
SET
auth_mechanism = 'NONE',
auth_account = '',
auth_password = ''
WHERE server = 'irc.rocket-hd.cc'
AND auth_mechanism != 'NONE';
UPDATE irc_channel
SET password = NULL
WHERE password IS NOT NULL
AND network_id IN (
SELECT id
FROM irc_network
WHERE server = 'irc.rocket-hd.cc'
);
`,
}

View file

@ -17,7 +17,7 @@ settings:
type: secret
required: true
label: RSS key (RID)
help: "Go to My Settings > RSS Key, and copy your RSS Key"
help: "Your profile > Settings > RSS Key"
irc:
network: RocketNET
@ -35,23 +35,11 @@ irc:
label: Nick
help: Bot nick. Eg. user-bot
- name: auth.account
type: text
required: true
label: NickServ Account
help: NickServ account. Make sure to group your user and bot.
- name: auth.password
- name: pass
type: secret
required: true
label: NickServ Password
help: NickServ password
- name: channels.password
type: secret
required: true
label: Channel Password
help: Channel password
label: Network password
help: Your profile > Settings > IRC Key
parse:
type: single