Create Flyway SQL migration files in src/main/resources/db/migration/ for the initial database schema.
Tables needed:
departments -- id, name (unique), description, created_at
users -- id, username (unique), email (unique), password, first_name, last_name, role, department_id (FK, nullable), active, created_at
tickets -- id, title, description, status, priority, created_by (FK), assigned_to (FK, nullable), department_id (FK), active, created_at, updated_at
comments -- id, content, ticket_id (FK), author_id (FK), created_at
Should be written after all entities are finalized so the schema matches exactly.
Create Flyway SQL migration files in
src/main/resources/db/migration/for the initial database schema.Tables needed:
departments-- id, name (unique), description, created_atusers-- id, username (unique), email (unique), password, first_name, last_name, role, department_id (FK, nullable), active, created_attickets-- id, title, description, status, priority, created_by (FK), assigned_to (FK, nullable), department_id (FK), active, created_at, updated_atcomments-- id, content, ticket_id (FK), author_id (FK), created_atShould be written after all entities are finalized so the schema matches exactly.