diff --git a/pkg/connector/store/upgrades/00-latest.sql b/pkg/connector/store/upgrades/00-latest.sql index 27579f2e..1c2ed722 100644 --- a/pkg/connector/store/upgrades/00-latest.sql +++ b/pkg/connector/store/upgrades/00-latest.sql @@ -1,4 +1,4 @@ --- v0 -> v4 (compatible with v2+): Latest revision +-- v0 -> v5 (compatible with v2+): Latest revision CREATE TABLE telegram_user_state ( user_id BIGINT NOT NULL PRIMARY KEY, @@ -16,8 +16,6 @@ CREATE TABLE telegram_channel_state ( PRIMARY KEY (user_id, channel_id) ); -CREATE INDEX telegram_channel_state_user_id_idx ON telegram_channel_state (user_id); - CREATE TABLE telegram_access_hash ( user_id BIGINT NOT NULL, entity_type TEXT NOT NULL, diff --git a/pkg/connector/store/upgrades/05-remove-redundant-index.sql b/pkg/connector/store/upgrades/05-remove-redundant-index.sql new file mode 100644 index 00000000..2cc01d91 --- /dev/null +++ b/pkg/connector/store/upgrades/05-remove-redundant-index.sql @@ -0,0 +1,2 @@ +-- v5 (compatible with v2+): Remove redundant index on telegram_channel_state +DROP INDEX telegram_channel_state_user_id_idx;