Skip to content

[BACKEND] Add database migration scripts instead of auto-create #39

Description

@Trovic1

Summary

Introduce versioned SQL migrations (and an npm run migrate script) rather than creating schema on boot.

Scope

  • backend only

Likely files

  • src/lib/db.js
  • migrations/ (new)
  • package.json (script)

Acceptance criteria

  • Schema lives in numbered migration files
  • A migrate command applies pending migrations idempotently
  • App boot no longer silently creates tables (or does so only in dev)

Verification

  • Run migrations on a fresh database and confirm schema matches

Labels: backend, enhancement, help wanted


Metadata

Metadata

Assignees

No one assigned

    Labels

    backendBackend / API workenhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions