Add character rename to admin panel
Renaming checks for a name collision first (characters.char_name has no unique constraint in the schema, so this has to be enforced at the application level to avoid two characters silently sharing a name), and also updates list_friend.namefriend for any rows referencing this character's id -- that column is a denormalized display-name cache in other players' friend lists and would otherwise go stale on rename. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
315f64cf95
commit
a07c2e0a3f
2 files changed
+34
No files matched your search
@@ -4,6 +4,9 @@
|
||||
<div class="card" style="max-width:600px;">
|
||||
<h2 style="margin-top:0;">Charakter: {{ char.char_name }} <span class="badge ok">Account: {{ char.account_name }}</span></h2>
|
||||
<form method="post">
|
||||
<label>Charaktername</label>
|
||||
<input type="text" name="char_name" value="{{ char.char_name }}" required>
|
||||
|
||||
<label>Standort (wirkt beim nächsten Login)</label>
|
||||
<select name="respawnid">
|
||||
<option value="{{ char.respawnid }}">-- aktuell: Zone #{{ char.respawnid }} --</option>
|
||||
|
||||
Reference in new issue
Block a user