bug-lifecycle-engine migrations
================================

POLICY
------
Every migration in this folder is ADDITIVE ONLY against the ``bugs`` table.

Rules:
1. Never DROP, RENAME, or change the type of an existing column.
2. Every migration MUST include a downgrade() function that fully reverses
   the upgrade(). Alembic will refuse to generate a migration without one.
3. Only the ``bugs`` table may be altered. All other tables (users, projects,
   test_runs, etc.) are owned by the worky project and must not be touched.
4. Use nullable=True for new columns (or supply a server_default) so the
   migration is safe to apply without downtime on a populated table.

Running
-------
  # Apply all pending migrations
  DATABASE_URL="postgresql+psycopg2://user:pass@host:5432/worky" alembic upgrade head

  # Roll back the last migration
  DATABASE_URL="..." alembic downgrade -1

  # Generate a new additive migration after adding a column to Bug model
  DATABASE_URL="..." alembic revision --autogenerate -m "add_<column>_to_bugs"
