Skip to content

Stories DB Migration – V5__create_stories.sql #49

@ArchILLtect

Description

@ArchILLtect

Summary

Create Flyway migration V5__create_stories.sql to add stories table with id uuid PK, author_id uuid NOT NULL FK → users(id), content text NOT NULL (1..1000), created_at timestamptz NOT NULL default now(), updated_at timestamptz NULL; add indexes on (created_at desc) and (author_id, created_at desc).

Motivation / Problem

Enable Stories domain persistence following Flyway immutability and project naming/constraints.

Acceptance Criteria

  • Migration file added under src/main/resources/db/migration/ and never modifies historical migrations.
  • Table schema and constraints match plan.
  • App boots and Flyway applies V5 successfully in local and CI.

Target Release

v0.1.2

Notes / Links

docs/weekly-plan/week-5/week-5-plan-backend.md
docs/weekly-plan/week-5/week-5-plan-issues.md

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:dbIssues/PRs related to database schema, migrations, and persistence.area:storiesIssues/PRs related to the Stories domain (entity, repository, service, controller, feed, deletion)backendWork related to APIs, services, or controllers.dbDatabase schemas, migrations, or SQL changes (Flyway, Postgres).roadmapPlanned feature or strategic goal from the project roadmap.type:featureNew feature related to backend types, DTOs, or models.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions