You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

18 line
610 B

  1. -- Users table to hold account information
  2. -- Postgres dialect
  3. create table users (
  4. id serial primary key,
  5. username text not null unique,
  6. password_hash text not null,
  7. stellar_address text not null unique,
  8. email text unique,
  9. is_active boolean not null default true,
  10. roles text[] not null default '{}',
  11. last_login_at timestamptz,
  12. created_at timestamptz not null default now(),
  13. updated_at timestamptz not null default now()
  14. );
  15. -- Optional helpful indexes (unique already creates indexes, but adding a lower() index for case-insensitive lookups could be considered later)