# Updates and licensing

## Licences

A licence covers **one installation** of SQL Flow for the month or year you paid for, with the **company limit** of your plan: one company database on Essential, two on Professional and five on Enterprise. An installation is one Windows machine running SQL Flow; it can serve as many applications and tokens as you like.

Prices are on the [pricing page](/pricing). Buying from your account gives you an **activation code** (a one-time code such as `7KQ2-M9XD-...`) to paste into the setup wizard or the console's Licence page. The code is used once; the installation is then bound to that machine.

## The free trial

Register and start the trial from your account: 14 days, one installation and one company, every feature, no card. The trial allows 100 API calls and lists of up to 20 rows. The trial's activation code works like any other. **Buying converts the trial in place**: the installation keeps running, the next check-in carries the new end date and company limit and lifts the trial limits, and nothing is reinstalled. One trial per email and per machine.

## Check-ins

Every few minutes the installation **checks in** with the licence server over HTTPS. The server answers a freshly signed licence that is valid for seven days, and, when one is ready, an update notice. The installation keeps working through internet outages: as long as the last licence is still within its seven days, nothing changes. After seven days without a check-in the API pauses until the server is reachable again, and the console's Licence page says so.

The check-in carries the installation id, the app version and a health summary (API up, SQL Accounting connected, the open company's name, queue length, errors today). No accounting data is sent. Your [account page](/account) shows this health for each of your installations.

## Renewing

Renew from your account before or after the end date. A renewal while the subscription is running **adds** the period you pay for to the current end; a renewal after it lapsed starts from today. Need more companies? Buy a larger plan from your account: the new company limit reaches the installation at its next check-in. Each further machine needs a licence of its own.

When a subscription ends, the installation's licence expires at its next check-in and the API answers 503 with a licence message until it is renewed. Your data is untouched: SQL Flow never changes SQL Accounting's database on its own.

## Moving to a new machine

Open your [account page](/account), find the installation and press **Release**. The old machine stops at its next check-in; your account then offers a new activation code for the new machine. The same goes for a reinstalled Windows: release, reinstall, activate.

If a machine was lost or broken and cannot be released from itself, releasing it from the account page is enough.

## Updates

SQL Flow updates itself:

1. The licence server tells the installation about a new version at a check-in. Releases go out in **rings**: pilots first, then early adopters, then everyone; a customer who asked can be held on a version.
2. The watchdog downloads the package, checks its SHA-256 and its signature against the public key built into the app, and checks that it is built for this processor.
3. The update is **staged** and applied in the quiet window (by default between 2 and 5 in the morning, when the API is idle), or at once when you press **Update now** on the console's Updates page.
4. If the new version fails its health check, the watchdog **rolls back** to the previous version and reports it. Your account page and the console both show the outcome.

The Updates page shows the installed version, what is staged, and the history.
