-
Notifications
You must be signed in to change notification settings - Fork 301
Full schema #2676
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Full schema #2676
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
71ec642
full-schema
LauraDuRy 575b67e
Add files via upload
LauraDuRy 67e7bd5
Create 2025-12-29
LauraDuRy 1b05631
Update +page.markdoc
LauraDuRy 56c1140
Apply suggestions from code review
LauraDuRy b876a6a
Update and rename 2025-12-29 to 2025-12-30
LauraDuRy b514b08
Add example code for Full Schema Creation
adityaoberai 5d9f7b8
Update author role and correct Twitter link for Aditya Oberai
adityaoberai 55ec8b5
optimize cover image asset
adityaoberai File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
135 changes: 135 additions & 0 deletions
135
src/routes/blog/post/announcing-full-schema-creation/+page.markdoc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,135 @@ | ||
| --- | ||
| layout: post | ||
| title: "Announcing Full Schema Creation: Provision complete tables in one atomic call" | ||
| description: Create a table, all its columns, and indexes synchronously, ready to use instantly, with no background jobs. | ||
| date: 2025-12-30 | ||
| cover: /images/blog/full-schema.png | ||
| timeToRead: 5 | ||
| author: aditya-oberai | ||
| category: announcement | ||
| featured: false | ||
| callToAction: true | ||
| --- | ||
|
|
||
| When you’re spinning up a new feature, environment, or test pipeline, schema creation shouldn’t be the slowest or most fragile step in your workflow. Yet traditionally, creating a usable table meant orchestrating multiple calls, waiting on async jobs, and hoping nothing failed halfway through. | ||
|
|
||
| That’s exactly why we’re announcing **Full Schema Creation** for Appwrite Databases. | ||
|
|
||
| With Full Schema Creation, you can define an entire table, its attributes and indexes, in a **single, synchronous request**. When the call returns, the table is immediately ready for reads and writes. If anything fails along the way, nothing is created. No partial schemas. No waiting. No brittle setup scripts. | ||
|
|
||
| # One request. One outcome. Fully usable. | ||
|
|
||
| Previously, schema provisioning looked something like this: | ||
|
|
||
| 1. Create a table | ||
| 2. Create column | ||
| 3. Wait for async column jobs to complete | ||
| 4. Create indexes | ||
| 5. Wait again | ||
| 6. Finally, the table might be usable | ||
|
|
||
| This step-wise flow introduced delays, race conditions in automation scripts, and fragile deploys, especially in CI/CD, preview environments, and migrations. | ||
|
|
||
| With Full Schema Creation, all of that collapses into a single operation. You define everything upfront, Appwrite validates it all together, and either the entire schema is created successfully, or nothing is. | ||
|
|
||
| ```js | ||
| const table = await tablesDB.createTable({ | ||
| databaseId: 'contacts_db', | ||
| tableId: 'contacts', | ||
| name: 'Contacts', | ||
| columns: [ | ||
| { | ||
| key: 'email', | ||
| type: 'email', | ||
| required: true | ||
| }, | ||
| { | ||
| key: 'name', | ||
| type: 'string', | ||
| size: 255, | ||
| required: true | ||
| }, | ||
| { | ||
| key: 'is_active', | ||
| type: 'boolean', | ||
| required: true | ||
| }, | ||
| ], | ||
| indexes: [ | ||
| { | ||
| key: 'idx_email', | ||
| type: 'unique', | ||
| attributes: ['email'] | ||
| } | ||
| ] | ||
| }); | ||
| ``` | ||
|
|
||
| # How it works | ||
|
|
||
| Full Schema Creation introduces an atomic, synchronous way to provision database schemas. Here’s what happens under the hood: | ||
|
|
||
| - **Define the full schema in one call** | ||
|
|
||
| In a single API request, you define: | ||
|
|
||
| - The table | ||
| - All columns (type, length, nullability, defaults, enums, relationships) | ||
| - All indexes | ||
|
|
||
| - **Synchronous apply** | ||
|
|
||
| Appwrite applies the schema immediately. The request only returns once the table is fully created and ready to read and write, without any background jobs, polling, or delays. | ||
|
|
||
| - **Atomic guarantees** | ||
|
|
||
| If any part of the schema fails validation, an invalid column, a conflicting index, or a broken relationship reference, the entire operation is rolled back. You’ll never end up with a half-created table. | ||
|
|
||
| This makes schema creation deterministic, predictable, and safe, making it ideal for automation-heavy workflows and rapid iteration. | ||
|
|
||
| # What this unlocks for you | ||
|
|
||
| - **One-shot setup:** Define a complete table in a single, atomic call. | ||
| - **No async waiting:** The table is usable as soon as the API responds. | ||
| - **Fewer moving parts:** Less orchestration means fewer retries and fewer failures. | ||
| - **Deterministic CI/CD:** Reliable schema bootstrapping for tests, previews, and pipelines. | ||
| - **Instant readiness:** Seed data and run integration tests immediately after creation. | ||
|
|
||
| # Built for teams that move fast | ||
|
|
||
| Full Schema Creation was designed with: | ||
|
|
||
| - Backend and platform engineers | ||
| - CI/CD pipelines and test environments | ||
| - Agencies and partners are shipping reusable templates | ||
| - Teams are spinning up many short-lived environments | ||
|
|
||
| If your workflow depends on fast and repeatable schema provisioning, this feature eliminates an entire class of setup problems. | ||
|
|
||
| ## Why this matters for Appwrite | ||
|
|
||
| From our side, Full Schema Creation significantly reduces time-to-first-write, helping users activate faster and ship sooner. It also eliminates a common source of schema-related support issues by making database setup simpler, safer, and more predictable. | ||
|
|
||
| # Familiar, but better | ||
|
|
||
| If this sounds familiar, that’s because similar ideas exist elsewhere: | ||
|
|
||
| - SQL databases with `CREATE TABLE` + `CREATE INDEX` in one statement | ||
| - Prisma or Drizzle migrations | ||
| - Hasura metadata applies | ||
|
|
||
| What’s different is bringing this experience directly into a BaaS environment—where schema creation has historically been UI-driven or step-wise and async. | ||
|
|
||
| # Get started | ||
|
|
||
| Full Schema Create is available on **Appwrite Cloud** today and supported on **self-hosted deployments.** | ||
|
|
||
| You can now provision complete, production-ready tables in one call, whether you’re bootstrapping a new feature, running CI pipelines, or spinning up preview environments. | ||
|
|
||
| No more waiting. No more partial schemas. Just clean, atomic, ready-to-use tables from the moment you create them. | ||
|
|
||
| # More resources | ||
|
|
||
| - [Announcing API for spatial columns: Build scalable location-aware apps with ease](/blog/post/announcing-spatial-columns) | ||
| - [Announcing an improved Appwrite Databases experience. A completely new look and feel](/blog/post/announcing-appwrite-databases-new-ui) | ||
| - [Announcing Atomic numeric operations: Safe, server-side increments and decrements](/blog/post/announcing-atomic-numeric-operations) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| --- | ||
| layout: changelog | ||
| title: "Announcing Full Schema Creation: Provision complete tables in one atomic call" | ||
| date: 2025-12-30 | ||
| cover: /images/blog/full-schema.png | ||
| --- | ||
|
|
||
| Introducing a new Database feature called Full Schema Creation. | ||
|
|
||
| With Full Schema Creation, you can define an entire table, its attributes and indexes, in a single, synchronous request. When the call returns, the table is immediately ready for reads and writes. If anything fails along the way, nothing is created. No partial schemas. No waiting. No brittle setup scripts. | ||
|
|
||
| {% arrow_link href="/blog/post/announcing-full-schema-creation" %} | ||
| Read the full announcement | ||
| {% /arrow_link %} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.