Error running migrations: (psycopg2.errors.InvalidObjectDefinition) generation expression is not immutable
Error running migrations: (psycopg2.errors.InvalidObjectDefinition) generation expression is not immutable [SQL: CREATE TABLE datasets ( _intid SERIAL NOT NULL, id VARCHAR GENERATED ALWAYS AS ('DS' || _intid) STORED NOT NULL, name VARCHAR NOT NULL, description VARCHAR, file_path VARCHAR NOT NULL, uploaded_at TIMESTAMP WITHOUT TIME ZONE NOT NULL, PRIMARY KEY (_intid), UNIQUE (_intid), UNIQUE (id), UNIQUE (name) )
] (Background on this error at: https://sqlalche.me/e/20/f405) Error starting server: 1
@wlilaifeng can you please provide the following details about your setup to help us understand the issue better:
- is this using docker or pypi package?
- if pypi, is it using
--sqliteflag or a postgres endpoint has been provided? - if postgres, what is the version of it?
Thanks for reporting it!
I have the same issue. That error came from running alembic upgrade head.
I don't use pyspur command. I cloned the repository and ran alembic command with a new postgresql database and got that error.
I'm using postgresql 12.13 version
Do you have any solutions?
ı have similar problem