Closed Bug 1018349 Opened 10 years ago Closed 10 years ago

add_new_products: Don't assume we have a product in the products table

Categories

(Socorro :: Database, task)

task
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: selenamarie, Assigned: selenamarie)

Details

(Whiteboard: [DB change])

breakpad=# select add_new_product('PlanetaryAnnihilation', '0.9');
ERROR:  null value in column "sort" violates not-null constraint
DETAIL:  Failing row contains (PlanetaryAnnihilation, 999.0, 0.9, PlanetaryAnnihilation, null).
CONTEXT:  SQL statement "INSERT INTO products ( product_name, sort, rapid_release_version,
        release_name, rapid_beta_version )
VALUES ( prodname, current_sort + 1, initversion,
        COALESCE(ftpname, prodname), rapid_beta_version)"
PL/pgSQL function add_new_product(text,major_version,text,text,numeric,numeric) line 24 at SQL statement
Assignee: nobody → sdeckelmann
Target Milestone: --- → 88
Commits pushed to master at https://github.com/mozilla/socorro

https://github.com/mozilla/socorro/commit/1b18a43d4876f5bf038a57f1f2c17b60ac32c532
Fixes bug 1018349 - add COALESCE to max(sort) when adding a new product

https://github.com/mozilla/socorro/commit/2120a6ad31cd9c08b64d611951ba72e61671a783
Fixes bug 1018349 - add COALESCE to max(sort) when adding a new product

https://github.com/mozilla/socorro/commit/d56b1623a278d61ff8b113b95534ce4dd6682e25
fix bug 1018349 - migration

https://github.com/mozilla/socorro/commit/fb6ea9faf4a08a0fa4533b367fa4fee20c090c23
Merge pull request #1 from rhelmer/bug1018349-coalesce-max-sort

Bug1018349 coalesce max sort

https://github.com/mozilla/socorro/commit/7c7b55cb8ef2e0753ee0a25d505a1a6a8c5576cb
Merge pull request #2068 from selenamarie/bug1018349-coalesce-max-sort

Fixes bug 1018349 - add COALESCE to max(sort) when adding a new product
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Whiteboard: [DB change]
Target Milestone: 88 → 91
Target Milestone: 91 → 92
You need to log in before you can comment on or make changes to this bug.