botserver/migrations/core/6.0.1/up.sql
Rodrigo Rodriguez (Pragmatismo) b103c07248 Fix migration errors and reorganize migration files
- Fixed 'relation session_kb_associations does not exist' error in core consolidated migration.
- Renamed migration directories from timestamp-based to version-based (6.0.x, 6.1.x, 6.2.x).
- Reorganized migrations into dedicated feature folders (products, dashboards, learn, video).
- Updated migration execution order in core/shared/utils.rs.
- Moves legacy migrations to 6.0.x/6.1.x and workflow to 6.2.0.
2026-01-27 13:45:54 -03:00

8 lines
470 B
SQL

ALTER TABLE bots ADD COLUMN IF NOT EXISTS database_name VARCHAR(255) NULL;
ALTER TABLE bots ADD COLUMN IF NOT EXISTS tenant_id UUID NULL;
CREATE INDEX IF NOT EXISTS idx_bots_database_name ON bots(database_name);
CREATE INDEX IF NOT EXISTS idx_bots_tenant_id ON bots(tenant_id);
COMMENT ON COLUMN bots.database_name IS 'Name of the PostgreSQL database for this bot (bot_{name})';
COMMENT ON COLUMN bots.tenant_id IS 'Tenant/organization ID for multi-tenant isolation';