LiteBans Import
A server moving from LiteBans brings its punishment record with it. The plugin repository ships three SQL scripts under tools/litebans-import/, run in order against the AstralPunishments database with the LiteBans database readable from the same connection:
Script | Mode | Does |
|---|---|---|
| reads only | Reports what the source data looks like and what cannot survive the conversion. |
| writes | The conversion itself. Idempotent. |
| reads only | Imported vs. expected, per type. |
Take a backup first. The import does not delete, but it is not a dry run either.
Before running
Source location. Every reference reads
litebans.litebans_<table>. If the schema or table prefix differs, replace the stringlitebans.litebans_throughout all three scripts.Any client will do — CLI, DBeaver, the IntelliJ console, phpMyAdmin. There is deliberately no
DELIMITERanywhere: that is a command-line-client feature, and a script using it fails on line 1 through JDBC. The two helper functions are written as a singleRETURNexpression so no custom delimiter is needed.Run the whole of
02on one connection — it creates a temporary table and wraps the inserts in a transaction.
Type mapping
LiteBans | AstralPunishments |
|---|---|
|
|
|
|
|
|
|
|
|
|
A LiteBans IP ban carries both an account and an address, which this schema models as two rows: the account ban and the address ban. tools/litebans-import/README.md covers that split, identifier derivation, and everything that does not map cleanly.
See also
Overview → Data model — the target schema, and the column corrections an older table may still need.