This repository was archived by the owner on Apr 26, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed
synapse/storage/schema/main/delta/61 Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change
1
+ Switch `application_services_txns.txn_id` database column to `BIGINT`.
Original file line number Diff line number Diff line change
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;
You can’t perform that action at this time.
0 commit comments