> ## Documentation Index
> Fetch the complete documentation index at: https://docs.streamly.watch/llms.txt
> Use this file to discover all available pages before exploring further.

# Database Schema

> Streamly Supabase schema overview from numbered migrations — apply in order; there is no single schema.sql.

Streamly’s schema lives in **`supabase/migrations/*.sql`**. Apply files in numeric order. Do **not** expect a unified `schema.sql` in the package.

## Migration map (by domain)

| Migrations                      | Domain                                                                                            |
| ------------------------------- | ------------------------------------------------------------------------------------------------- |
| `001`                           | Control plane — profiles, tenants, memberships, branding, domains, API keys                       |
| `002`                           | Catalog — titles, seasons, episodes, genres, collections, homepage, metadata jobs                 |
| `003`                           | Sources — providers, content sources, cache, health                                               |
| `004`                           | Viewers — memberships, `viewer_profiles`, watchlist, history, playback sessions                   |
| `005`                           | Billing + ads                                                                                     |
| `006`                           | RLS                                                                                               |
| `007`                           | Playback admission                                                                                |
| `008`                           | Plugin registry                                                                                   |
| `009`–`012`                     | SaaS content, onboarding, platform/landing settings, blog categories                              |
| `013`–`016`                     | Popularity, playback takeover, avatars bucket, TMDB cache                                         |
| `017`–`019`                     | Provider-agnostic billing, viewer plan tiers, plan ordering                                       |
| `020`–`022`, `029`, `031`–`032` | Live TV (+ plugin, watchlist/history)                                                             |
| `023`–`028`, `030`              | Contact, downloads, source kinds, theme packages, Vimeo adapter, provider health, dashboard order |

Exact filenames may grow beyond `032` — always apply **every** file present in the folder, in order.

## Related

* [Supabase](/configuration/supabase)
* [Security](/technical/security)
* [Environment Variables](/technical/environment-variables)
