Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--internal/praefect/datastore/migrations/20220214202822_replication_queue_state_lock_id_indices.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/internal/praefect/datastore/migrations/20220214202822_replication_queue_state_lock_id_indices.go b/internal/praefect/datastore/migrations/20220214202822_replication_queue_state_lock_id_indices.go
new file mode 100644
index 000000000..549db4dff
--- /dev/null
+++ b/internal/praefect/datastore/migrations/20220214202822_replication_queue_state_lock_id_indices.go
@@ -0,0 +1,20 @@
+package migrations
+
+import migrate "github.com/rubenv/sql-migrate"
+
+func init() {
+ m := &migrate.Migration{
+ Id: "20220214202822_replication_queue_state_lock_id_indices",
+ Up: []string{
+ "CREATE INDEX CONCURRENTLY replication_queue_lock_id ON replication_queue (lock_id)",
+ "CREATE INDEX CONCURRENTLY replication_queue_state ON replication_queue (state)",
+ },
+ DisableTransactionUp: true,
+ Down: []string{
+ "DROP INDEX replication_queue_state",
+ "DROP INDEX replication_queue_lock_id",
+ },
+ }
+
+ allMigrations = append(allMigrations, m)
+}