Skip to content

Commit

Permalink
Add activeIn and userId indexes to the DonationKeys table
Browse files Browse the repository at this point in the history
  • Loading branch information
MrPowerGamerBR committed Oct 4, 2023
1 parent 44d1fde commit 729b940
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class Pudding(
private val DRIVER_CLASS_NAME = "org.postgresql.Driver"
private val ISOLATION_LEVEL =
IsolationLevel.TRANSACTION_REPEATABLE_READ // We use repeatable read to avoid dirty and non-repeatable reads! Very useful and safe!!
private const val SCHEMA_VERSION = 5 // Bump this every time any table is added/updated!
private const val SCHEMA_VERSION = 6 // Bump this every time any table is added/updated!
private val SCHEMA_ID = UUID.fromString("600556aa-2920-41c7-b26c-7717eff2d392") // This is a random unique ID, it is used for upserting the schema version

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import net.perfectdreams.loritta.cinnamon.pudding.tables.servers.ServerConfigs
import org.jetbrains.exposed.dao.id.LongIdTable

object DonationKeys : LongIdTable() {
val activeIn = optReference("active_in", ServerConfigs)
val userId = long("user")
val activeIn = optReference("active_in", ServerConfigs).index()
val userId = long("user").index()
val value = double("value")
val expiresAt = long("expires_at")
val metadata = jsonb("metadata").nullable()
Expand Down

0 comments on commit 729b940

Please sign in to comment.