# Environments

Group the connections that reach the same database, share their safeguards and URLs, and map them to other environments for deployments.

Source: https://www.nexosqlstudio.com/docs/environments
Language: en
Type: docs

# Environments

An environment groups the connections that reach the same database, such as your development, test or production database. Its members share one set of safeguards, APEX and ORDS URLs and filters, and each member can be mapped to its equivalent connection in other environments so deployments know where each change goes.

Environments live in the **Environments** section of the **Workspace** view. Each connection belongs to at most one environment.

## Create an environment

Use any of these:

- Select **Create new environment** (**+**) on the **Environments** section row.
- Open the **…** menu of the Workspace view and choose **Environments › Create new environment**.
- Right-click a connection folder and choose **Create environment from folder**. Nexo detects which database each connection reaches and proposes the connections of one database.

Give the environment a name, then add its connections on the **Connections** tab and select **Create environment**.

## Edit an environment

Right-click the environment and choose **Edit environment**. Each environment opens in its own dialog; to edit another one, open it from its own node in the tree. The dialog has four tabs.

### General

Name, stage, color and the **default deployment destination**: the environment that receives this environment's changes unless a deployment chooses a different one. Mark **Production environment** to have its connections marked and guarded as production.

### Connections

The connections that reach this environment's database. Select **Add connection** to choose more; connections that reach the same database are listed first, and connections that already belong to another environment are not offered. Use the trash icon to remove a connection; it is kept and becomes unassigned.

Nexo checks the database endpoint when you save: every member must reach the same database.

**Mappings** are part of the same table. Select **Add mapped environment** to add a column for another environment, then choose, for each connection, its equivalent connection there. For example, map `APP` in Development to `APP` in Test. Deployments use these mappings to pick their targets, and ask for any mapping that is missing. Use the trash icon in a column header to stop mapping to that environment.

### APEX and ORDS

The APEX base URL used to open APEX applications and the optional ORDS base URL for REST tools. Use **Test** to check that a URL answers. Connections can still override the ORDS URL in their own editor.

### Safeguards

Permissions and confirmations that apply to every connection in the environment and override their own settings:

- **Permissions:** read operations, write operations and object locking (development databases only).
- **Ask for confirmation:** before read or write operations, dropping objects, deleting data, compiling objects, and on object edit collisions.

Each one is **Default** (keep each connection's own setting), **On** or **Off**. Overridden fields are locked in the connection editor.

## Filters

Right-click an environment and open **Filter** to **Switch profile**, **Edit filters** or **Reset filters**. Environment filters apply to its member connections, like folder filters.

## Organize and delete

- Group environments in folders with **Create folder** and **Move to folder**.
- **Delete environment** removes the environment after you confirm. Its connections are kept and become unassigned.
- Search the **Environments** section from its own search row; the search does not affect the other sections.


