# Smart Tech OMP database installation

Back up the database before importing any SQL file.

## Existing database

- Original database with no prior migration: import `database_updates_v1.sql`, then `database_updates_v2.sql`.
- Database already updated with the 24 June 2026 completed release: import only `database_updates_v2.sql`.

Each migration is intended to be imported once. The v2 migration adds persistent rate limits, session-invalidation/password-rotation fields, staff module permissions and related indexes.

## Fresh installation

Import only `smarmvty_smart_completed.sql` into an empty database. It already contains the original schema and both migrations.

Do not import the complete database over live data, and do not import v1/v2 after importing the complete database.
