Home
About
Policies
FAQ
Forums
Registration
Password Recovery

User:WhiteWizard/SQL FB Authentication

From Tapestries MUCK

Jump to: navigation, search


Character Table

CREATE TABLE muck_characters (
    id              SERIAL PRIMARY KEY,
    player_id       INTEGER,

    -- Stuff that must match up with the Muck
    name            VARCHAR(30) NOT NULL,
    dbref           INTEGER,
    created         BIGINT,

    -- Administrative information
    suspended       BIGINT,  -- NULL = active, 0 = Suspended indefinably, > 0 = time_t when available again.
    toaded          BOOLEAN
);
CREATE UNIQUE INDEX muck_characters_muck_info ON muck_characters (name, dbref, created); -- Can't have dups...
CREATE INDEX muck_characters_player_id ON muck_characters (player_id);
CREATE INDEX muck_characters_name ON muck_characters (name);
CREATE TABLE character_log (
    time            BIGINT PRIMARY KEY,
    player_id       INTEGER,
    character_id    INTEGER,
    ipaddr          inet,
    type            text,  -- LOGIN, LOGOUT, MCREATED, CREATED, TOADED, MREJECT, etc. etc.
    info            text
);
CREATE INDEX character_log_player_id ON character_log (player_id);
CREATE INDEX character_log_character_id ON character_log (character_id);
CREATE INDEX character_log_ipaddr ON character_log (ipaddr);
Personal tools
Namespaces
Variants
Actions
navagation
information
wiki
Toolbox