SQL Server Schema Scripts

Microsoft SQL Server DDL for Pukka-J Nexus.

When you need these

Nexus normally creates and updates its own database schema when the service starts. Where the service account has not been granted DDL rights on the database it cannot do that, and these scripts let a database administrator apply the same changes by hand before the upgrade.

If your Nexus service account can alter its own database, you do not need them.

Microsoft SQL Server only. Nexus also runs against MySQL and an embedded database, and no scripts are published for those: those installations normally grant the service the rights to manage its own schema, so it does this itself at startup. If you run one that does not, tell us and we will publish them.

Which script

Create builds the whole schema in an empty database - every table, column, primary key and index. Use it when provisioning a new installation.

Upgrade brings an existing database up to that release by adding only what is missing. It is additive: it never alters or drops an existing column, index or table, so it cannot lose data. Where a column's type differs from what Nexus expects it reports the difference rather than changing it, because rewriting a populated column risks truncation and is a decision for someone who knows the data.

Before you run one

Take the script for the version you are moving to, not the newest one. Each is generated from the exact schema that release expects, so a newer script would build a database ahead of the application that has to read it.

Back the database up first. Both scripts are idempotent, so a partial or repeated run is safe - re-run the upgrade until it reports nothing left to do.

Scripts by release

Loading releases...