Skip to content

Characters

The core table. Every registered character (main, alt, bot) gets a row. Commands like /main, /alt, /bot insert here; /drop sets Status to "Dropped".

ColumnTypeNotes
Idbigint PKAuto-generated
DiscordIdtextDiscord snowflake of the owning player
NametextIn-game character name
CharacterClasstextEverQuest class (e.g. "Cleric", "Shadow Knight")
LevelbigintCurrent level (1–60)
Statustext"Main", "Alt", "Bot", "Dropped", or "Probationary"
TimetextCreation/update timestamp

Used by: /main, /alt, /bot, /ding, /drop, /change, /claim, /toons, /whois, /promote, /assign, /reassign

TypeORM Entity
entities/Census.ts
@Index('idx_17818_census_pkey', ['Id'], { unique: true })
@Entity('census', { schema: 'public' })
export class Census {
@PrimaryGeneratedColumn({ type: 'bigint', name: 'id' })
Id: number;
@Column('text', { name: 'discord_id' })
DiscordId: string;
@Column('text', { name: 'name' })
Name: string;
@Column('text', { name: 'character_class' })
CharacterClass: string;
@Column('bigint', { name: 'level' })
Level: number;
@Column('text', { name: 'status' })
Status: string;
@Column('text', { name: 'time' })
Time: Date;
}

A read-only view filtering out dropped characters. The TypeORM entity extends Census, so it shares the same columns. Most commands and autocomplete helpers query this view instead of census directly.

TypeORM Entity
entities/ActiveToons.ts
@ViewEntity({
expression: `
SELECT *
FROM census
WHERE status != 'Dropped'
`,
})
export class ActiveToons extends Census {}

A read-only view of distinct status values. Returns one column (Status). Used to populate autocomplete dropdowns for status-based filters.

TypeORM Entity
entities/Status.ts
@ViewEntity({
expression: `
SELECT DISTINCT status
FROM census
`,
})
export class Status {
@ViewColumn({ name: 'status' })
Status: string;
}