Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

964 B
Raw Blame
-- Migration: add users.account_tier — the granted account "mode" shown on a
-- member's card (api/_lib/account-tier.js). NULL = the default 'user' tier.
-- 'holder' is derived live from on-chain $THREE and is never stored here, so it
-- is intentionally absent from the CHECK list. Idempotent.
begin;

alter table users
    add column if not exists account_tier text;

-- Constrain to the admin-grantable modes. Added separately (not inline) so the
-- constraint lands on deployments where the column already exists from a prior
-- partial run. NOT VALID keeps the lock light; existing NULLs already satisfy it.
do $$
begin
    if not exists (
        select 1 from pg_constraint where conname = 'users_account_tier_check'
    ) then
        alter table users
            add constraint users_account_tier_check
            check (account_tier is null or account_tier in ('beta', 'pro', 'three-dimensional'))
            not valid;
    end if;
end $$;

commit;