Paperless / rebuild
Course 2 28ef273

README.md

paperless-backend/src/main/resources/db/migration/README.md

Snapshot 28ef273Download original
1# Database migrations23Production migrations are under `postgresql/` and use the PostgreSQL-specific4Flyway location configured in the application. The sole migration,5`V1__create_uuid_schema.sql`, creates the current UUID schema for a fresh,6empty PostgreSQL database. UUID IDs are generated by Hibernate, not by database7defaults. Hibernate schema validation remains enabled at application startup.89## Greenfield-only migration1011This migration is a fresh-schema bootstrap, not an upgrade path. Do not apply it12to an existing database, baseline an existing schema, or treat an old Flyway13history as compatible with this version. Existing installations must be reset14and restored from a verified backup, or handled through a separate, explicitly15reviewed upgrade migration; no in-place upgrade migration is provided here.16Back up and verify any data that must be retained before resetting a database.1718## H2 tests1920Tests retain their existing H2 Hibernate `ddl-auto: create-drop` schema21lifecycle. Flyway is disabled for the test profile, so PostgreSQL migrations22are not run against H2.23

Search chapters, reference and source filenames.