[GH-ISSUE #272] still can not create first workspace #162

Closed
opened 2026-02-22 18:18:08 -05:00 by yindo · 8 comments
Owner

Originally created by @jamsnrihk on GitHub (Oct 8, 2023).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/272

I tried access http://localhost:3001/api/migrate, and try to create the first workspace, but still get following error log:

The table main.system_settings does not exist in the current database.
2023-10-08 23:01:29 anything-llm | prisma:query INSERT INTO main.system_settings (label, value, createdAt, lastUpdatedAt) VALUES (?,?,?,?) ON CONFLICT (label) DO UPDATE SET value = ? WHERE (main.system_settings.label = ? AND 1=1) RETURNING id AS id, label AS label, value AS value, createdAt AS createdAt, lastUpdatedAt AS lastUpdatedAt
2023-10-08 23:01:29 anything-llm | FAILED TO UPDATE SYSTEM SETTINGS
2023-10-08 23:01:29 anything-llm | Invalid prisma.system_settings.upsert() invocation:
2023-10-08 23:01:29 anything-llm |
2023-10-08 23:01:29 anything-llm |
2023-10-08 23:01:29 anything-llm | The table main.system_settings does not exist in the current database.

anyway to manual create the `main.system_settings‘ table?

Originally created by @jamsnrihk on GitHub (Oct 8, 2023). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/272 I tried access http://localhost:3001/api/migrate, and try to create the first workspace, but still get following error log: The table `main.system_settings` does not exist in the current database. 2023-10-08 23:01:29 anything-llm | prisma:query INSERT INTO `main`.`system_settings` (`label`, `value`, `createdAt`, `lastUpdatedAt`) VALUES (?,?,?,?) ON CONFLICT (`label`) DO UPDATE SET `value` = ? WHERE (`main`.`system_settings`.`label` = ? AND 1=1) RETURNING `id` AS `id`, `label` AS `label`, `value` AS `value`, `createdAt` AS `createdAt`, `lastUpdatedAt` AS `lastUpdatedAt` 2023-10-08 23:01:29 anything-llm | FAILED TO UPDATE SYSTEM SETTINGS 2023-10-08 23:01:29 anything-llm | Invalid `prisma.system_settings.upsert()` invocation: 2023-10-08 23:01:29 anything-llm | 2023-10-08 23:01:29 anything-llm | 2023-10-08 23:01:29 anything-llm | The table `main.system_settings` does not exist in the current database. anyway to manual create the `main.system_settings‘ table?
yindo closed this issue 2026-02-22 18:18:09 -05:00
Author
Owner

@timothycarambat commented on GitHub (Oct 8, 2023):

Before you run the docker container are you running the setup script? It will create your database and even run the migration. When docker builds it will reference the host-system DB and load on top of that. If you dont run that script prior (or haven't run it since the prisma migration) you will have a broken docker instance.

@timothycarambat commented on GitHub (Oct 8, 2023): Before you run the docker container are you running the setup script? It will create your database and even run the migration. When docker builds it will reference the host-system DB and load on top of that. If you dont run that script prior (or haven't run it since the prisma migration) you will have a broken docker instance.
Author
Owner

@timothycarambat commented on GitHub (Oct 8, 2023):

You may need to run from the host machine yarn prisma:generate and then yarn prisma:migrate. Then rebuilding of the docker container will not exit from the system being unable to communicate with the DB.

https://github.com/Mintplex-Labs/anything-llm/blob/master/server/utils/prisma/PRISMA.md

@timothycarambat commented on GitHub (Oct 8, 2023): You may need to run from the host machine `yarn prisma:generate` and then `yarn prisma:migrate`. Then rebuilding of the docker container will not exit from the system being unable to communicate with the DB. https://github.com/Mintplex-Labs/anything-llm/blob/master/server/utils/prisma/PRISMA.md
Author
Owner

@jamsnrihk commented on GitHub (Oct 8, 2023):

@timothycarambat thanks timothy, it works after I run yarn prisma:generate and yarn prisma:migrate.
after i upload some documents and try to chat with it, it can generate the answer, but the reference showing in some strange encoding character, not show original one (Chinese).
please kindly advise.
cap5

@jamsnrihk commented on GitHub (Oct 8, 2023): @timothycarambat thanks timothy, it works after I run yarn prisma:generate and yarn prisma:migrate. after i upload some documents and try to chat with it, it can generate the answer, but the reference showing in some strange encoding character, not show original one (Chinese). please kindly advise. ![cap5](https://github.com/Mintplex-Labs/anything-llm/assets/134043330/65823320-c008-451a-997a-d2a12d1e4b1e)
Author
Owner

@timothycarambat commented on GitHub (Oct 9, 2023):

Related to this PR which has nt been merged:
https://github.com/Mintplex-Labs/anything-llm/pull/169

@timothycarambat commented on GitHub (Oct 9, 2023): Related to this PR which has nt been merged: https://github.com/Mintplex-Labs/anything-llm/pull/169
Author
Owner

@timothycarambat commented on GitHub (Oct 9, 2023):

That will resolve the weird encoding on filenames. Will work to get that change merged. I think it has side effects which is why it has sat out so long

@timothycarambat commented on GitHub (Oct 9, 2023): That will resolve the weird encoding on filenames. Will work to get that change merged. I think it has side effects which is why it has sat out so long
Author
Owner

@nyavana commented on GitHub (Oct 9, 2023):

HI, I'm running docker on unraid which yarn is not available. Is there any workaround which I can do manual initiation for prisma?
image

@nyavana commented on GitHub (Oct 9, 2023): HI, I'm running docker on unraid which yarn is not available. Is there any workaround which I can do manual initiation for prisma? ![image](https://github.com/Mintplex-Labs/anything-llm/assets/33804090/cacd0575-2d65-4974-bad2-3affc95a5d31)
Author
Owner

@timothycarambat commented on GitHub (Oct 10, 2023):

HI, I'm running docker on unraid which yarn is not available. Is there any workaround which I can do manual initiation for prisma? image

First, just make sure server/storage/anythingllm.db exists. If not, create the empty file.

Next, this may cause an issue when installing dependencies, but all you should need to do to get going with docker is just copy docker/.env.example to docker/.env In its default form after copy should be enough to boot the service.

Then boot up docker and it should install deps and everything. If this is a remote machine (accessible via IP only) you may additionally want to create a frontend/.env file and change VITE_API_BASE='http://localhost:3001/api' to VITE_API_BASE='/api'

@timothycarambat commented on GitHub (Oct 10, 2023): > HI, I'm running docker on unraid which yarn is not available. Is there any workaround which I can do manual initiation for prisma? ![image](https://user-images.githubusercontent.com/33804090/273740605-cacd0575-2d65-4974-bad2-3affc95a5d31.png) First, just make sure `server/storage/anythingllm.db` exists. If not, create the empty file. Next, this may cause an issue when installing dependencies, but all you should need to do to get going with docker is just copy `docker/.env.example` to `docker/.env` In its default form after copy should be enough to boot the service. Then boot up docker and it should install deps and everything. If this is a remote machine (accessible via IP only) you may additionally want to create a `frontend/.env` file and change `VITE_API_BASE='http://localhost:3001/api'` to `VITE_API_BASE='/api'`
Author
Owner

@jamsnrihk commented on GitHub (Oct 10, 2023):

That will resolve the weird encoding on filenames. Will work to get that change merged. I think it has side effects which is why it has sat out so long

I am not mean the file name not encoding, i mean the source contents not encoding, it should be chinese. but currently, showing some strange things.

@jamsnrihk commented on GitHub (Oct 10, 2023): > That will resolve the weird encoding on filenames. Will work to get that change merged. I think it has side effects which is why it has sat out so long I am not mean the file name not encoding, i mean the source contents not encoding, it should be chinese. but currently, showing some strange things.
yindo changed title from still can not create first workspace to [GH-ISSUE #272] still can not create first workspace 2026-06-05 14:33:48 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#162