Skip to content

Missing column on player_death table #3612

@Pablodotnet

Description

@Pablodotnet

Priority

Low

Area

  • Datapack
  • Source
  • Map
  • Other

What happened?

In this function is making an INSERT to column participants but if you do a global search on the code there's no migration nor creation of that column on the schema.sql, so it's throwing an error because the column effectively do not exist until created manually.

local function saveDeathRecord(playerGuid, player, killerName, byPlayer, mostDamageName, byPlayerMostDamage, unjustified, mostDamageUnjustified, participants)
	local participantsString = serializeParticipants(participants)
	local query = string.format(
		"INSERT INTO `player_deaths` (`player_id`, `time`, `level`, `killed_by`, `is_player`, `mostdamage_by`, `mostdamage_is_player`, `unjustified`, `mostdamage_unjustified`, `participants`) " .. "VALUES (%d, %d, %d, %s, %d, %s, %d, %d, %d, %s)",
		playerGuid,
		os.time(),
		player:getLevel(),
		db.escapeString(killerName),
		byPlayer,
		db.escapeString(mostDamageName),
		byPlayerMostDamage,
		unjustified and 1 or 0,
		mostDamageUnjustified and 1 or 0,
		db.escapeString(participantsString)
	)
	db.query(query)
end

What OS are you seeing the problem on?

Windows

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Priority: LowMinor impactStatus: Pending TestThis PR or Issue requires more testingType: BugInconsistencies or issues which will cause an issue or problem for users or implementors.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions