Files
route-commerce/supabase/migrations/.archived/XXX_waitlist_table.sql
T
openclaw 916ad39176
Deploy to route.crispygoat.com / deploy (push) Failing after 3m1s
feat(storage): MinIO object storage, Neon Auth, Supabase removal
- Add MinIO/S3-compatible storage client (src/lib/storage.ts) with uploadObject,
  deleteObject, presigned URL helpers, and BUCKETS constant
- Wire product images, brand logos, and water log photos to MinIO via the
  new storage client
- Migrate forgot-password to Neon Auth (remove Supabase /auth/v1/recover call)
- Migrate send-scheduled cron to direct Postgres + Resend (remove Supabase Edge
  Function proxy)
- Add logoUrl to email types (OrderReceipt, Welcome, PasswordReset) and pass
  brand_settings.logo_url from all call sites
- Update email templates to use dynamic logoUrl instead of hardcoded Supabase
  bucket URLs
- Remove hardcoded Supabase URLs from TuxedoVideoHero, TuxedoAboutPage,
  TimeTrackingFieldClient; use brand_settings props + local public/ fallback
- Download brand logos (3) and tuxedo-hero.mp4 (36MB) from Supabase bucket to
  public/ for local development
- Add MinIO env vars to .env.example (endpoint, access key, secret, buckets)
- Fix TimeTrackingFieldClient to destructure logoUrl and brandAccent props
- Fix admin/users.ts logoUrl type (null → undefined for optional string)
- Remove stale sb- cookie from wholesale-auth
- Migrate tuxedo/about page to remove supabase import and use pool query for
  wholesale_settings lookup
2026-06-09 12:23:37 -06:00

30 lines
1.2 KiB
SQL

-- Waitlist and Early Access Signup System
-- Migration for Route Commerce
CREATE TABLE IF NOT EXISTS waitlist (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
email TEXT UNIQUE NOT NULL,
name TEXT,
referral_source TEXT,
referred_by TEXT,
created_at TIMESTAMPTZ DEFAULT NOW(),
status TEXT DEFAULT 'pending' CHECK (status IN ('pending', 'converted', 'archived'))
);
-- Index for email lookups
CREATE INDEX IF NOT EXISTS idx_waitlist_email ON waitlist(email);
CREATE INDEX IF NOT EXISTS idx_waitlist_status ON waitlist(status);
CREATE INDEX IF NOT EXISTS idx_waitlist_created ON waitlist(created_at DESC);
-- Grant permissions
GRANT SELECT, INSERT ON waitlist TO anon;
GRANT SELECT, INSERT ON waitlist TO authenticated;
GRANT SELECT, INSERT ON waitlist TO service_role;
-- Comment on table
COMMENT ON TABLE waitlist IS 'Early access signup for Route Commerce platform';
COMMENT ON COLUMN waitlist.email IS 'Unique email address';
COMMENT ON COLUMN waitlist.name IS 'Optional full name';
COMMENT ON COLUMN waitlist.referral_source IS 'How they heard about us';
COMMENT ON COLUMN waitlist.referred_by IS 'Email of person who referred them';
COMMENT ON COLUMN waitlist.status IS 'pending, converted (signed up), archived';