Files
appwrite/docs/examples/1.7.x/console-web/examples/databases/create-integer-attribute.md
2025-05-20 11:50:36 +02:00

21 lines
576 B
Markdown

import { Client, Databases } from "@appwrite.io/console";
const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
const databases = new Databases(client);
const result = await databases.createIntegerAttribute(
'<DATABASE_ID>', // databaseId
'<COLLECTION_ID>', // collectionId
'', // key
false, // required
null, // min (optional)
null, // max (optional)
null, // default (optional)
false // array (optional)
);
console.log(result);