Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 751372f

Browse files
authored
Switch application_services_txns.txn_id to BIGINT (#10349)
1 parent 251cfc4 commit 751372f

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

changelog.d/10349.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Switch `application_services_txns.txn_id` database column to `BIGINT`.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/* Copyright 2021 The Matrix.org Foundation C.I.C
2+
*
3+
* Licensed under the Apache License, Version 2.0 (the "License");
4+
* you may not use this file except in compliance with the License.
5+
* You may obtain a copy of the License at
6+
*
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* Unless required by applicable law or agreed to in writing, software
10+
* distributed under the License is distributed on an "AS IS" BASIS,
11+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
* See the License for the specific language governing permissions and
13+
* limitations under the License.
14+
*/
15+
16+
-- we use bigint elsewhere in the database for appservice txn ids (notably,
17+
-- application_services_state.last_txn), and generally we use bigints everywhere else
18+
-- we have monotonic counters, so let's bring this one in line.
19+
--
20+
-- assuming there aren't thousands of rows for decommisioned/non-functional ASes, this
21+
-- table should be pretty small, so safe to do a synchronous ALTER TABLE.
22+
23+
ALTER TABLE application_services_txns ALTER COLUMN txn_id SET DATA TYPE BIGINT;

0 commit comments

Comments
 (0)