---
title: "Lacuna PSC command: **update-db**"
description: "Reference for the Lacuna PSC update-db command, which applies migrations to the database model when running without db_owner privileges."
canonical: "https://docs.lacunasoftware.com/en-us/articles/psc/on-premises/tool/update-db"
locale: "en"
product: "PSC"
last_updated: "2026-07-14"
---

# Lacuna PSC command: **update-db**

## Name

`update-db` - Updates the database model

## Syntax

```sh
dotnet Lacuna.Psc.Site.dll [settings] -- update-db
```

Or, on Docker:

```sh
docker run -i lacunasoftware/psc:1.2 [settings] -- update-db
```

The `settings` arguments are additional settings to overwrite settings from configuration files and environment variables,
for instance `--Section1:Name1=value1 --Section2:Name2=value2`.

## Description

The `update-db` command updates the database model by applying a series of *migrations*. It is meant to be used only when
[running Lacuna PSC without db_owner privileges](https://docs.lacunasoftware.com/en-us/articles/psc/on-premises/unprivileged-db-user).

Since in this scenario Lacuna PSC's database credentials do not grant permissions to change the database model, you typically
will want to run this command passing a **privileged connection string**:

```sh
dotnet Lacuna.Psc.Site.dll --ConnectionStrings:DefaultConnection="Data Source=SERVER;Initial Catalog=DATABASE;User ID=USERNAME;Password=PASSWORD" -- update-db
```

> **Tip**
>
> On Linux, if your password contains the `!` character, use single quotes instead, e.g. `--ConnectionStrings:DefaultConnection='...'`, to avoid
> shell history expansions

## See also

* [Lacuna PSC command-line tool](https://docs.lacunasoftware.com/en-us/articles/psc/on-premises/tool)
* [Running Lacuna PSC without db_owner privileges](https://docs.lacunasoftware.com/en-us/articles/psc/on-premises/unprivileged-db-user)
