feat(server): add Resources table + docker volume + Caddy upload limit

Closes #119
This commit is contained in:
Jens Reinemann 2026-05-18 22:02:59 +02:00
parent 0b94a10acf
commit 22112e7978
2 changed files with 20 additions and 2 deletions

View file

@ -46,8 +46,8 @@ internal object DatabaseFactory {
Database.connect(jdbcUrl, driver)
}
transaction {
SchemaUtils.create(Inventories, Users, Categories, Locations, Items, Settings, Messages, DeletedItems)
SchemaUtils.createMissingTablesAndColumns(Inventories, Users, Categories, Locations, Items, Settings, Messages, DeletedItems)
SchemaUtils.create(Inventories, Users, Categories, Locations, Items, Settings, Messages, DeletedItems, Resources)
SchemaUtils.createMissingTablesAndColumns(Inventories, Users, Categories, Locations, Items, Settings, Messages, DeletedItems, Resources)
}
migrateUserInventories()
EncryptionService.init(encryptionKey)

View file

@ -83,3 +83,21 @@ internal object DeletedItems : Table("deleted_items") {
override val primaryKey = PrimaryKey(id)
}
internal object Resources : Table("resources") {
val guid = varchar("guid", 36)
val title = text("title")
val description = text("description")
val tags = text("tags") // JSON array string, e.g. ["gurps","novel"]
val fileFormat = varchar("file_format", 20)
val mimeType = varchar("mime_type", 100)
val fileSize = long("file_size")
val releaseDate = varchar("release_date", 10).nullable()
val createdAt = long("created_at")
val updatedAt = long("updated_at")
val author = text("author").nullable()
val language = varchar("language", 10).nullable()
val edition = text("edition").nullable()
override val primaryKey = PrimaryKey(guid)
}