Add schoolShort field

This commit is contained in:
Mikołaj Pich 2023-09-24 21:55:21 +02:00
parent bd59a06e49
commit 63fea6a7aa
3 changed files with 5 additions and 0 deletions

View file

@ -15,6 +15,7 @@ class LoginEventDao {
private fun resultRowToLoginEvent(row: ResultRow) = LoginEvent( private fun resultRowToLoginEvent(row: ResultRow) = LoginEvent(
schoolName = row[LoginEvents.schoolName], schoolName = row[LoginEvents.schoolName],
schoolShort = row[LoginEvents.schoolShort],
schoolAddress = row[LoginEvents.schoolAddress], schoolAddress = row[LoginEvents.schoolAddress],
scraperBaseUrl = row[LoginEvents.scraperBaseUrl], scraperBaseUrl = row[LoginEvents.scraperBaseUrl],
symbol = row[LoginEvents.symbol], symbol = row[LoginEvents.symbol],
@ -32,6 +33,7 @@ class LoginEventDao {
LoginEvents.insert { LoginEvents.insert {
it[uuid] = event.uuid it[uuid] = event.uuid
it[schoolName] = event.schoolName it[schoolName] = event.schoolName
it[schoolShort] = event.schoolShort
it[schoolAddress] = event.schoolAddress it[schoolAddress] = event.schoolAddress
it[scraperBaseUrl] = event.scraperBaseUrl it[scraperBaseUrl] = event.scraperBaseUrl
it[symbol] = event.symbol it[symbol] = event.symbol

View file

@ -9,6 +9,7 @@ import java.util.*
data class LoginEvent( data class LoginEvent(
val uuid: String, val uuid: String,
val schoolName: String, val schoolName: String,
val schoolShort: String,
val schoolAddress: String, val schoolAddress: String,
val scraperBaseUrl: String, val scraperBaseUrl: String,
val symbol: String, val symbol: String,
@ -21,6 +22,7 @@ object LoginEvents : Table() {
val uuid = varchar("uuid", 36) val uuid = varchar("uuid", 36)
val timestamp = timestamp("timestamp") val timestamp = timestamp("timestamp")
val schoolName = varchar("schoolName", 256) val schoolName = varchar("schoolName", 256)
val schoolShort = varchar("schoolShortName", 256)
val schoolAddress = varchar("schoolAddress", 256) val schoolAddress = varchar("schoolAddress", 256)
val scraperBaseUrl = varchar("scraperBaseUrl", 128) val scraperBaseUrl = varchar("scraperBaseUrl", 128)
val symbol = varchar("symbol", 64) val symbol = varchar("symbol", 64)

View file

@ -0,0 +1 @@
ALTER TABLE loginevents ADD "schoolShortName" VARCHAR(256) NOT NULL DEFAULT '';