create table characters
(
    id         serial
        primary key,
    user_id    integer     not null
        references users
            on delete cascade,
    is_active  boolean   default true,
    name       varchar(50) not null,
    money      bigint    default 0,
    inventory  jsonb     default '[]'::jsonb,
    stats      jsonb     default '{}'::jsonb,
    skills     jsonb     default '[]'::jsonb,
    looks      jsonb     default '{}'::jsonb,
    position   jsonb     default '{}'::jsonb,
    created_at timestamp default CURRENT_TIMESTAMP,
    updated_at timestamp default CURRENT_TIMESTAMP,
    deleted_at timestamp
);

alter table characters
    owner to osirose;
