Updating database row does not work
ignisda
HOBBYOP

2 years ago

20 Replies

ignisda
HOBBYOP

2 years ago

6ef7539d-c186-4609-a904-178fd8fa7fa0


ignisda
HOBBYOP

2 years ago

this is how the table looks like

1264867939111276500


2 years ago

please provide reproducible steps


ignisda
HOBBYOP

2 years ago

this is a platform error, i dont have any other details


ignisda
HOBBYOP

2 years ago

this error is from the railway backend


2 years ago

yes please provide steps so that anyone can see that error for themselves


ignisda
HOBBYOP

2 years ago

create a postgres table with this sturcture and try to update it with the railway postgres editor.


2 years ago

the structure you have shown is a screenshot, a screenshot is not reproducible


ignisda
HOBBYOP

2 years ago

CREATE TABLE public.access_link (
    id text PRIMARY KEY,
    created_on timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP,
    issued_tokens text[] NOT NULL DEFAULT '{}'::text[],
    expires_on timestamp with time zone,
    times_used integer NOT NULL GENERATED ALWAYS AS (cardinality(issued_tokens)) STORED,
    maximum_uses integer,
    is_revoked boolean,
    user_id text NOT NULL,
    name text NOT NULL,
    is_mutation_allowed boolean,
    is_demo boolean,
    CONSTRAINT access_link_to_user_foreign_key FOREIGN KEY (user_id)
        REFERENCES "user" (id) ON UPDATE CASCADE ON DELETE CASCADE
);

CREATE INDEX access_link_pkey ON public.access_link USING btree (id);

2 years ago

and then simply adding a row to that results in the error you shown?


ignisda
HOBBYOP

2 years ago

in my case editing one


2 years ago

what was in the row you edited and what did you edit


ignisda
HOBBYOP

2 years ago

probably due to the generated column


ignisda
HOBBYOP

2 years ago

acl_UnMjQPh6yW5_        2024-07-18 15:30:23.814856+00   {eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1c3JfT0tuRGlGM3BybFFxIiwiZXhwIjoxNzI5MDE3OTA3LCJpYXQiOjE3MjE1MDExMDcsImp0aSI6IjEyZmJhYzZkLTQ4YTktNDM0NS05MTUzLTllOWY0MmJlMTAzYyIsImFjY2Vzc19saW5rX2lkIjoiYWNsX1VuTWpRUGg2eVc1XyJ9.I4NFD31lCOD-fsb0DrEirHploinHhBp82s29I22K01g} 2024-10-16 15:30:16.37+00       1       \N      \N      usr_OKnDiF3prlQq        Spotify Testing \N      t

This is the data of the failing error


2 years ago

I'm sorry but I'm not sure how that answers my question


ignisda
HOBBYOP

2 years ago

this is the data of the row that failed.


ignisda
HOBBYOP

2 years ago

its failing for all rows btw, but yeah this can be used for testing


raflymln
TRIAL

2 years ago

if it's railway error, there should be an error you can trace…


ignisda
HOBBYOP

2 years ago

none i can see


ignisda
HOBBYOP

2 years ago

it does not show any error on the frontend, just fails silently


Loading...