
Is it possible to automate or provide a template to setup a new Appwrite cloud database for a user?
Things I would need to automate or template include:
- Creating a DB
- Creating collections with specific attributes in that DB
Thanks! 🙂

Yes You'll need to use the database Server SDK, and then create your migration script Something like this for example:
const sdk = require('node-appwrite');
// Init SDK
const client = new sdk.Client();
const databases = new sdk.Databases(client);
client
.setEndpoint('https://cloud.appwrite.io/v1')
.setProject('5df5acd0d48c2')
.setKey('919c2d18fb5d4...a2ae413da83346ad2');
// Create Database
await databases.create('[DATABASE_ID]', '[NAME]');
// Create collection
await databases.createCollection('[DATABASE_ID]', '[COLLECTION_ID]', '[NAME]');
// Create string attribute
await databases.createStringAttribute('[DATABASE_ID]', '[COLLECTION_ID]', 'username', 1, false);
// Add index
await databases.createIndex('[DATABASE_ID]', '[COLLECTION_ID]', 'user', 'key', ['username']);

Take a look at the Server SDK here https://appwrite.io/docs/server/databases

Woohoo!!! Thank you so much @Binyamin this means my idea for the Hackathon is very possible

[SOLVED] Is there a way to automate setting up an Appwrite cloud database?
Recommended threads
- Creating a relationship with nested obje...
{ "data": { "name": "DiDi", "type": "Software Development", "userJobs": [{ "$id": "68cbf1e2003612fb13ca", "j...
- Realtime integration with SSR auth
Hey, I have a nextjs website with SSR auth, works great. I use a session client for user verification and an admin client with API key. Both is used with node-...
- Adding "name" column to table creates 2-...
As stated, im adding the "name" column to one table, it adds 4 duplicates. In another table it adds 3 duplicates, and when I delete 1 of them, all duplucates di...
