Setting action/action_target_id not working with new ship insert.
MisterGlass opened this issue · 0 comments
MisterGlass commented
The goal of the example below is to create a new ship & set its action with one query:
WITH new_ship as (
INSERT INTO my_ships(
name,
attack, defense, engineering, prospecting,
location,
action,
action_target_id
)
VALUES(
'Miner',
0,0,0,20,
(SELECT location FROM planets WHERE id = 5),
'MINE',
5
)
RETURNING id
)
SELECT
new_ship.id AS id,
UPGRADE( new_ship.id, 'PROSPECTING', 480) AS status
FROM new_ship
When executed, this query returns a success & create a ship, but DOES NOT set its action/action_target_id. This is a silent failure.
If possible, it would be great to get setting action/action_target_id working. Barring that, an error should be returned so that the client is aware of the issue.