Is it possible to created collection, attributes, indexes & config permission using script?
- 0
- Databases
- Tools
I have been Designing SQL DB schema, keeping in mind Relationship between each table. So, I ended-up with 30+ Tables (500+ lines) of SQL command to created each-table and indexes. I wonder, if is it possible to write a script which can be executed to created relevant collection if I feed attribute and it's data-type and indexes ?
cc @Steven
You mean something like this? https://appwrite.io/docs/server/databases?sdk=nodejs-default#databasesCreateCollection
You can check appwrite databases
using this CLI command it will show all the possible commands
You will get the some option like these and many more:
createCollection
createStringAttribute
createIndex
Not sure about config permission.
thank you, seems it will solve. Just that not sure about adding indexes & attributes... so far in the doc nothing seems be mentioned.
thank you π
seems it's script is kinda not possible.
umm, so like we have create script to write json and then feed json cli?
Or manually make the JSON file
πΆβπ«οΈ
that's alot time taking... I guess I will go with UX
It'd be copying and pasting each attribute but sure you can script whatever.
What do you mean you'll go with UX?
I mean UX interface app-write
The Appwrite Console?
yap I mean π
btw any example for push-notification?
@Steven getting erros while trying to trigger the function..
logs also doesn't help much
Best to create a new <#1072905050399191082> post
let me 1 min
Recommended threads
- Edit ID of an existing collection
Hi there. Is it possible to edit an ID of an existing collection? Right now it looks impossible from AppWrite cloud at least.
- Seed db
hello there... is this correct way to seed appwrite
- Query Appwrite
Hello, I have a question regarding Queries in Appwrite. If I have a string "YYYY-MM", how can I query the $createdAt column to match this filter?