I'm migrating a Fastify/TypeScript backend to AppWrite.
I would like to know if it is a good practice to use functions to create the database structure.
Currently I'm not having a good experience with the Console. So I would like to know if it would be possible to use something like the image and then do the creation loop in main.
Future<dynamic> main(final context) async { final client = Client() .setEndpoint(Platform.environment['_APP_DOMAIN']!) .setProject(Platform.environment['PROJECT_ID']) .setKey(Platform.environment['API_KEY']);
final plans = Plans(Databases(client)); if (await plans.needCreate()) { await plans.create(); } }
You can use an Appwrite Function, but you can also just run this script locally using a server SDK
Thank you. I will try just run locally.
[SOLVED] Can I start the database by functions?
Recommended threads
- Possible to query rows that have a certa...
I have a one way relationship relating `VolunteerReport` to `User`. I then want to list all `VolunteerReport`s related to `User`. I don't think I can just que...
- How to access oldValue payload in functi...
I want to record old and new values of data changes as audits. But when i try to read row in function. The value is new already even before grt updated
- Issue: Getting 401 Unauthorized Error Wh...
Hi team, I'm encountering a 401 user_unauthorized error when trying to create a row in my projects table, even though I have full user permissions configured fo...