Skip to content

Announcing Auto-increment support: Built-in numeric sequencing for your rows_

Get reliable, sequential ordering across your tables with fast, indexed auto-increment IDs.

5 min readUpdated Jun 29, 2026

Managing ordered data can often be complex and error-prone, especially when it requires manual counters or timestamp-based sorting, which can introduce inconsistencies and unpredictability.

To tackle this issue, we're introducing Auto-increment support.

This new feature automatically handles a $sequence column within your rows, incrementing reliably with each new insertion. This ensures your data remains ordered and clear without additional manual overhead.

Automatic, predictable ordering

Previously, maintaining consistent insertion order and generating numeric identifiers required either manual increments, complex logic, or dependence on timestamps, which weren't always accurate or reliable. Appwrite’s new Auto-increment support feature solves these issues seamlessly, providing a built-in numeric identifier that increases predictably with every new row added.

Whether you're creating paginated data sets, managing invoice numbers, logging activities, or building real-time feeds, Appwrite's Auto-increment support feature offers effortless numeric sequencing. This means less manual work, fewer bugs, and significantly improved reliability.

Tailored for backend systems

Auto-increment support is engineered explicitly for backend tasks that require consistent, deterministic identifiers such as sorting, pagination, and specialized sequencing. It's particularly suited to applications demanding precision, such as fintech solutions, logistics and shipping systems, invoicing and billing platforms, and comprehensive reporting and analytics tools.

Integrating Auto-increment support into your Appwrite Databases makes your backend development simpler and more intuitive.

Key advantages at a glance:

  • Automatically managed: No need to write custom logic or manually increment counters.
  • Strictly increasing: Each new entry receives a reliably sequential numeric identifier.
  • Fully indexed: Optimized for performance, allowing fast sorting and efficient querying.
  • Read-only protection: Safeguards against accidental modifications or tampering, preserving data integrity.

How it works

For numeric ordering based on insertion order, you can use the $sequence field, which Appwrite automatically adds to all rows. This field increments with each new insert.

JavaScript
import { Client, TablesDB, Query } from "appwrite";
const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1')
.setProject('<PROJECT_ID>');
const tablesDB = new TablesDB(client);
tablesDB.listRows({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
queries: [
Query.orderAsc('$sequence'),
]
});

Auto-increment support is available on both Appwrite Cloud and self-hosted installations and can smoothly integrate into your existing workflows.

More resources

Read next

Introducing Appwrite Explorer

Eldad Fux

Appwrite Explorer brings the Appwrite REST API into the Console. Browse every endpoint, build requests with guided forms, send live calls against your project, and inspect responses without leaving the browser.

8 min read

Introducing Appwrite Terminal

Eldad Fux

Appwrite Terminal runs the Appwrite CLI directly inside the Console. Your session and project context are preconfigured, with keyboard-first controls and multi-tab workflows, so you can inspect resources without leaving the project.

7 min read

Ready to build?_