--- user-service

alter table users add "type" varchar2(255);
update users set "type" = 'user';

-- user-service-token

create table user_service_tokens (
    id number(19) primary key,
    user_id number(19) not null references users(id),
    token varchar2(1024 char) not null,
    deleted number(1) not null,

    created_at timestamp with time zone not null,
    deleted_at timestamp with time zone
);

create sequence user_service_tokens_id_seq;
create index user_service_tokens_user_ix on user_service_tokens(user_id);
create unique index user_service_tokens_uniq on user_service_tokens(token);
