# Databases (https://lazyfrog.dev/docs/databases)

Each environment has its own **PostgreSQL 19** database, ready from the start. Your app finds it in `DATABASE_URL`. Extensions available: pgvector, PostGIS, pg_trgm, citext, hstore, uuid-ossp and pg_stat_statements.

## Changing the structure [#changing-the-structure]

Your AI adds migrations (numbered SQL files in `migrations/`) and applies them to the preview. Publishing applies them to the live database after trying them on a copy. Changes that would remove data need your confirmation.

## Looking at the data [#looking-at-the-data]

The portal's **Database** screen shows tables and rows for either environment and runs queries. Writes on the live database ask you to confirm, and a snapshot is taken first.

## Live data stays live [#live-data-stays-live]

Preview data is never copied to the live site. What the live site needs at the start (a menu, say) goes in through migrations or a confirmed one-time step.
