Skip to content
This repository was archived by the owner on Nov 24, 2025. It is now read-only.
This repository was archived by the owner on Nov 24, 2025. It is now read-only.

TO DB migrations: cannot cast jsonb string to type boolean #7222

@zrhoffman

Description

@zrhoffman

This Bug Report affects these Traffic Control components:

  • Traffic Ops

Current behavior:

If the delivery_service_requests table is non-empty, running the 2022110908494015_ds_active_flag.up.sql migration will fail.

 (details: pq: cannot cast jsonb string to type boolean)
exit status 1

Expected behavior:

All migrations should run successfully.

Steps to reproduce:

  1. Checkout the commit before Delivery Service Active Flag Rework #7099

    git checkout 822092f26a~
  2. Cherry-pick Dev-CiaB: Run db/admin as root #7209 so that Dev CiaB works

    git checkout 09039af182
  3. Enable Delivery Service Requests in traffic_portal_properties.json

    file=traffic_portal/app/src/traffic_portal_properties.json
    echo "$(<"$file" jq '.properties.dsRequests.enabled = true')" >"$file"
  4. Start CDN in a Box for Developers

    docker-compose up
  5. Go to https://localhost:444/#!/delivery-services/1?dsType=HTTP

  6. Set Display Name to new-display-name

  7. Press Update

  8. Choose Submit Request for Review and Deployment, enter My text as your comment, and press Submit

  9. Checkout the Apache master branch

  10. Try to run database migrations

    cd traffic_ops/app
    go run ./db -c ../../dev/traffic_ops/dbconf.yml up

Metadata

Metadata

Assignees

No one assigned

    Labels

    Traffic Opsrelated to Traffic Opsbugsomething isn't working as intendeddatabaserelating to setup/installation/structure of the Traffic Ops database

    Type

    No type
    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