#[SOLVED] Adding datetime attribute causes it to fail

12 messages · Page 1 of 1 (latest)

paper bronze
#

I am trying to add a datetime attribute, but every time I do it ends up failing pretty much instantly. I tried setting the default value and that made no difference. I am on appwrite 1.3.7

wooden granite
#

Can you run

docker logs appwrite

and

docker logs appwrite-worker-databases 
#

Then share the results?

#

Also, did you upgrade to this version from previous one? if so which?
Or you had a fresh start with 1.3.7?

paper bronze
#

Well I guess this is the reason for the error, I upgraded from the last major release which I think was 1.3

[Error] Timestamp: 2023-06-05T02:52:54+00:00
[Error] Method: PATCH
[Error] URL: /v1/databases/:databaseId/collections/:collectionId/attributes/datetime/:key
[Error] Type: Appwrite\Extend\Exception
[Error] Message: The requested attribute is not yet available. Please try again later.
[Error] File: /usr/src/code/app/controllers/api/databases.php
[Error] Line: 246
wooden granite
#

Can you delete that attribute
Then backup you server
Then run this in you Appwrite directory

docker compose exec appwrite migrate

And then try again?

paper bronze
#

i ended up recreating the appwrite server and it works now

wooden granite
#

Great

paper bronze
#

i never called migrate before, so it might have been the issue, i will find out when i upgrade my prod version haha

wooden granite
#

Hahah,
Yes, be sure to make a full Database backup before.

paper bronze
#

my prod server is empty, i only lost some test data on my dev server which is what had this issue, but i will be setting up a script to make backups for the future

#

when i setup my dev server i just used the docker command and not docker compose, so i had no idea how to create a backup. The guide i was looking at used docker-compose to backup the database