Skip to content
ParticleDB
Release candidateParticleDB 1.1.19-rc.17 is not yet GA or ready for production data.Release status →

Tables, indexes and schema changes

Create application tables and indexes, then evolve their schema.

CREATE TABLE docs_schema_tasks (id BIGINT PRIMARY KEY, status TEXT);
CREATE INDEX docs_schema_tasks_status ON docs_schema_tasks (status);
ALTER TABLE docs_schema_tasks ADD COLUMN title TEXT;
INSERT INTO docs_schema_tasks VALUES (1, 'pending', 'Review');
SELECT id, status, title FROM docs_schema_tasks;

Schema changes affect application queries and clients. Test migrations on representative data and plan a recovery path. Use IF EXISTS or IF NOT EXISTS only when the intended result is unambiguous. Check transactional DDL support for the exact command rather than assuming every schema change rolls back.

SQL reference · Application guide · Troubleshooting