diff --git a/CLAUDE.md b/CLAUDE.md index d209ccd8b..e043b744e 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -7,7 +7,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co When working with frameworks in this project, reference the official LLM documentation: - **Next.js**: https://nextjs.org/docs/llms-full.txt -- **Payload CMS**: No official llms.txt yet (requested in [issue #13362](https://github.com/payloadcms/payload/issues/13362)) +- **Payload CMS**: https://payloadcms.com/llms-full.txt ### Payload CMS Source Reference diff --git a/__tests__/server/findDocumentsWithReferences.server.test.ts b/__tests__/server/findDocumentsWithReferences.server.test.ts new file mode 100644 index 000000000..1c0c5d0ff --- /dev/null +++ b/__tests__/server/findDocumentsWithReferences.server.test.ts @@ -0,0 +1,190 @@ +jest.mock('../../src/payload.config', () => ({})) + +jest.mock('@payloadcms/richtext-lexical', () => ({ + lexicalEditor: ({ features }: { features?: unknown }) => { + const resolvedFeatures = + typeof features === 'function' ? features({ rootFeatures: [] }) : (features ?? []) + return { features: resolvedFeatures } + }, + BlocksFeature: ({ blocks }: { blocks?: unknown[] }) => ({ + key: 'blocks', + serverFeatureProps: { blocks: blocks ?? [] }, + }), + FixedToolbarFeature: () => ({ key: 'fixedToolbar' }), + HeadingFeature: () => ({ key: 'heading' }), + HorizontalRuleFeature: () => ({ key: 'horizontalRule' }), + InlineToolbarFeature: () => ({ key: 'inlineToolbar' }), + AlignFeature: () => ({ key: 'align' }), + ParagraphFeature: () => ({ key: 'paragraph' }), + UnderlineFeature: () => ({ key: 'underline' }), + BoldFeature: () => ({ key: 'bold' }), + ItalicFeature: () => ({ key: 'italic' }), + LinkFeature: () => ({ key: 'link' }), +})) + +const mockFind = jest.fn() +const mockLogger = { warn: jest.fn() } + +import { Events } from '@/collections/Events' +import { HomePages } from '@/collections/HomePages' +import { Media } from '@/collections/Media' +import { Pages } from '@/collections/Pages' +import { Posts } from '@/collections/Posts' +import { Teams } from '@/collections/Teams' + +// Include a combination of routable collections with documentReferences fields and those without +const collectionsToTest = [Pages, Posts, HomePages, Events, Media, Teams] + +jest.mock('payload', () => ({ + getPayload: jest.fn(() => + Promise.resolve({ + find: (...args: unknown[]) => mockFind(...args), + logger: mockLogger, + config: { collections: collectionsToTest }, + }), + ), +})) + +import { findDocumentsWithReferences } from '@/utilities/findDocumentsWithReferences' + +beforeEach(() => { + mockFind.mockReset() + mockLogger.warn.mockReset() + mockFind.mockResolvedValue({ docs: [] }) +}) + +describe('findDocumentsWithReferences', () => { + it('queries only collections that have a documentReferences field', async () => { + await findDocumentsWithReferences({ collection: 'sponsors', id: 1 }) + + expect(mockFind).toHaveBeenCalledTimes(4) + + const queriedCollections = mockFind.mock.calls.map( + (call: [{ collection: string }]) => call[0].collection, + ) + expect(queriedCollections).toEqual( + expect.arrayContaining(['pages', 'posts', 'homePages', 'events']), + ) + expect(queriedCollections).toHaveLength(4) + }) + + it('does not query collections without documentReferences field', async () => { + await findDocumentsWithReferences({ collection: 'media', id: 1 }) + + const queriedCollections = mockFind.mock.calls.map( + (call: [{ collection: string }]) => call[0].collection, + ) + expect(queriedCollections).not.toContain('media') + expect(queriedCollections).not.toContain('teams') + }) + + it('uses correct where clause with _status, collection, and docId', async () => { + await findDocumentsWithReferences({ collection: 'media', id: 42 }) + + for (const call of mockFind.mock.calls) { + const { where, depth } = call[0] + expect(where).toEqual({ + and: [ + { _status: { equals: 'published' } }, + { 'documentReferences.collection': { equals: 'media' } }, + { 'documentReferences.docId': { equals: 42 } }, + ], + }) + expect(depth).toBe(1) + } + }) + + it('returns single match in one collection', async () => { + mockFind.mockImplementation(({ collection }: { collection: string }) => { + if (collection === 'posts') { + return { docs: [{ id: 10, slug: 'my-post', tenant: 1 }] } + } + return { docs: [] } + }) + + const results = await findDocumentsWithReferences({ collection: 'sponsors', id: 5 }) + + expect(results).toEqual([{ collection: 'posts', id: 10, slug: 'my-post', tenant: 1 }]) + }) + + it('returns multiple matches across collections', async () => { + mockFind.mockImplementation(({ collection }: { collection: string }) => { + if (collection === 'pages') { + return { + docs: [ + { id: 1, slug: 'about', tenant: 1 }, + { id: 2, slug: 'supporters', tenant: 2 }, + ], + } + } + if (collection === 'events') { + return { docs: [{ id: 20, slug: 'winter-event', tenant: 1 }] } + } + return { docs: [] } + }) + + const results = await findDocumentsWithReferences({ collection: 'teams', id: 3 }) + + expect(results).toContainEqual({ collection: 'pages', id: 1, slug: 'about', tenant: 1 }) + expect(results).toContainEqual({ collection: 'pages', id: 2, slug: 'supporters', tenant: 2 }) + expect(results).toContainEqual({ + collection: 'events', + id: 20, + slug: 'winter-event', + tenant: 1, + }) + expect(results).toHaveLength(3) + }) + + it('returns empty array when no matches', async () => { + const results = await findDocumentsWithReferences({ collection: 'tags', id: 99 }) + expect(results).toEqual([]) + }) + + it('uses empty slug for collections without a slug field (e.g. homePages)', async () => { + mockFind.mockImplementation(({ collection }: { collection: string }) => { + if (collection === 'homePages') { + return { docs: [{ id: 5, tenant: 1 }] } + } + return { docs: [] } + }) + + const results = await findDocumentsWithReferences({ collection: 'media', id: 7 }) + + expect(results).toEqual([{ collection: 'homePages', id: 5, slug: '', tenant: 1 }]) + }) + + it('preserves tenant object when populated', async () => { + mockFind.mockImplementation(({ collection }: { collection: string }) => { + if (collection === 'pages') { + return { docs: [{ id: 1, slug: 'about', tenant: { id: 1, slug: 'nwac' } }] } + } + return { docs: [] } + }) + + const results = await findDocumentsWithReferences({ collection: 'media', id: 10 }) + + expect(results).toEqual([ + { collection: 'pages', id: 1, slug: 'about', tenant: { id: 1, slug: 'nwac' } }, + ]) + }) + + it('logs warning and continues on query error', async () => { + mockFind.mockImplementation(({ collection }: { collection: string }) => { + if (collection === 'pages') { + throw new Error('DB connection failed') + } + if (collection === 'posts') { + return { docs: [{ id: 10, slug: 'my-post', tenant: 1 }] } + } + return { docs: [] } + }) + + const results = await findDocumentsWithReferences({ collection: 'sponsors', id: 1 }) + + expect(mockLogger.warn).toHaveBeenCalledTimes(1) + expect(mockLogger.warn).toHaveBeenCalledWith(expect.stringContaining('Error querying pages')) + // Still returns results from other collections + expect(results).toContainEqual({ collection: 'posts', id: 10, slug: 'my-post', tenant: 1 }) + }) +}) diff --git a/__tests__/server/revalidateDocument.server.test.ts b/__tests__/server/revalidateDocument.server.test.ts new file mode 100644 index 000000000..9ce72eb24 --- /dev/null +++ b/__tests__/server/revalidateDocument.server.test.ts @@ -0,0 +1,113 @@ +jest.mock('../../src/payload.config', () => ({})) + +const mockLogger = { info: jest.fn(), warn: jest.fn() } +const mockPayload = { logger: mockLogger } + +jest.mock('payload', () => ({ + getPayload: jest.fn(() => Promise.resolve(mockPayload)), +})) + +const mockRevalidatePath = jest.fn() +jest.mock('next/cache', () => ({ + revalidatePath: (...args: unknown[]) => mockRevalidatePath(...args), +})) + +const mockResolveTenant = jest.fn() +jest.mock('../../src/utilities/tenancy/resolveTenant', () => ({ + resolveTenant: (...args: unknown[]) => mockResolveTenant(...args), +})) + +const mockGetCachedTopLevelNavItems = jest.fn() +jest.mock('../../src/components/Header/utils', () => ({ + getCachedTopLevelNavItems: (...args: unknown[]) => mockGetCachedTopLevelNavItems(...args), + getNavigationPathForSlug: () => [], +})) + +import { revalidateDocument } from '@/utilities/revalidateDocument' + +beforeEach(() => { + mockRevalidatePath.mockReset() + mockResolveTenant.mockReset() + mockGetCachedTopLevelNavItems.mockReset() + mockLogger.info.mockReset() + mockLogger.warn.mockReset() + + mockResolveTenant.mockResolvedValue({ id: 1, slug: 'nwac' }) + mockGetCachedTopLevelNavItems.mockReturnValue(() => Promise.resolve({ topLevelNavItems: [] })) +}) + +describe('revalidateDocument', () => { + // Cycle safety: revalidateDocument must only call revalidatePath(), never + // payload.update/create/delete. Otherwise circular references (A → B → A) + // would cause infinite loops through afterChange hooks. + it('only invalidates Next.js cache — never triggers Payload write operations', async () => { + const postB = { collection: 'posts', id: 10, slug: 'post-b', tenant: 1 } + + await revalidateDocument(postB) + + expect(mockRevalidatePath).toHaveBeenCalled() + expect(mockPayload).not.toHaveProperty('update') + expect(mockPayload).not.toHaveProperty('create') + expect(mockPayload).not.toHaveProperty('delete') + }) + + it('revalidates correct paths for pages', async () => { + const page = { collection: 'pages', id: 1, slug: 'about', tenant: 1 } + + await revalidateDocument(page) + + expect(mockRevalidatePath).toHaveBeenCalledWith('/about') + expect(mockRevalidatePath).toHaveBeenCalledWith('/nwac/about') + }) + + it('revalidates correct paths for posts', async () => { + const post = { collection: 'posts', id: 10, slug: 'my-post', tenant: 1 } + + await revalidateDocument(post) + + expect(mockRevalidatePath).toHaveBeenCalledWith('/blog/my-post') + expect(mockRevalidatePath).toHaveBeenCalledWith('/nwac/blog/my-post') + }) + + it('revalidates correct paths for homePages', async () => { + const homePage = { collection: 'homePages', id: 1, slug: '', tenant: 1 } + + await revalidateDocument(homePage) + + expect(mockRevalidatePath).toHaveBeenCalledWith('/') + expect(mockRevalidatePath).toHaveBeenCalledWith('/nwac') + }) + + it('revalidates correct paths for events', async () => { + const event = { collection: 'events', id: 5, slug: 'winter-summit', tenant: 1 } + + await revalidateDocument(event) + + expect(mockRevalidatePath).toHaveBeenCalledWith('/events/winter-summit') + expect(mockRevalidatePath).toHaveBeenCalledWith('/nwac/events/winter-summit') + }) + + it('logs a warning for unrecognized collection types', async () => { + const doc = { collection: 'unknownCollection', id: 1, slug: 'test', tenant: 1 } + + await revalidateDocument(doc) + + expect(mockRevalidatePath).not.toHaveBeenCalled() + expect(mockLogger.warn).toHaveBeenCalledWith( + expect.stringContaining("no path mapping for collection 'unknownCollection'"), + ) + }) + + it('handles tenant resolution failure gracefully', async () => { + mockResolveTenant.mockRejectedValue(new Error('Tenant not found')) + + const page = { collection: 'pages', id: 1, slug: 'about', tenant: 999 } + + await revalidateDocument(page) + + expect(mockRevalidatePath).not.toHaveBeenCalled() + expect(mockLogger.warn).toHaveBeenCalledWith( + expect.stringContaining('Failed to resolve tenant'), + ) + }) +}) diff --git a/__tests__/server/revalidateDocumentReferences.server.test.ts b/__tests__/server/revalidateDocumentReferences.server.test.ts new file mode 100644 index 000000000..f314276f1 --- /dev/null +++ b/__tests__/server/revalidateDocumentReferences.server.test.ts @@ -0,0 +1,107 @@ +jest.mock('../../src/payload.config', () => ({})) + +const mockLogger = { info: jest.fn(), error: jest.fn() } + +jest.mock('payload', () => ({ + getPayload: jest.fn(() => Promise.resolve({ logger: mockLogger })), +})) + +const mockFindDocumentsWithReferences = jest.fn() +jest.mock('../../src/utilities/findDocumentsWithReferences', () => ({ + findDocumentsWithReferences: (...args: unknown[]) => mockFindDocumentsWithReferences(...args), +})) + +const mockRevalidateDocument = jest.fn() +jest.mock('../../src/utilities/revalidateDocument', () => ({ + revalidateDocument: (...args: unknown[]) => mockRevalidateDocument(...args), +})) + +import { revalidateDocumentReferences } from '@/utilities/revalidateDocumentReferences' + +beforeEach(() => { + mockFindDocumentsWithReferences.mockReset() + mockRevalidateDocument.mockReset() + mockLogger.info.mockReset() + mockLogger.error.mockReset() + mockFindDocumentsWithReferences.mockResolvedValue([]) + mockRevalidateDocument.mockResolvedValue(undefined) +}) + +describe('revalidateDocumentReferences', () => { + it('passes reference to findDocumentsWithReferences unchanged', async () => { + const reference = { collection: 'media' as const, id: 42 } + + await revalidateDocumentReferences(reference) + + expect(mockFindDocumentsWithReferences).toHaveBeenCalledWith(reference) + }) + + it('calls revalidateDocument for each found document', async () => { + const docs = [ + { collection: 'pages', id: 1, slug: 'about', tenant: 1 }, + { collection: 'posts', id: 10, slug: 'my-post', tenant: 2 }, + { collection: 'events', id: 20, slug: 'winter-event', tenant: 1 }, + ] + mockFindDocumentsWithReferences.mockResolvedValue(docs) + + await revalidateDocumentReferences({ collection: 'sponsors' as const, id: 5 }) + + expect(mockRevalidateDocument).toHaveBeenCalledTimes(3) + expect(mockRevalidateDocument).toHaveBeenCalledWith(docs[0]) + expect(mockRevalidateDocument).toHaveBeenCalledWith(docs[1]) + expect(mockRevalidateDocument).toHaveBeenCalledWith(docs[2]) + }) + + it('does not call revalidateDocument when no documents found', async () => { + await revalidateDocumentReferences({ collection: 'tags' as const, id: 99 }) + + expect(mockRevalidateDocument).not.toHaveBeenCalled() + expect(mockLogger.error).not.toHaveBeenCalled() + }) + + it('logs start, count, and completion messages', async () => { + mockFindDocumentsWithReferences.mockResolvedValue([ + { collection: 'pages', id: 1, slug: 'about', tenant: 1 }, + ]) + + await revalidateDocumentReferences({ collection: 'media' as const, id: 7 }) + + expect(mockLogger.info).toHaveBeenCalledTimes(3) + expect(mockLogger.info).toHaveBeenCalledWith( + expect.stringContaining('Starting document reference revalidation for media ID 7'), + ) + expect(mockLogger.info).toHaveBeenCalledWith( + expect.stringContaining('Found 1 documents referencing media ID 7'), + ) + expect(mockLogger.info).toHaveBeenCalledWith( + expect.stringContaining('Completed document reference revalidation for media ID 7'), + ) + }) + + it('logs error and does not throw when findDocumentsWithReferences throws', async () => { + mockFindDocumentsWithReferences.mockRejectedValue(new Error('DB connection failed')) + + await expect( + revalidateDocumentReferences({ collection: 'sponsors' as const, id: 1 }), + ).resolves.toBeUndefined() + + expect(mockLogger.error).toHaveBeenCalledWith( + expect.stringContaining('Error during document reference revalidation for sponsors ID 1'), + ) + }) + + it('logs error and does not throw when revalidateDocument throws', async () => { + mockFindDocumentsWithReferences.mockResolvedValue([ + { collection: 'pages', id: 1, slug: 'about', tenant: 1 }, + ]) + mockRevalidateDocument.mockRejectedValue(new Error('Revalidation failed')) + + await expect( + revalidateDocumentReferences({ collection: 'teams' as const, id: 3 }), + ).resolves.toBeUndefined() + + expect(mockLogger.error).toHaveBeenCalledWith( + expect.stringContaining('Error during document reference revalidation for teams ID 3'), + ) + }) +}) diff --git a/docs/migration-safety.md b/docs/migration-safety.md index d1e16a3e8..38f95bb6e 100644 --- a/docs/migration-safety.md +++ b/docs/migration-safety.md @@ -55,6 +55,12 @@ Potentially dangerous patterns it detects: 7. If warnings appear in the pre-commit check: - Review the migration for potential data loss - Manually modify migration to ensure it runs without unintentional data loss + - If the migration will actually result in data loss, document it: + - Save the output of `pnpm migrate:diff` as a `.diff` file alongside the migration (e.g., `{timestamp}_{name}.diff`) + - Write an `_explanation.md` file (e.g., `{timestamp}_{name}_explanation.md`) with these sections: + - **"## Actual changes in JSON snapshots"** — Brief list of affected tables/columns + - **"## What caused these changes"** — Technical explanation of why the schema changed + - **"## Conclusion"** — Explanation of migration safety: why the data loss is acceptable or how it was mitigated - Use `git commit --no-verify` if you're certain it's safe 8. Recommended: Test the migration locally using the instructions below diff --git a/docs/revalidation.md b/docs/revalidation.md index 0dfef8657..4a6c0837a 100644 --- a/docs/revalidation.md +++ b/docs/revalidation.md @@ -40,33 +40,16 @@ Central function for revalidating routable collections (currently pages, posts, **🧑‍💻 Code to update**: This function must be updated when new routable collections are added. Each new routable collection needs its URL pattern logic added here. -### `revalidateBlockReferences.ts` -Finds and revalidates all routable collections that contain a document through content blocks: -- Uses `findDocumentsWithBlockReferences()` to locate referencing documents -- Handles block-based relationships in layouts and content +### `revalidateDocumentReferences.ts` +Orchestrates the full reference revalidation flow: +- Uses `findDocumentsWithReferences()` to locate all documents that reference a given collection/ID - Calls `revalidateDocument()` for each found reference +- Replaces the old `revalidateBlockReferences` and `revalidateRelationshipReferences` utilities -### `revalidateRelationshipReferences.ts` -Finds and revalidates all routable collections that reference a document through relationship fields: -- Uses `findDocumentsWithRelationshipReferences()` to locate referencing documents -- Handles direct relationship field references -- Calls `revalidateDocument()` for each found reference - -### Reference Finders - -#### `findDocumentsWithBlockReferences.ts` -Queries routable collections for block-based references: -- **Pages**: Searches `layout.{fieldName}` for block references -- **Posts**: Searches `blocksInContent.collection` and `blocksInContent.docId` for embedded blocks -- **HomePages**: Searches `layout.{fieldName}` for block references -- **🧑‍💻 Code to update**: Must be updated when new routable collections are added - -#### `findDocumentsWithRelationshipReferences.ts` -Queries routable collections for relationship field references: -- Uses configuration mappings to identify relationship fields -- Searches all routable collections (currently pages, posts, and homePages) -- Only includes published documents (or all documents for homePages which don't have draft status) -- **🧑‍💻 Code to update**: Configuration mappings must include new routable collections +### `findDocumentsWithReferences.ts` +Queries the `documentReferences` JSON field across all collections that have it: +- Auto-discovers which collections have a `documentReferences` field from the Payload config +- No hardcoded collection lists — adding `documentReferencesField()` to a new collection is sufficient ## Collection Patterns @@ -82,20 +65,20 @@ Collections that generate frontend routes implement comprehensive revalidation: #### Posts (`src/collections/Posts/hooks/revalidatePost.ts`) - **Path revalidation**: `/blog/{slug}` and `/{center}/blog/{slug}` - **Tag revalidation**: `posts-sitemap-{center}`, `navigation-{center}` -- **Reference revalidation**: Calls both `revalidateBlockReferences()` and `revalidateRelationshipReferences()` +- **Reference revalidation**: Calls `revalidateDocumentReferences()` - **Previous version handling**: Handles slug changes and status changes #### HomePages (`src/collections/HomePages/hooks/revalidateHomePage.ts`) - **Path revalidation**: `/` and `/{center}/` (affects home page routes) - **Tag revalidation**: `navigation-{center}` -- **Reference revalidation**: Calls both `revalidateBlockReferences()` and `revalidateRelationshipReferences()` +- **Reference revalidation**: Calls `revalidateDocumentReferences()` - **Special considerations**: No slugs (affects root paths), no draft status handling needed ### Reference Collections (Media, Teams, Biographies, etc.) Collections that are referenced by routable collections but don't have their own frontend routes: #### Media (`src/collections/Media/hooks/revalidateMedia.ts`) -- Only calls `revalidateBlockReferences()` and `revalidateRelationshipReferences()` +- Only calls `revalidateDocumentReferences()` - No direct path revalidation (reference collections don't generate routes) #### Teams, Biographies, Tags @@ -106,110 +89,24 @@ Similar pattern to Media - only reference-based revalidation since they're refer - **Path revalidation**: Specific widget-using pages with Next.js page-level revalidation - **Tag revalidation**: `global_nacWidgetsConfig` for cached global data -## Tracking Blocks in Rich Text Fields - -Some collections use Lexical rich text editors that support inline blocks. When blocks in rich text fields reference other collections, those references must be tracked to enable proper revalidation. - -### Implementation Pattern - -The tracking system consists of three components: - -1. **Tracking Field**: A hidden array field that stores block references -2. **Population Hook**: A `beforeChange` hook that extracts block references from the Lexical AST -3. **Query Support**: Updated finder utilities that query the tracking field - -### Current Implementations - -#### Posts Collection - -**Field**: `content` (Lexical richText) -**Tracking Field**: `blocksInContent` - -The Posts collection tracks blocks embedded in its main `content` field: - -```typescript -{ - name: 'blocksInContent', - type: 'array', - admin: { - readOnly: true, - }, - fields: [ - { name: 'blockType', type: 'text' }, - { name: 'collection', type: 'text' }, - { name: 'docId', type: 'number' }, - ], -} -``` - -The `populateBlocksInContent` hook (in `src/collections/Posts/hooks/populateBlocksInContent.ts`) walks the Lexical AST to extract block references and stores them in `blocksInContent` before the document is saved. - -#### HomePages Collection - -**Field**: `highlightedContent.columns[].richText` (nested Lexical richText) -**Tracking Field**: `blocksInHighlightedContent` - -The HomePages collection tracks blocks embedded in the `highlightedContent.columns[].richText` fields: - -```typescript -{ - name: 'blocksInHighlightedContent', - type: 'array', - admin: { - readOnly: true, - description: 'Automatically populated field tracking block references in highlightedContent for revalidation purposes.', - }, - fields: [ - { name: 'blockType', type: 'text' }, - { name: 'collection', type: 'text' }, - { name: 'docId', type: 'number' }, - ], -} -``` - -The `populateBlocksInHighlightedContent` hook (in `src/collections/HomePages/hooks/populateBlocksInHighlightedContent.ts`) iterates through all columns and extracts block references from each richText field. - -### Adding Block Tracking to New Collections - -When adding a new collection with richText fields that support blocks: - -1. **Add a tracking field** to the collection schema (similar to `blocksInContent`) -2. **Create a population hook** that: - - Extracts block references from the Lexical AST - - Uses `getBlocksFromConfig()` to get block mappings - - Returns the document with populated tracking field -3. **Update `getBlocksFromConfig.ts`**: - - Add logic to extract blocks from the new richText field(s) - - Return new block mappings in the return object -4. **Update `findDocumentsWithBlockReferences.ts`**: - - Add query logic to search the new tracking field - - Follow the pattern used for Posts (efficient direct query) - -### Example Hook Structure - -```typescript -export const populateBlocksInField: CollectionBeforeChangeHook = async ({ - data, - req, -}) => { - let blocksInField: BlockReference[] = [] - - if (data.yourRichTextField) { - try { - const blockReferences = await extractBlockReferencesFromLexical(data.yourRichTextField) - blocksInField = blockReferences - } catch (error) { - req.payload.logger.warn(`Error extracting block references: ${error}`) - blocksInField = [] - } - } - - return { - ...data, - blocksInField, - } -} -``` +## Reference Tracking + +The unified reference tracking system automatically discovers all relationship and block references in any collection's data at save time. This replaces the old per-collection tracking fields (`blocksInContent`, `blocksInHighlightedContent`) and per-collection finder utilities. + +### How It Works + +1. **`extractDocumentReferences`** (`src/utilities/extractDocumentReferences.ts`) — Config-driven extraction that walks all relationship fields, upload fields, and Lexical block references in a document. Uses the Payload collection config to discover fields automatically. +2. **`populateDocumentReferences`** (`src/hooks/populateDocumentReferences.ts`) — A `beforeChange` hook that calls `extractDocumentReferences` and stores references in the `documentReferences` JSON field, but only when the content hash changes. +3. **`findDocumentsWithReferences`** (`src/utilities/findDocumentsWithReferences.ts`) — Queries the `documentReferences` JSON field across all routable collections to find documents that reference a given collection/ID pair. +4. **`revalidateDocumentReferences`** (`src/utilities/revalidateDocumentReferences.ts`) — Orchestrates the full revalidation flow: finds referencing documents, then revalidates their paths and tags. + +### Adding Reference Tracking to New Collections + +Add three fields and one hook to any collection that needs reference tracking: + +1. Add `documentReferencesField()` to the collection's fields +2. Add `contentHashField()` to the collection's fields +3. Add `populateDocumentReferences` to the `beforeChange` hooks ## Caching Integration @@ -240,8 +137,7 @@ Collections that don't have frontend routes but are referenced by routable colle 1. **Only implement reference-based revalidation**: ```typescript - await revalidateBlockReferences({ collection: 'collectionName', id: docId }) - await revalidateRelationshipReferences({ collection: 'collectionName', id: docId }) + await revalidateDocumentReferences({ collection: 'collectionName', id: docId }) ``` 2. **No direct path revalidation** (they don't generate routes) @@ -262,10 +158,9 @@ Collections that generate frontend routes (currently Pages, Posts, HomePages, fu When adding a new collection that will have frontend routes: 1. **Update `revalidateDocument.ts`** - Add URL pattern logic for the new collection -2. **Update finder utilities** - Include the new collection in block/relationship reference queries +2. **Add `documentReferencesField()`** and `populateDocumentReferences` hook to the collection 3. **Create collection-specific revalidation hooks** - Following the routable collection pattern -4. **Update configuration mappings** - Ensure the new collection is included in relationship mappings -5. **Consider navigation integration** - If the collection uses navigation-based routing +4. **Consider navigation integration** - If the collection uses navigation-based routing ### Multi-tenant Considerations - Always resolve tenant information for proper path construction @@ -275,41 +170,16 @@ When adding a new collection that will have frontend routes: ## Known Limitations -While our revalidation system handles most content changes automatically, there are some scenarios where on-demand revalidation cannot detect all references: - -### Deeply Nested RichText Fields in Blocks - -**Problem**: Blocks that contain richText fields (richText nested within blocks) are not automatically tracked by the revalidation system. - -**Example Scenario**: -- A Page has a `ContentBlock` in its `layout` -- That `ContentBlock` contains a richText field -- The richText field contains a `MediaBlock` that references a media document -- When the media document is updated, the Page won't be automatically revalidated - -**Why This Happens**: PayloadCMS field hooks don't fire for blocks within Lexical's BlocksFeature. See: https://github.com/payloadcms/payload/issues/14156 - -**Workaround**: Time-based revalidation serves as a safety net. Pages are revalidated periodically (every 10-15 minutes) regardless of content changes. - -**Possible Solutions** (not currently implemented): -1. Implement async background jobs that scan all routable collection documents for deeply nested relationships -2. Wait for PayloadCMS to add field hook support for Lexical block features - -### Impact on Time-Based Revalidation Settings - -Because of these limitations, we cannot set very long time-based revalidation periods. Current settings: +### Time-Based Revalidation Settings -- **Individual pages/posts/homePages**: 600 seconds (10 minutes) - Conservative safety net for deeply nested blocks -- **Blog list pages**: 600 seconds (10 minutes) - Not explicitly revalidated when posts change +On-demand revalidation handles most cache invalidation. Time-based revalidation (ISR) serves as a safety net for any edge cases not covered by reference tracking. Current setting: -These shorter intervals ensure that even deeply nested changes appear within a reasonable timeframe, at the cost of more serverless function invocations and CDN cache misses. +- **All routable pages**: 3600 seconds (1 hour) ### Best Practices -1. **Avoid deeply nesting richText fields** - Keep richText fields at the top level of collections when possible -2. **Implement explicit tracking** - For critical richText fields, follow the pattern in "Tracking Blocks in Rich Text Fields" -3. **Test revalidation behavior** - After adding new blocks or collections, verify that changes trigger proper revalidation -4. **Monitor cache behavior** - Use production builds locally (see README.md) to test ISR behavior +1. **Test revalidation behavior** - After adding new blocks or collections, verify that changes trigger proper revalidation +2. **Monitor cache behavior** - Use production builds locally (see README.md) to test ISR behavior ### Testing ISR Locally diff --git a/src/app/(frontend)/[center]/[...segments]/page.tsx b/src/app/(frontend)/[center]/[...segments]/page.tsx index 13b9f067e..7c8c27de4 100644 --- a/src/app/(frontend)/[center]/[...segments]/page.tsx +++ b/src/app/(frontend)/[center]/[...segments]/page.tsx @@ -13,7 +13,7 @@ import { normalizePath } from '@/utilities/path' import { resolveTenant } from '@/utilities/tenancy/resolveTenant' export const dynamic = 'force-static' -export const revalidate = 600 +export const revalidate = 3600 // Next.js requires a static literal here export async function generateStaticParams() { const payload = await getPayload({ config: configPromise }) diff --git a/src/app/(frontend)/[center]/[slug]/page.tsx b/src/app/(frontend)/[center]/[slug]/page.tsx index f3335f7d6..f03155633 100644 --- a/src/app/(frontend)/[center]/[slug]/page.tsx +++ b/src/app/(frontend)/[center]/[slug]/page.tsx @@ -15,7 +15,7 @@ import { generateMetaForPage } from '@/utilities/generateMeta' import { resolveTenant } from '@/utilities/tenancy/resolveTenant' export const dynamic = 'force-static' -export const revalidate = 600 +export const revalidate = 3600 // Next.js requires a static literal here export async function generateStaticParams() { const payload = await getPayload({ config: configPromise }) diff --git a/src/app/(frontend)/[center]/blog/[slug]/page.tsx b/src/app/(frontend)/[center]/blog/[slug]/page.tsx index dc194f373..5c2d28d67 100644 --- a/src/app/(frontend)/[center]/blog/[slug]/page.tsx +++ b/src/app/(frontend)/[center]/blog/[slug]/page.tsx @@ -12,7 +12,7 @@ import { generateMetaForPost } from '@/utilities/generateMeta' export const dynamic = 'force-static' export const dynamicParams = true -export const revalidate = 600 +export const revalidate = 3600 // Next.js requires a static literal here export async function generateStaticParams() { const payload = await getPayload({ config: configPromise }) diff --git a/src/app/(frontend)/[center]/events/[slug]/page.tsx b/src/app/(frontend)/[center]/events/[slug]/page.tsx index e69219f37..581b56de6 100644 --- a/src/app/(frontend)/[center]/events/[slug]/page.tsx +++ b/src/app/(frontend)/[center]/events/[slug]/page.tsx @@ -16,7 +16,7 @@ import { redirect } from 'next/navigation' export const dynamic = 'force-static' export const dynamicParams = true -export const revalidate = 600 +export const revalidate = 3600 // Next.js requires a static literal here export async function generateStaticParams() { const payload = await getPayload({ config: configPromise }) diff --git a/src/app/(frontend)/[center]/page.tsx b/src/app/(frontend)/[center]/page.tsx index 135f4449c..9bb065fa1 100644 --- a/src/app/(frontend)/[center]/page.tsx +++ b/src/app/(frontend)/[center]/page.tsx @@ -14,7 +14,7 @@ import { notFound } from 'next/navigation' import invariant from 'tiny-invariant' export const dynamic = 'force-static' -export const revalidate = 600 +export const revalidate = 3600 // Next.js requires a static literal here export const dynamicParams = true const HEIGHT_OF_DANGER_SCALE_GRAPHIC = 73.59 diff --git a/src/collections/Biographies/hooks/revalidateBiography.ts b/src/collections/Biographies/hooks/revalidateBiography.ts index 57bd779c2..9516aa932 100644 --- a/src/collections/Biographies/hooks/revalidateBiography.ts +++ b/src/collections/Biographies/hooks/revalidateBiography.ts @@ -3,46 +3,24 @@ import type { CollectionAfterChangeHook, CollectionAfterDeleteHook } from 'paylo import { getPayload } from 'payload' import type { Biography } from '@/payload-types' -import { revalidateBlockReferences } from '@/utilities/revalidateBlockReferences' -import { revalidateRelationshipReferences } from '@/utilities/revalidateRelationshipReferences' +import { revalidateDocumentReferences } from '@/utilities/revalidateDocumentReferences' async function revalidateBiographyWithCascading(biographyId: number) { const payload = await getPayload({ config: configPromise }) - const reference = { collection: 'biographies' as const, id: biographyId } - await revalidateBlockReferences(reference) - await revalidateRelationshipReferences(reference) + await revalidateDocumentReferences({ collection: 'biographies', id: biographyId }) try { - // Also revalidate teams that contain this biography (i.e. pages/posts with TeamBlocks) - payload.logger.info(`Checking for cascading team references for biography ID ${biographyId}`) - const teamsWithBiographyRes = await payload.find({ collection: 'teams', where: { - members: { equals: biographyId }, + members: { contains: biographyId }, }, depth: 0, }) - const teamsWithBiography = teamsWithBiographyRes.docs.map((team) => ({ - collection: 'teams', - id: team.id, - })) - - if (teamsWithBiography.length > 0) { - payload.logger.info( - `Found ${teamsWithBiography.length} teams containing biography ID ${biographyId}`, - ) - - for (const teamReference of teamsWithBiography) { - await revalidateBlockReferences({ - collection: 'teams', - id: teamReference.id, - }) - } - } else { - payload.logger.info(`No teams found containing biography ID ${biographyId}`) + for (const team of teamsWithBiographyRes.docs) { + await revalidateDocumentReferences({ collection: 'teams', id: team.id }) } } catch (error) { payload.logger.warn(`Error finding teams with biography member ${biographyId}: ${error}`) diff --git a/src/collections/Documents/hooks/revalidateDocuments.ts b/src/collections/Documents/hooks/revalidateDocuments.ts index 9ff86d679..8b65abc0d 100644 --- a/src/collections/Documents/hooks/revalidateDocuments.ts +++ b/src/collections/Documents/hooks/revalidateDocuments.ts @@ -1,13 +1,10 @@ import type { CollectionAfterChangeHook, CollectionAfterDeleteHook } from 'payload' import type { Document } from '@/payload-types' -import { revalidateBlockReferences } from '@/utilities/revalidateBlockReferences' -import { revalidateRelationshipReferences } from '@/utilities/revalidateRelationshipReferences' +import { revalidateDocumentReferences } from '@/utilities/revalidateDocumentReferences' async function revalidate(docId: number) { - const reference = { collection: 'documents' as const, id: docId } - await revalidateBlockReferences(reference) - await revalidateRelationshipReferences(reference) + await revalidateDocumentReferences({ collection: 'documents', id: docId }) } export const revalidateDocuments: CollectionAfterChangeHook = async ({ diff --git a/src/collections/Events/hooks/populateBlocksInContent.ts b/src/collections/Events/hooks/populateBlocksInContent.ts deleted file mode 100644 index 50958b5fc..000000000 --- a/src/collections/Events/hooks/populateBlocksInContent.ts +++ /dev/null @@ -1,29 +0,0 @@ -import type { CollectionBeforeChangeHook } from 'payload' - -import type { Event } from '@/payload-types' -import { - type BlockReference, - walkLexicalNodes, -} from '@/utilities/extractBlockReferencesFromLexical' -import { getBlocksFromConfig } from '@/utilities/getBlocksFromConfig' - -export const populateBlocksInContent: CollectionBeforeChangeHook = async ({ data, req }) => { - if (data._status === 'draft') return data - - let blocksInContent: BlockReference[] = [] - - if (data.content?.root?.children) { - try { - const { eventsBlockMappings } = await getBlocksFromConfig() - blocksInContent = walkLexicalNodes(data.content.root.children, eventsBlockMappings) - } catch (error) { - req.payload.logger.warn(`Error extracting block references: ${error}`) - blocksInContent = [] - } - } - - return { - ...data, - blocksInContent, - } -} diff --git a/src/collections/Events/hooks/revalidateEvent.ts b/src/collections/Events/hooks/revalidateEvent.ts index 0eb17ea88..b5ba45e0c 100644 --- a/src/collections/Events/hooks/revalidateEvent.ts +++ b/src/collections/Events/hooks/revalidateEvent.ts @@ -4,8 +4,7 @@ import { resolveTenant } from '@/utilities/tenancy/resolveTenant' import { revalidatePath } from 'next/cache' import type { Event } from '@/payload-types' -import { revalidateBlockReferences } from '@/utilities/revalidateBlockReferences' -import { revalidateRelationshipReferences } from '@/utilities/revalidateRelationshipReferences' +import { revalidateDocumentReferences } from '@/utilities/revalidateDocumentReferences' const revalidate = async ({ docId, @@ -26,15 +25,7 @@ const revalidate = async ({ revalidatePath(preRewritePath) revalidatePath(eventRewritePath) - await revalidateBlockReferences({ - collection: 'events', - id: docId, - }) - - await revalidateRelationshipReferences({ - collection: 'events', - id: docId, - }) + await revalidateDocumentReferences({ collection: 'events', id: docId }) } export const revalidateEvent: CollectionAfterChangeHook = async ({ diff --git a/src/collections/Events/index.ts b/src/collections/Events/index.ts index aae166729..9eb2dabc3 100644 --- a/src/collections/Events/index.ts +++ b/src/collections/Events/index.ts @@ -36,7 +36,6 @@ import { } from '@payloadcms/richtext-lexical' import { CollectionConfig, DateField, ValidateOptions } from 'payload' import { date } from 'payload/shared' -import { populateBlocksInContent } from './hooks/populateBlocksInContent' import { revalidateEvent, revalidateEventDelete } from './hooks/revalidateEvent' export const Events: CollectionConfig = { @@ -174,31 +173,6 @@ export const Events: CollectionConfig = { }, }), }, - // Hidden field to track blocks embedded in content for revalidation purposes - { - name: 'blocksInContent', - type: 'array', - access: { - update: () => false, - }, - admin: { - disabled: true, - }, - fields: [ - { - name: 'blockType', - type: 'text', - }, - { - name: 'collection', - type: 'text', - }, - { - name: 'docId', - type: 'number', - }, - ], - }, ], }, @@ -243,7 +217,7 @@ export const Events: CollectionConfig = { ], hooks: { beforeValidate: [validateEventDates], - beforeChange: [populatePublishedAt, populateBlocksInContent, populateDocumentReferences], + beforeChange: [populatePublishedAt, populateDocumentReferences], afterChange: [revalidateEvent], afterDelete: [revalidateEventDelete], }, diff --git a/src/collections/HomePages/hooks/populateBlocksInHighlightedContent.ts b/src/collections/HomePages/hooks/populateBlocksInHighlightedContent.ts deleted file mode 100644 index 206f5c8e7..000000000 --- a/src/collections/HomePages/hooks/populateBlocksInHighlightedContent.ts +++ /dev/null @@ -1,40 +0,0 @@ -import type { CollectionBeforeChangeHook } from 'payload' - -import type { HomePage } from '@/payload-types' -import { - type BlockReference, - walkLexicalNodes, -} from '@/utilities/extractBlockReferencesFromLexical' -import { getBlocksFromConfig } from '@/utilities/getBlocksFromConfig' - -export const populateBlocksInHighlightedContent: CollectionBeforeChangeHook = async ({ - data, - req, -}) => { - let blocksInHighlightedContent: BlockReference[] = [] - - if (data.highlightedContent?.columns && Array.isArray(data.highlightedContent.columns)) { - try { - const { homePagesHighlightedContentBlockMappings } = await getBlocksFromConfig() - - // Extract block references from all richText fields in columns - for (const column of data.highlightedContent.columns) { - if (column.richText?.root?.children) { - const blockReferences = walkLexicalNodes( - column.richText.root.children, - homePagesHighlightedContentBlockMappings, - ) - blocksInHighlightedContent.push(...blockReferences) - } - } - } catch (error) { - req.payload.logger.warn(`Error extracting block references from highlightedContent: ${error}`) - blocksInHighlightedContent = [] - } - } - - return { - ...data, - blocksInHighlightedContent, - } -} diff --git a/src/collections/HomePages/hooks/revalidateHomePage.ts b/src/collections/HomePages/hooks/revalidateHomePage.ts index c8da5488c..c3ed8f971 100644 --- a/src/collections/HomePages/hooks/revalidateHomePage.ts +++ b/src/collections/HomePages/hooks/revalidateHomePage.ts @@ -1,4 +1,5 @@ import type { HomePage } from '@/payload-types' +import { revalidateDocumentReferences } from '@/utilities/revalidateDocumentReferences' import { resolveTenant } from '@/utilities/tenancy/resolveTenant' import { revalidatePath, revalidateTag } from 'next/cache' import type { BasePayload, CollectionAfterChangeHook, CollectionAfterDeleteHook } from 'payload' @@ -32,6 +33,8 @@ export const revalidateHomePage: CollectionAfterChangeHook = async ({ payload.logger.info(`Revalidating tenant home page...`) await revalidate(doc, payload) + + await revalidateDocumentReferences({ collection: 'homePages', id: doc.id }) } export const revalidateHomePageDelete: CollectionAfterDeleteHook = async ({ @@ -42,4 +45,6 @@ export const revalidateHomePageDelete: CollectionAfterDeleteHook = asy payload.logger.info(`Revalidating tenant home page after delete...`) await revalidate(doc, payload) + + await revalidateDocumentReferences({ collection: 'homePages', id: doc.id }) } diff --git a/src/collections/HomePages/index.tsx b/src/collections/HomePages/index.tsx index dd727e6da..68e94a0aa 100644 --- a/src/collections/HomePages/index.tsx +++ b/src/collections/HomePages/index.tsx @@ -27,7 +27,6 @@ import { lexicalEditor, } from '@payloadcms/richtext-lexical' import { blocks } from 'payload/shared' -import { populateBlocksInHighlightedContent } from './hooks/populateBlocksInHighlightedContent' import { revalidateHomePage, revalidateHomePageDelete } from './hooks/revalidateHomePage' export const HomePages: CollectionConfig = { @@ -149,30 +148,6 @@ export const HomePages: CollectionConfig = { return blocks(value, args) }, }, - { - name: 'blocksInHighlightedContent', - type: 'array', - admin: { - readOnly: true, - disabled: true, - description: - 'Automatically populated field tracking block references in highlightedContent for revalidation purposes.', - }, - fields: [ - { - name: 'blockType', - type: 'text', - }, - { - name: 'collection', - type: 'text', - }, - { - name: 'docId', - type: 'number', - }, - ], - }, { name: 'publishedAt', type: 'date', @@ -185,11 +160,7 @@ export const HomePages: CollectionConfig = { ], hooks: { afterChange: [revalidateHomePage], - beforeChange: [ - populateBlocksInHighlightedContent, - populatePublishedAt, - populateDocumentReferences, - ], + beforeChange: [populatePublishedAt, populateDocumentReferences], afterDelete: [revalidateHomePageDelete], }, versions: { diff --git a/src/collections/Media/hooks/revalidateMedia.ts b/src/collections/Media/hooks/revalidateMedia.ts index f02a2fd26..a0eed174d 100644 --- a/src/collections/Media/hooks/revalidateMedia.ts +++ b/src/collections/Media/hooks/revalidateMedia.ts @@ -1,13 +1,10 @@ import type { CollectionAfterChangeHook, CollectionAfterDeleteHook } from 'payload' import type { Media } from '@/payload-types' -import { revalidateBlockReferences } from '@/utilities/revalidateBlockReferences' -import { revalidateRelationshipReferences } from '@/utilities/revalidateRelationshipReferences' +import { revalidateDocumentReferences } from '@/utilities/revalidateDocumentReferences' async function revalidate(docId: number) { - const reference = { collection: 'media' as const, id: docId } - await revalidateBlockReferences(reference) - await revalidateRelationshipReferences(reference) + await revalidateDocumentReferences({ collection: 'media', id: docId }) } export const revalidateMedia: CollectionAfterChangeHook = async ({ diff --git a/src/collections/Pages/hooks/revalidatePage.ts b/src/collections/Pages/hooks/revalidatePage.ts index 5f4d173d7..2372ce620 100644 --- a/src/collections/Pages/hooks/revalidatePage.ts +++ b/src/collections/Pages/hooks/revalidatePage.ts @@ -6,6 +6,7 @@ import { revalidatePath, revalidateTag } from 'next/cache' import type { Page } from '@/payload-types' import { normalizePath } from '@/utilities/path' +import { revalidateDocumentReferences } from '@/utilities/revalidateDocumentReferences' const revalidatePagePaths = async ({ slug, @@ -65,6 +66,8 @@ export const revalidatePage: CollectionAfterChangeHook = async ({ }) revalidatePageTags(tenant.slug) + + await revalidateDocumentReferences({ collection: 'pages', id: doc.id }) } // If the page was previously published, and it is no longer published or the slug has changed @@ -100,4 +103,6 @@ export const revalidatePageDelete: CollectionAfterDeleteHook = async ({ }) revalidatePageTags(tenant.slug) + + await revalidateDocumentReferences({ collection: 'pages', id: doc.id }) } diff --git a/src/collections/Posts/hooks/populateBlocksInContent.ts b/src/collections/Posts/hooks/populateBlocksInContent.ts deleted file mode 100644 index 2c777ca3a..000000000 --- a/src/collections/Posts/hooks/populateBlocksInContent.ts +++ /dev/null @@ -1,29 +0,0 @@ -import type { CollectionBeforeChangeHook } from 'payload' - -import type { Post } from '@/payload-types' -import { - type BlockReference, - walkLexicalNodes, -} from '@/utilities/extractBlockReferencesFromLexical' -import { getBlocksFromConfig } from '@/utilities/getBlocksFromConfig' - -export const populateBlocksInContent: CollectionBeforeChangeHook = async ({ data, req }) => { - if (data._status === 'draft') return data - - let blocksInContent: BlockReference[] = [] - - if (data.content?.root?.children) { - try { - const { postsBlockMappings } = await getBlocksFromConfig() - blocksInContent = walkLexicalNodes(data.content.root.children, postsBlockMappings) - } catch (error) { - req.payload.logger.warn(`Error extracting block references: ${error}`) - blocksInContent = [] - } - } - - return { - ...data, - blocksInContent, - } -} diff --git a/src/collections/Posts/hooks/revalidatePost.ts b/src/collections/Posts/hooks/revalidatePost.ts index 19550bbbb..656927989 100644 --- a/src/collections/Posts/hooks/revalidatePost.ts +++ b/src/collections/Posts/hooks/revalidatePost.ts @@ -4,8 +4,7 @@ import { resolveTenant } from '@/utilities/tenancy/resolveTenant' import { revalidatePath, revalidateTag } from 'next/cache' import type { Post } from '@/payload-types' -import { revalidateBlockReferences } from '@/utilities/revalidateBlockReferences' -import { revalidateRelationshipReferences } from '@/utilities/revalidateRelationshipReferences' +import { revalidateDocumentReferences } from '@/utilities/revalidateDocumentReferences' const revalidate = async ({ docId, @@ -28,15 +27,7 @@ const revalidate = async ({ revalidateTag(`posts-sitemap-${tenantSlug}`) revalidateTag(`navigation-${tenantSlug}`) - await revalidateBlockReferences({ - collection: 'posts', - id: docId, - }) - - await revalidateRelationshipReferences({ - collection: 'posts', - id: docId, - }) + await revalidateDocumentReferences({ collection: 'posts', id: docId }) } export const revalidatePost: CollectionAfterChangeHook = async ({ diff --git a/src/collections/Posts/index.ts b/src/collections/Posts/index.ts index 0ac2e8468..c35d5e057 100644 --- a/src/collections/Posts/index.ts +++ b/src/collections/Posts/index.ts @@ -25,7 +25,6 @@ import { populatePublishedAt } from '@/hooks/populatePublishedAt' import { getTenantAndIdFilter, getTenantFilter } from '@/utilities/collectionFilters' import { generatePreviewPath } from '@/utilities/generatePreviewPath' import { populateAuthors } from './hooks/populateAuthors' -import { populateBlocksInContent } from './hooks/populateBlocksInContent' import { revalidatePost, revalidatePostDelete } from './hooks/revalidatePost' import { accessByTenantRoleOrReadPublished } from '@/access/byTenantRoleOrReadPublished' @@ -199,38 +198,12 @@ export const Posts: CollectionConfig<'posts'> = { hasMany: true, relationTo: 'posts', }, - // Hidden field to track blocks embedded in content for revalidation purposes - { - name: 'blocksInContent', - type: 'array', - access: { - update: () => false, - }, - admin: { - disabled: true, - readOnly: true, - }, - fields: [ - { - name: 'blockType', - type: 'text', - }, - { - name: 'collection', - type: 'text', - }, - { - name: 'docId', - type: 'number', - }, - ], - }, slugField(), documentReferencesField(), contentHashField(), ], hooks: { - beforeChange: [populatePublishedAt, populateBlocksInContent, populateDocumentReferences], + beforeChange: [populatePublishedAt, populateDocumentReferences], afterChange: [revalidatePost], afterRead: [populateAuthors], afterDelete: [revalidatePostDelete], diff --git a/src/collections/Sponsors/hooks/revalidateSponsors.ts b/src/collections/Sponsors/hooks/revalidateSponsors.ts index 5125eddce..4a7f49582 100644 --- a/src/collections/Sponsors/hooks/revalidateSponsors.ts +++ b/src/collections/Sponsors/hooks/revalidateSponsors.ts @@ -1,13 +1,10 @@ import type { CollectionAfterChangeHook, CollectionAfterDeleteHook } from 'payload' import type { Sponsor } from '@/payload-types' -import { revalidateBlockReferences } from '@/utilities/revalidateBlockReferences' -import { revalidateRelationshipReferences } from '@/utilities/revalidateRelationshipReferences' +import { revalidateDocumentReferences } from '@/utilities/revalidateDocumentReferences' async function revalidate(docId: number) { - const reference = { collection: 'sponsors' as const, id: docId } - await revalidateBlockReferences(reference) - await revalidateRelationshipReferences(reference) + await revalidateDocumentReferences({ collection: 'sponsors', id: docId }) } export const revalidateSponsors: CollectionAfterChangeHook = async ({ diff --git a/src/collections/Tags/hooks/revalidateTag.ts b/src/collections/Tags/hooks/revalidateTag.ts index 9ff19d617..b617f31dc 100644 --- a/src/collections/Tags/hooks/revalidateTag.ts +++ b/src/collections/Tags/hooks/revalidateTag.ts @@ -1,13 +1,10 @@ import type { CollectionAfterChangeHook, CollectionAfterDeleteHook } from 'payload' import type { Tag } from '@/payload-types' -import { revalidateBlockReferences } from '@/utilities/revalidateBlockReferences' -import { revalidateRelationshipReferences } from '@/utilities/revalidateRelationshipReferences' +import { revalidateDocumentReferences } from '@/utilities/revalidateDocumentReferences' async function revalidate(docId: number) { - const reference = { collection: 'tags' as const, id: docId } - await revalidateBlockReferences(reference) - await revalidateRelationshipReferences(reference) + await revalidateDocumentReferences({ collection: 'tags', id: docId }) } export const revalidateTag: CollectionAfterChangeHook = async ({ doc, req: { context } }) => { diff --git a/src/collections/Teams/hooks/revalidateTeam.ts b/src/collections/Teams/hooks/revalidateTeam.ts index 4358c8e1d..e9afec15e 100644 --- a/src/collections/Teams/hooks/revalidateTeam.ts +++ b/src/collections/Teams/hooks/revalidateTeam.ts @@ -1,13 +1,10 @@ import type { CollectionAfterChangeHook, CollectionAfterDeleteHook } from 'payload' import type { Team } from '@/payload-types' -import { revalidateBlockReferences } from '@/utilities/revalidateBlockReferences' -import { revalidateRelationshipReferences } from '@/utilities/revalidateRelationshipReferences' +import { revalidateDocumentReferences } from '@/utilities/revalidateDocumentReferences' async function revalidate(docId: number) { - const reference = { collection: 'teams' as const, id: docId } - await revalidateBlockReferences(reference) - await revalidateRelationshipReferences(reference) + await revalidateDocumentReferences({ collection: 'teams', id: docId }) } export const revalidateTeam: CollectionAfterChangeHook = async ({ diff --git a/src/hooks/revalidateForm.ts b/src/hooks/revalidateForm.ts index 076cd23c5..3f84e2dad 100644 --- a/src/hooks/revalidateForm.ts +++ b/src/hooks/revalidateForm.ts @@ -1,12 +1,9 @@ import type { CollectionAfterChangeHook, CollectionAfterDeleteHook } from 'payload' -import { revalidateBlockReferences } from '@/utilities/revalidateBlockReferences' -import { revalidateRelationshipReferences } from '@/utilities/revalidateRelationshipReferences' +import { revalidateDocumentReferences } from '@/utilities/revalidateDocumentReferences' async function revalidate(docId: number) { - const reference = { collection: 'forms' as const, id: docId } - await revalidateBlockReferences(reference) - await revalidateRelationshipReferences(reference) + await revalidateDocumentReferences({ collection: 'forms', id: docId }) } export const revalidateForm: CollectionAfterChangeHook = async ({ doc, req: { context } }) => { diff --git a/src/migrations/20260414_034842_remove_old_block_tracking_fields.diff b/src/migrations/20260414_034842_remove_old_block_tracking_fields.diff new file mode 100644 index 000000000..8bcee6cd4 --- /dev/null +++ b/src/migrations/20260414_034842_remove_old_block_tracking_fields.diff @@ -0,0 +1,19 @@ +## Actual changes in JSON snapshots + +Drops 6 tables (3 tracking tables + their version tables): + +- `posts_blocks_in_content` / `_posts_v_version_blocks_in_content` +- `events_blocks_in_content` / `_events_v_version_blocks_in_content` +- `home_pages_blocks_in_highlighted_content` / `_home_pages_v_version_blocks_in_highlighted_content` + +## What caused these changes + +The old block-tracking system used per-collection array fields (`blocksInContent` on Posts/Events, `blocksInHighlightedContent` on HomePages) to track which blocks were embedded in Lexical rich text content. These fields were populated by `beforeChange` hooks (`populateBlocksInContent`, `populateBlocksInHighlightedContent`) that walked the Lexical AST at save time. + +This system has been fully replaced by the unified `documentReferences` JSON field and `populateDocumentReferences` hook, which automatically discovers all relationship, upload, and block references across any collection's fields using the Payload collection config. The unified system was introduced across commits `6b7ace80` through `6b2ee8d2` on the `unified-revalidation` branch. + +The old tracking fields, their population hooks, and their query utilities (`findDocumentsWithBlockReferences`, `findDocumentsWithRelationshipReferences`, `getBlocksFromConfig`, `getRelationshipsFromConfig`, `extractBlockReferencesFromLexical`, `revalidateBlockReferences`, `revalidateRelationshipReferences`) have all been removed. + +## Conclusion + +The data in these tables is safe to drop. It was only used for cache revalidation lookups (finding which documents reference a changed document). The same data is now stored in the `documentReferences` JSON field, which was backfilled in the prior migration (`20260414_030934_backfill_document_references`). No user-facing content is lost. diff --git a/src/migrations/20260414_034842_remove_old_block_tracking_fields.json b/src/migrations/20260414_034842_remove_old_block_tracking_fields.json new file mode 100644 index 000000000..98aa198e2 --- /dev/null +++ b/src/migrations/20260414_034842_remove_old_block_tracking_fields.json @@ -0,0 +1,22806 @@ +{ + "version": "6", + "dialect": "sqlite", + "tables": { + "home_pages_quick_links": { + "name": "home_pages_quick_links", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "type": { + "name": "type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'internal'" + }, + "new_tab": { + "name": "new_tab", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "url": { + "name": "url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "label": { + "name": "label", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "home_pages_quick_links_order_idx": { + "name": "home_pages_quick_links_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "home_pages_quick_links_parent_id_idx": { + "name": "home_pages_quick_links_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + } + }, + "foreignKeys": { + "home_pages_quick_links_parent_id_fk": { + "name": "home_pages_quick_links_parent_id_fk", + "tableFrom": "home_pages_quick_links", + "tableTo": "home_pages", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "home_pages_highlighted_content_columns": { + "name": "home_pages_highlighted_content_columns", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "rich_text": { + "name": "rich_text", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "home_pages_highlighted_content_columns_order_idx": { + "name": "home_pages_highlighted_content_columns_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "home_pages_highlighted_content_columns_parent_id_idx": { + "name": "home_pages_highlighted_content_columns_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + } + }, + "foreignKeys": { + "home_pages_highlighted_content_columns_parent_id_fk": { + "name": "home_pages_highlighted_content_columns_parent_id_fk", + "tableFrom": "home_pages_highlighted_content_columns", + "tableTo": "home_pages", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "home_pages_blocks_blog_list": { + "name": "home_pages_blocks_blog_list", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "heading": { + "name": "heading", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "below_heading_content": { + "name": "below_heading_content", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "background_color": { + "name": "background_color", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'transparent'" + }, + "post_options": { + "name": "post_options", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'dynamic'" + }, + "dynamic_options_sort_by": { + "name": "dynamic_options_sort_by", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'-publishedAt'" + }, + "dynamic_options_max_posts": { + "name": "dynamic_options_max_posts", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": 4 + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "home_pages_blocks_blog_list_order_idx": { + "name": "home_pages_blocks_blog_list_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "home_pages_blocks_blog_list_parent_id_idx": { + "name": "home_pages_blocks_blog_list_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "home_pages_blocks_blog_list_path_idx": { + "name": "home_pages_blocks_blog_list_path_idx", + "columns": ["_path"], + "isUnique": false + } + }, + "foreignKeys": { + "home_pages_blocks_blog_list_parent_id_fk": { + "name": "home_pages_blocks_blog_list_parent_id_fk", + "tableFrom": "home_pages_blocks_blog_list", + "tableTo": "home_pages", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "home_pages_blocks_content_columns": { + "name": "home_pages_blocks_content_columns", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "rich_text": { + "name": "rich_text", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'{\"root\":{\"type\":\"root\",\"format\":\"\",\"indent\":0,\"version\":1,\"children\":[{\"type\":\"paragraph\",\"format\":\"\",\"indent\":0,\"version\":1,\"children\":[],\"direction\":\"ltr\",\"textStyle\":\"\",\"textFormat\":0}],\"direction\":\"ltr\"}}'" + } + }, + "indexes": { + "home_pages_blocks_content_columns_order_idx": { + "name": "home_pages_blocks_content_columns_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "home_pages_blocks_content_columns_parent_id_idx": { + "name": "home_pages_blocks_content_columns_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + } + }, + "foreignKeys": { + "home_pages_blocks_content_columns_parent_id_fk": { + "name": "home_pages_blocks_content_columns_parent_id_fk", + "tableFrom": "home_pages_blocks_content_columns", + "tableTo": "home_pages_blocks_content", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "home_pages_blocks_content": { + "name": "home_pages_blocks_content", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "background_color": { + "name": "background_color", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'transparent'" + }, + "layout": { + "name": "layout", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'1_1'" + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "home_pages_blocks_content_order_idx": { + "name": "home_pages_blocks_content_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "home_pages_blocks_content_parent_id_idx": { + "name": "home_pages_blocks_content_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "home_pages_blocks_content_path_idx": { + "name": "home_pages_blocks_content_path_idx", + "columns": ["_path"], + "isUnique": false + } + }, + "foreignKeys": { + "home_pages_blocks_content_parent_id_fk": { + "name": "home_pages_blocks_content_parent_id_fk", + "tableFrom": "home_pages_blocks_content", + "tableTo": "home_pages", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "home_pages_blocks_document_block": { + "name": "home_pages_blocks_document_block", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "document_id": { + "name": "document_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "home_pages_blocks_document_block_order_idx": { + "name": "home_pages_blocks_document_block_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "home_pages_blocks_document_block_parent_id_idx": { + "name": "home_pages_blocks_document_block_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "home_pages_blocks_document_block_path_idx": { + "name": "home_pages_blocks_document_block_path_idx", + "columns": ["_path"], + "isUnique": false + }, + "home_pages_blocks_document_block_document_idx": { + "name": "home_pages_blocks_document_block_document_idx", + "columns": ["document_id"], + "isUnique": false + } + }, + "foreignKeys": { + "home_pages_blocks_document_block_document_id_documents_id_fk": { + "name": "home_pages_blocks_document_block_document_id_documents_id_fk", + "tableFrom": "home_pages_blocks_document_block", + "tableTo": "documents", + "columnsFrom": ["document_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "home_pages_blocks_document_block_parent_id_fk": { + "name": "home_pages_blocks_document_block_parent_id_fk", + "tableFrom": "home_pages_blocks_document_block", + "tableTo": "home_pages", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "home_pages_blocks_event_list_dynamic_opts_by_types": { + "name": "home_pages_blocks_event_list_dynamic_opts_by_types", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "parent_id": { + "name": "parent_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "value": { + "name": "value", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "home_pages_blocks_event_list_dynamic_opts_by_types_order_idx": { + "name": "home_pages_blocks_event_list_dynamic_opts_by_types_order_idx", + "columns": ["order"], + "isUnique": false + }, + "home_pages_blocks_event_list_dynamic_opts_by_types_parent_idx": { + "name": "home_pages_blocks_event_list_dynamic_opts_by_types_parent_idx", + "columns": ["parent_id"], + "isUnique": false + } + }, + "foreignKeys": { + "home_pages_blocks_event_list_dynamic_opts_by_types_parent_fk": { + "name": "home_pages_blocks_event_list_dynamic_opts_by_types_parent_fk", + "tableFrom": "home_pages_blocks_event_list_dynamic_opts_by_types", + "tableTo": "home_pages_blocks_event_list", + "columnsFrom": ["parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "home_pages_blocks_event_list": { + "name": "home_pages_blocks_event_list", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "background_color": { + "name": "background_color", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'transparent'" + }, + "heading": { + "name": "heading", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "below_heading_content": { + "name": "below_heading_content", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "event_options": { + "name": "event_options", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'dynamic'" + }, + "dynamic_opts_max_events": { + "name": "dynamic_opts_max_events", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": 4 + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "home_pages_blocks_event_list_order_idx": { + "name": "home_pages_blocks_event_list_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "home_pages_blocks_event_list_parent_id_idx": { + "name": "home_pages_blocks_event_list_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "home_pages_blocks_event_list_path_idx": { + "name": "home_pages_blocks_event_list_path_idx", + "columns": ["_path"], + "isUnique": false + } + }, + "foreignKeys": { + "home_pages_blocks_event_list_parent_id_fk": { + "name": "home_pages_blocks_event_list_parent_id_fk", + "tableFrom": "home_pages_blocks_event_list", + "tableTo": "home_pages", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "home_pages_blocks_event_table_dynamic_opts_by_types": { + "name": "home_pages_blocks_event_table_dynamic_opts_by_types", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "parent_id": { + "name": "parent_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "value": { + "name": "value", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "home_pages_blocks_event_table_dynamic_opts_by_types_order_idx": { + "name": "home_pages_blocks_event_table_dynamic_opts_by_types_order_idx", + "columns": ["order"], + "isUnique": false + }, + "home_pages_blocks_event_table_dynamic_opts_by_types_parent_idx": { + "name": "home_pages_blocks_event_table_dynamic_opts_by_types_parent_idx", + "columns": ["parent_id"], + "isUnique": false + } + }, + "foreignKeys": { + "home_pages_blocks_event_table_dynamic_opts_by_types_parent_fk": { + "name": "home_pages_blocks_event_table_dynamic_opts_by_types_parent_fk", + "tableFrom": "home_pages_blocks_event_table_dynamic_opts_by_types", + "tableTo": "home_pages_blocks_event_table", + "columnsFrom": ["parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "home_pages_blocks_event_table": { + "name": "home_pages_blocks_event_table", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "background_color": { + "name": "background_color", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'transparent'" + }, + "heading": { + "name": "heading", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "below_heading_content": { + "name": "below_heading_content", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "event_options": { + "name": "event_options", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'dynamic'" + }, + "dynamic_opts_max_events": { + "name": "dynamic_opts_max_events", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": 4 + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "home_pages_blocks_event_table_order_idx": { + "name": "home_pages_blocks_event_table_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "home_pages_blocks_event_table_parent_id_idx": { + "name": "home_pages_blocks_event_table_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "home_pages_blocks_event_table_path_idx": { + "name": "home_pages_blocks_event_table_path_idx", + "columns": ["_path"], + "isUnique": false + } + }, + "foreignKeys": { + "home_pages_blocks_event_table_parent_id_fk": { + "name": "home_pages_blocks_event_table_parent_id_fk", + "tableFrom": "home_pages_blocks_event_table", + "tableTo": "home_pages", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "home_pages_blocks_form_block": { + "name": "home_pages_blocks_form_block", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "form_id": { + "name": "form_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "enable_intro": { + "name": "enable_intro", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "intro_content": { + "name": "intro_content", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "home_pages_blocks_form_block_order_idx": { + "name": "home_pages_blocks_form_block_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "home_pages_blocks_form_block_parent_id_idx": { + "name": "home_pages_blocks_form_block_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "home_pages_blocks_form_block_path_idx": { + "name": "home_pages_blocks_form_block_path_idx", + "columns": ["_path"], + "isUnique": false + }, + "home_pages_blocks_form_block_form_idx": { + "name": "home_pages_blocks_form_block_form_idx", + "columns": ["form_id"], + "isUnique": false + } + }, + "foreignKeys": { + "home_pages_blocks_form_block_form_id_forms_id_fk": { + "name": "home_pages_blocks_form_block_form_id_forms_id_fk", + "tableFrom": "home_pages_blocks_form_block", + "tableTo": "forms", + "columnsFrom": ["form_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "home_pages_blocks_form_block_parent_id_fk": { + "name": "home_pages_blocks_form_block_parent_id_fk", + "tableFrom": "home_pages_blocks_form_block", + "tableTo": "home_pages", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "home_pages_blocks_generic_embed": { + "name": "home_pages_blocks_generic_embed", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "html": { + "name": "html", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "background_color": { + "name": "background_color", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'transparent'" + }, + "align_content": { + "name": "align_content", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'left'" + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "home_pages_blocks_generic_embed_order_idx": { + "name": "home_pages_blocks_generic_embed_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "home_pages_blocks_generic_embed_parent_id_idx": { + "name": "home_pages_blocks_generic_embed_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "home_pages_blocks_generic_embed_path_idx": { + "name": "home_pages_blocks_generic_embed_path_idx", + "columns": ["_path"], + "isUnique": false + } + }, + "foreignKeys": { + "home_pages_blocks_generic_embed_parent_id_fk": { + "name": "home_pages_blocks_generic_embed_parent_id_fk", + "tableFrom": "home_pages_blocks_generic_embed", + "tableTo": "home_pages", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "home_pages_blocks_header_block": { + "name": "home_pages_blocks_header_block", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "rich_text": { + "name": "rich_text", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "background_color": { + "name": "background_color", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'transparent'" + }, + "full_width_color": { + "name": "full_width_color", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": true + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "home_pages_blocks_header_block_order_idx": { + "name": "home_pages_blocks_header_block_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "home_pages_blocks_header_block_parent_id_idx": { + "name": "home_pages_blocks_header_block_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "home_pages_blocks_header_block_path_idx": { + "name": "home_pages_blocks_header_block_path_idx", + "columns": ["_path"], + "isUnique": false + } + }, + "foreignKeys": { + "home_pages_blocks_header_block_parent_id_fk": { + "name": "home_pages_blocks_header_block_parent_id_fk", + "tableFrom": "home_pages_blocks_header_block", + "tableTo": "home_pages", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "home_pages_blocks_image_link_grid_columns": { + "name": "home_pages_blocks_image_link_grid_columns", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "image_id": { + "name": "image_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_type": { + "name": "link_type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'internal'" + }, + "link_new_tab": { + "name": "link_new_tab", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_url": { + "name": "link_url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "caption": { + "name": "caption", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "home_pages_blocks_image_link_grid_columns_order_idx": { + "name": "home_pages_blocks_image_link_grid_columns_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "home_pages_blocks_image_link_grid_columns_parent_id_idx": { + "name": "home_pages_blocks_image_link_grid_columns_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "home_pages_blocks_image_link_grid_columns_image_idx": { + "name": "home_pages_blocks_image_link_grid_columns_image_idx", + "columns": ["image_id"], + "isUnique": false + } + }, + "foreignKeys": { + "home_pages_blocks_image_link_grid_columns_image_id_media_id_fk": { + "name": "home_pages_blocks_image_link_grid_columns_image_id_media_id_fk", + "tableFrom": "home_pages_blocks_image_link_grid_columns", + "tableTo": "media", + "columnsFrom": ["image_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "home_pages_blocks_image_link_grid_columns_parent_id_fk": { + "name": "home_pages_blocks_image_link_grid_columns_parent_id_fk", + "tableFrom": "home_pages_blocks_image_link_grid_columns", + "tableTo": "home_pages_blocks_image_link_grid", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "home_pages_blocks_image_link_grid": { + "name": "home_pages_blocks_image_link_grid", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "home_pages_blocks_image_link_grid_order_idx": { + "name": "home_pages_blocks_image_link_grid_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "home_pages_blocks_image_link_grid_parent_id_idx": { + "name": "home_pages_blocks_image_link_grid_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "home_pages_blocks_image_link_grid_path_idx": { + "name": "home_pages_blocks_image_link_grid_path_idx", + "columns": ["_path"], + "isUnique": false + } + }, + "foreignKeys": { + "home_pages_blocks_image_link_grid_parent_id_fk": { + "name": "home_pages_blocks_image_link_grid_parent_id_fk", + "tableFrom": "home_pages_blocks_image_link_grid", + "tableTo": "home_pages", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "home_pages_blocks_image_text": { + "name": "home_pages_blocks_image_text", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "background_color": { + "name": "background_color", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'transparent'" + }, + "image_layout": { + "name": "image_layout", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'left'" + }, + "image_id": { + "name": "image_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "text_wrap": { + "name": "text_wrap", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": false + }, + "rich_text": { + "name": "rich_text", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "home_pages_blocks_image_text_order_idx": { + "name": "home_pages_blocks_image_text_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "home_pages_blocks_image_text_parent_id_idx": { + "name": "home_pages_blocks_image_text_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "home_pages_blocks_image_text_path_idx": { + "name": "home_pages_blocks_image_text_path_idx", + "columns": ["_path"], + "isUnique": false + }, + "home_pages_blocks_image_text_image_idx": { + "name": "home_pages_blocks_image_text_image_idx", + "columns": ["image_id"], + "isUnique": false + } + }, + "foreignKeys": { + "home_pages_blocks_image_text_image_id_media_id_fk": { + "name": "home_pages_blocks_image_text_image_id_media_id_fk", + "tableFrom": "home_pages_blocks_image_text", + "tableTo": "media", + "columnsFrom": ["image_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "home_pages_blocks_image_text_parent_id_fk": { + "name": "home_pages_blocks_image_text_parent_id_fk", + "tableFrom": "home_pages_blocks_image_text", + "tableTo": "home_pages", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "home_pages_blocks_link_preview_cards": { + "name": "home_pages_blocks_link_preview_cards", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "image_id": { + "name": "image_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "text": { + "name": "text", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "button_type": { + "name": "button_type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'internal'" + }, + "button_new_tab": { + "name": "button_new_tab", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "button_url": { + "name": "button_url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "button_label": { + "name": "button_label", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "button_variant": { + "name": "button_variant", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'default'" + } + }, + "indexes": { + "home_pages_blocks_link_preview_cards_order_idx": { + "name": "home_pages_blocks_link_preview_cards_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "home_pages_blocks_link_preview_cards_parent_id_idx": { + "name": "home_pages_blocks_link_preview_cards_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "home_pages_blocks_link_preview_cards_image_idx": { + "name": "home_pages_blocks_link_preview_cards_image_idx", + "columns": ["image_id"], + "isUnique": false + } + }, + "foreignKeys": { + "home_pages_blocks_link_preview_cards_image_id_media_id_fk": { + "name": "home_pages_blocks_link_preview_cards_image_id_media_id_fk", + "tableFrom": "home_pages_blocks_link_preview_cards", + "tableTo": "media", + "columnsFrom": ["image_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "home_pages_blocks_link_preview_cards_parent_id_fk": { + "name": "home_pages_blocks_link_preview_cards_parent_id_fk", + "tableFrom": "home_pages_blocks_link_preview_cards", + "tableTo": "home_pages_blocks_link_preview", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "home_pages_blocks_link_preview": { + "name": "home_pages_blocks_link_preview", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "header": { + "name": "header", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "background_color": { + "name": "background_color", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'transparent'" + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "home_pages_blocks_link_preview_order_idx": { + "name": "home_pages_blocks_link_preview_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "home_pages_blocks_link_preview_parent_id_idx": { + "name": "home_pages_blocks_link_preview_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "home_pages_blocks_link_preview_path_idx": { + "name": "home_pages_blocks_link_preview_path_idx", + "columns": ["_path"], + "isUnique": false + } + }, + "foreignKeys": { + "home_pages_blocks_link_preview_parent_id_fk": { + "name": "home_pages_blocks_link_preview_parent_id_fk", + "tableFrom": "home_pages_blocks_link_preview", + "tableTo": "home_pages", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "home_pages_blocks_media_block": { + "name": "home_pages_blocks_media_block", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "media_id": { + "name": "media_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "caption": { + "name": "caption", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "background_color": { + "name": "background_color", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'transparent'" + }, + "align_content": { + "name": "align_content", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'left'" + }, + "image_size": { + "name": "image_size", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'original'" + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "home_pages_blocks_media_block_order_idx": { + "name": "home_pages_blocks_media_block_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "home_pages_blocks_media_block_parent_id_idx": { + "name": "home_pages_blocks_media_block_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "home_pages_blocks_media_block_path_idx": { + "name": "home_pages_blocks_media_block_path_idx", + "columns": ["_path"], + "isUnique": false + }, + "home_pages_blocks_media_block_media_idx": { + "name": "home_pages_blocks_media_block_media_idx", + "columns": ["media_id"], + "isUnique": false + } + }, + "foreignKeys": { + "home_pages_blocks_media_block_media_id_media_id_fk": { + "name": "home_pages_blocks_media_block_media_id_media_id_fk", + "tableFrom": "home_pages_blocks_media_block", + "tableTo": "media", + "columnsFrom": ["media_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "home_pages_blocks_media_block_parent_id_fk": { + "name": "home_pages_blocks_media_block_parent_id_fk", + "tableFrom": "home_pages_blocks_media_block", + "tableTo": "home_pages", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "home_pages_blocks_nac_media_block": { + "name": "home_pages_blocks_nac_media_block", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "background_color": { + "name": "background_color", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'transparent'" + }, + "mode": { + "name": "mode", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'carousel'" + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "home_pages_blocks_nac_media_block_order_idx": { + "name": "home_pages_blocks_nac_media_block_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "home_pages_blocks_nac_media_block_parent_id_idx": { + "name": "home_pages_blocks_nac_media_block_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "home_pages_blocks_nac_media_block_path_idx": { + "name": "home_pages_blocks_nac_media_block_path_idx", + "columns": ["_path"], + "isUnique": false + } + }, + "foreignKeys": { + "home_pages_blocks_nac_media_block_parent_id_fk": { + "name": "home_pages_blocks_nac_media_block_parent_id_fk", + "tableFrom": "home_pages_blocks_nac_media_block", + "tableTo": "home_pages", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "home_pages_blocks_single_blog_post": { + "name": "home_pages_blocks_single_blog_post", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "background_color": { + "name": "background_color", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'transparent'" + }, + "post_id": { + "name": "post_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "home_pages_blocks_single_blog_post_order_idx": { + "name": "home_pages_blocks_single_blog_post_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "home_pages_blocks_single_blog_post_parent_id_idx": { + "name": "home_pages_blocks_single_blog_post_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "home_pages_blocks_single_blog_post_path_idx": { + "name": "home_pages_blocks_single_blog_post_path_idx", + "columns": ["_path"], + "isUnique": false + }, + "home_pages_blocks_single_blog_post_post_idx": { + "name": "home_pages_blocks_single_blog_post_post_idx", + "columns": ["post_id"], + "isUnique": false + } + }, + "foreignKeys": { + "home_pages_blocks_single_blog_post_post_id_posts_id_fk": { + "name": "home_pages_blocks_single_blog_post_post_id_posts_id_fk", + "tableFrom": "home_pages_blocks_single_blog_post", + "tableTo": "posts", + "columnsFrom": ["post_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "home_pages_blocks_single_blog_post_parent_id_fk": { + "name": "home_pages_blocks_single_blog_post_parent_id_fk", + "tableFrom": "home_pages_blocks_single_blog_post", + "tableTo": "home_pages", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "home_pages_blocks_single_event": { + "name": "home_pages_blocks_single_event", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "background_color": { + "name": "background_color", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'transparent'" + }, + "event_id": { + "name": "event_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "home_pages_blocks_single_event_order_idx": { + "name": "home_pages_blocks_single_event_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "home_pages_blocks_single_event_parent_id_idx": { + "name": "home_pages_blocks_single_event_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "home_pages_blocks_single_event_path_idx": { + "name": "home_pages_blocks_single_event_path_idx", + "columns": ["_path"], + "isUnique": false + }, + "home_pages_blocks_single_event_event_idx": { + "name": "home_pages_blocks_single_event_event_idx", + "columns": ["event_id"], + "isUnique": false + } + }, + "foreignKeys": { + "home_pages_blocks_single_event_event_id_events_id_fk": { + "name": "home_pages_blocks_single_event_event_id_events_id_fk", + "tableFrom": "home_pages_blocks_single_event", + "tableTo": "events", + "columnsFrom": ["event_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "home_pages_blocks_single_event_parent_id_fk": { + "name": "home_pages_blocks_single_event_parent_id_fk", + "tableFrom": "home_pages_blocks_single_event", + "tableTo": "home_pages", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "home_pages_blocks_sponsors_block": { + "name": "home_pages_blocks_sponsors_block", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "background_color": { + "name": "background_color", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'transparent'" + }, + "sponsors_layout": { + "name": "sponsors_layout", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'static'" + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "home_pages_blocks_sponsors_block_order_idx": { + "name": "home_pages_blocks_sponsors_block_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "home_pages_blocks_sponsors_block_parent_id_idx": { + "name": "home_pages_blocks_sponsors_block_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "home_pages_blocks_sponsors_block_path_idx": { + "name": "home_pages_blocks_sponsors_block_path_idx", + "columns": ["_path"], + "isUnique": false + } + }, + "foreignKeys": { + "home_pages_blocks_sponsors_block_parent_id_fk": { + "name": "home_pages_blocks_sponsors_block_parent_id_fk", + "tableFrom": "home_pages_blocks_sponsors_block", + "tableTo": "home_pages", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "home_pages_blocks_team": { + "name": "home_pages_blocks_team", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "team_id": { + "name": "team_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "home_pages_blocks_team_order_idx": { + "name": "home_pages_blocks_team_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "home_pages_blocks_team_parent_id_idx": { + "name": "home_pages_blocks_team_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "home_pages_blocks_team_path_idx": { + "name": "home_pages_blocks_team_path_idx", + "columns": ["_path"], + "isUnique": false + }, + "home_pages_blocks_team_team_idx": { + "name": "home_pages_blocks_team_team_idx", + "columns": ["team_id"], + "isUnique": false + } + }, + "foreignKeys": { + "home_pages_blocks_team_team_id_teams_id_fk": { + "name": "home_pages_blocks_team_team_id_teams_id_fk", + "tableFrom": "home_pages_blocks_team", + "tableTo": "teams", + "columnsFrom": ["team_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "home_pages_blocks_team_parent_id_fk": { + "name": "home_pages_blocks_team_parent_id_fk", + "tableFrom": "home_pages_blocks_team", + "tableTo": "home_pages", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "home_pages_document_references": { + "name": "home_pages_document_references", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "collection": { + "name": "collection", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "doc_id": { + "name": "doc_id", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "instances": { + "name": "instances", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "home_pages_document_references_order_idx": { + "name": "home_pages_document_references_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "home_pages_document_references_parent_id_idx": { + "name": "home_pages_document_references_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + } + }, + "foreignKeys": { + "home_pages_document_references_parent_id_fk": { + "name": "home_pages_document_references_parent_id_fk", + "tableFrom": "home_pages_document_references", + "tableTo": "home_pages", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "home_pages": { + "name": "home_pages", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "tenant_id": { + "name": "tenant_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "highlighted_content_enabled": { + "name": "highlighted_content_enabled", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": false + }, + "highlighted_content_heading": { + "name": "highlighted_content_heading", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "highlighted_content_background_color": { + "name": "highlighted_content_background_color", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'transparent'" + }, + "published_at": { + "name": "published_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "content_hash": { + "name": "content_hash", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + }, + "_status": { + "name": "_status", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'draft'" + } + }, + "indexes": { + "home_pages_tenant_idx": { + "name": "home_pages_tenant_idx", + "columns": ["tenant_id"], + "isUnique": true + }, + "home_pages_updated_at_idx": { + "name": "home_pages_updated_at_idx", + "columns": ["updated_at"], + "isUnique": false + }, + "home_pages_created_at_idx": { + "name": "home_pages_created_at_idx", + "columns": ["created_at"], + "isUnique": false + }, + "home_pages__status_idx": { + "name": "home_pages__status_idx", + "columns": ["_status"], + "isUnique": false + } + }, + "foreignKeys": { + "home_pages_tenant_id_tenants_id_fk": { + "name": "home_pages_tenant_id_tenants_id_fk", + "tableFrom": "home_pages", + "tableTo": "tenants", + "columnsFrom": ["tenant_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "home_pages_rels": { + "name": "home_pages_rels", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "path": { + "name": "path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "pages_id": { + "name": "pages_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "built_in_pages_id": { + "name": "built_in_pages_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "posts_id": { + "name": "posts_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "tags_id": { + "name": "tags_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "event_groups_id": { + "name": "event_groups_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "event_tags_id": { + "name": "event_tags_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "events_id": { + "name": "events_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "sponsors_id": { + "name": "sponsors_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "home_pages_rels_order_idx": { + "name": "home_pages_rels_order_idx", + "columns": ["order"], + "isUnique": false + }, + "home_pages_rels_parent_idx": { + "name": "home_pages_rels_parent_idx", + "columns": ["parent_id"], + "isUnique": false + }, + "home_pages_rels_path_idx": { + "name": "home_pages_rels_path_idx", + "columns": ["path"], + "isUnique": false + }, + "home_pages_rels_pages_id_idx": { + "name": "home_pages_rels_pages_id_idx", + "columns": ["pages_id"], + "isUnique": false + }, + "home_pages_rels_built_in_pages_id_idx": { + "name": "home_pages_rels_built_in_pages_id_idx", + "columns": ["built_in_pages_id"], + "isUnique": false + }, + "home_pages_rels_posts_id_idx": { + "name": "home_pages_rels_posts_id_idx", + "columns": ["posts_id"], + "isUnique": false + }, + "home_pages_rels_tags_id_idx": { + "name": "home_pages_rels_tags_id_idx", + "columns": ["tags_id"], + "isUnique": false + }, + "home_pages_rels_event_groups_id_idx": { + "name": "home_pages_rels_event_groups_id_idx", + "columns": ["event_groups_id"], + "isUnique": false + }, + "home_pages_rels_event_tags_id_idx": { + "name": "home_pages_rels_event_tags_id_idx", + "columns": ["event_tags_id"], + "isUnique": false + }, + "home_pages_rels_events_id_idx": { + "name": "home_pages_rels_events_id_idx", + "columns": ["events_id"], + "isUnique": false + }, + "home_pages_rels_sponsors_id_idx": { + "name": "home_pages_rels_sponsors_id_idx", + "columns": ["sponsors_id"], + "isUnique": false + } + }, + "foreignKeys": { + "home_pages_rels_parent_fk": { + "name": "home_pages_rels_parent_fk", + "tableFrom": "home_pages_rels", + "tableTo": "home_pages", + "columnsFrom": ["parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "home_pages_rels_pages_fk": { + "name": "home_pages_rels_pages_fk", + "tableFrom": "home_pages_rels", + "tableTo": "pages", + "columnsFrom": ["pages_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "home_pages_rels_built_in_pages_fk": { + "name": "home_pages_rels_built_in_pages_fk", + "tableFrom": "home_pages_rels", + "tableTo": "built_in_pages", + "columnsFrom": ["built_in_pages_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "home_pages_rels_posts_fk": { + "name": "home_pages_rels_posts_fk", + "tableFrom": "home_pages_rels", + "tableTo": "posts", + "columnsFrom": ["posts_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "home_pages_rels_tags_fk": { + "name": "home_pages_rels_tags_fk", + "tableFrom": "home_pages_rels", + "tableTo": "tags", + "columnsFrom": ["tags_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "home_pages_rels_event_groups_fk": { + "name": "home_pages_rels_event_groups_fk", + "tableFrom": "home_pages_rels", + "tableTo": "event_groups", + "columnsFrom": ["event_groups_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "home_pages_rels_event_tags_fk": { + "name": "home_pages_rels_event_tags_fk", + "tableFrom": "home_pages_rels", + "tableTo": "event_tags", + "columnsFrom": ["event_tags_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "home_pages_rels_events_fk": { + "name": "home_pages_rels_events_fk", + "tableFrom": "home_pages_rels", + "tableTo": "events", + "columnsFrom": ["events_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "home_pages_rels_sponsors_fk": { + "name": "home_pages_rels_sponsors_fk", + "tableFrom": "home_pages_rels", + "tableTo": "sponsors", + "columnsFrom": ["sponsors_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_home_pages_v_version_quick_links": { + "name": "_home_pages_v_version_quick_links", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "type": { + "name": "type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'internal'" + }, + "new_tab": { + "name": "new_tab", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "url": { + "name": "url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "label": { + "name": "label", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "_uuid": { + "name": "_uuid", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "_home_pages_v_version_quick_links_order_idx": { + "name": "_home_pages_v_version_quick_links_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "_home_pages_v_version_quick_links_parent_id_idx": { + "name": "_home_pages_v_version_quick_links_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + } + }, + "foreignKeys": { + "_home_pages_v_version_quick_links_parent_id_fk": { + "name": "_home_pages_v_version_quick_links_parent_id_fk", + "tableFrom": "_home_pages_v_version_quick_links", + "tableTo": "_home_pages_v", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_home_pages_v_version_highlighted_content_columns": { + "name": "_home_pages_v_version_highlighted_content_columns", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "rich_text": { + "name": "rich_text", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "_uuid": { + "name": "_uuid", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "_home_pages_v_version_highlighted_content_columns_order_idx": { + "name": "_home_pages_v_version_highlighted_content_columns_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "_home_pages_v_version_highlighted_content_columns_parent_id_idx": { + "name": "_home_pages_v_version_highlighted_content_columns_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + } + }, + "foreignKeys": { + "_home_pages_v_version_highlighted_content_columns_parent_id_fk": { + "name": "_home_pages_v_version_highlighted_content_columns_parent_id_fk", + "tableFrom": "_home_pages_v_version_highlighted_content_columns", + "tableTo": "_home_pages_v", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_home_pages_v_blocks_blog_list": { + "name": "_home_pages_v_blocks_blog_list", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "heading": { + "name": "heading", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "below_heading_content": { + "name": "below_heading_content", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "background_color": { + "name": "background_color", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'transparent'" + }, + "post_options": { + "name": "post_options", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'dynamic'" + }, + "dynamic_options_sort_by": { + "name": "dynamic_options_sort_by", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'-publishedAt'" + }, + "dynamic_options_max_posts": { + "name": "dynamic_options_max_posts", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": 4 + }, + "_uuid": { + "name": "_uuid", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "_home_pages_v_blocks_blog_list_order_idx": { + "name": "_home_pages_v_blocks_blog_list_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "_home_pages_v_blocks_blog_list_parent_id_idx": { + "name": "_home_pages_v_blocks_blog_list_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "_home_pages_v_blocks_blog_list_path_idx": { + "name": "_home_pages_v_blocks_blog_list_path_idx", + "columns": ["_path"], + "isUnique": false + } + }, + "foreignKeys": { + "_home_pages_v_blocks_blog_list_parent_id_fk": { + "name": "_home_pages_v_blocks_blog_list_parent_id_fk", + "tableFrom": "_home_pages_v_blocks_blog_list", + "tableTo": "_home_pages_v", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_home_pages_v_blocks_content_columns": { + "name": "_home_pages_v_blocks_content_columns", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "rich_text": { + "name": "rich_text", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'{\"root\":{\"type\":\"root\",\"format\":\"\",\"indent\":0,\"version\":1,\"children\":[{\"type\":\"paragraph\",\"format\":\"\",\"indent\":0,\"version\":1,\"children\":[],\"direction\":\"ltr\",\"textStyle\":\"\",\"textFormat\":0}],\"direction\":\"ltr\"}}'" + }, + "_uuid": { + "name": "_uuid", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "_home_pages_v_blocks_content_columns_order_idx": { + "name": "_home_pages_v_blocks_content_columns_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "_home_pages_v_blocks_content_columns_parent_id_idx": { + "name": "_home_pages_v_blocks_content_columns_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + } + }, + "foreignKeys": { + "_home_pages_v_blocks_content_columns_parent_id_fk": { + "name": "_home_pages_v_blocks_content_columns_parent_id_fk", + "tableFrom": "_home_pages_v_blocks_content_columns", + "tableTo": "_home_pages_v_blocks_content", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_home_pages_v_blocks_content": { + "name": "_home_pages_v_blocks_content", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "background_color": { + "name": "background_color", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'transparent'" + }, + "layout": { + "name": "layout", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'1_1'" + }, + "_uuid": { + "name": "_uuid", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "_home_pages_v_blocks_content_order_idx": { + "name": "_home_pages_v_blocks_content_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "_home_pages_v_blocks_content_parent_id_idx": { + "name": "_home_pages_v_blocks_content_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "_home_pages_v_blocks_content_path_idx": { + "name": "_home_pages_v_blocks_content_path_idx", + "columns": ["_path"], + "isUnique": false + } + }, + "foreignKeys": { + "_home_pages_v_blocks_content_parent_id_fk": { + "name": "_home_pages_v_blocks_content_parent_id_fk", + "tableFrom": "_home_pages_v_blocks_content", + "tableTo": "_home_pages_v", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_home_pages_v_blocks_document_block": { + "name": "_home_pages_v_blocks_document_block", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "document_id": { + "name": "document_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "_uuid": { + "name": "_uuid", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "_home_pages_v_blocks_document_block_order_idx": { + "name": "_home_pages_v_blocks_document_block_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "_home_pages_v_blocks_document_block_parent_id_idx": { + "name": "_home_pages_v_blocks_document_block_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "_home_pages_v_blocks_document_block_path_idx": { + "name": "_home_pages_v_blocks_document_block_path_idx", + "columns": ["_path"], + "isUnique": false + }, + "_home_pages_v_blocks_document_block_document_idx": { + "name": "_home_pages_v_blocks_document_block_document_idx", + "columns": ["document_id"], + "isUnique": false + } + }, + "foreignKeys": { + "_home_pages_v_blocks_document_block_document_id_documents_id_fk": { + "name": "_home_pages_v_blocks_document_block_document_id_documents_id_fk", + "tableFrom": "_home_pages_v_blocks_document_block", + "tableTo": "documents", + "columnsFrom": ["document_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "_home_pages_v_blocks_document_block_parent_id_fk": { + "name": "_home_pages_v_blocks_document_block_parent_id_fk", + "tableFrom": "_home_pages_v_blocks_document_block", + "tableTo": "_home_pages_v", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_home_pages_v_blocks_event_list_dynamic_opts_by_types": { + "name": "_home_pages_v_blocks_event_list_dynamic_opts_by_types", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "value": { + "name": "value", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "_home_pages_v_blocks_event_list_dynamic_opts_by_types_order_idx": { + "name": "_home_pages_v_blocks_event_list_dynamic_opts_by_types_order_idx", + "columns": ["order"], + "isUnique": false + }, + "_home_pages_v_blocks_event_list_dynamic_opts_by_types_parent_idx": { + "name": "_home_pages_v_blocks_event_list_dynamic_opts_by_types_parent_idx", + "columns": ["parent_id"], + "isUnique": false + } + }, + "foreignKeys": { + "_home_pages_v_blocks_event_list_dynamic_opts_by_types_parent_fk": { + "name": "_home_pages_v_blocks_event_list_dynamic_opts_by_types_parent_fk", + "tableFrom": "_home_pages_v_blocks_event_list_dynamic_opts_by_types", + "tableTo": "_home_pages_v_blocks_event_list", + "columnsFrom": ["parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_home_pages_v_blocks_event_list": { + "name": "_home_pages_v_blocks_event_list", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "background_color": { + "name": "background_color", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'transparent'" + }, + "heading": { + "name": "heading", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "below_heading_content": { + "name": "below_heading_content", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "event_options": { + "name": "event_options", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'dynamic'" + }, + "dynamic_opts_max_events": { + "name": "dynamic_opts_max_events", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": 4 + }, + "_uuid": { + "name": "_uuid", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "_home_pages_v_blocks_event_list_order_idx": { + "name": "_home_pages_v_blocks_event_list_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "_home_pages_v_blocks_event_list_parent_id_idx": { + "name": "_home_pages_v_blocks_event_list_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "_home_pages_v_blocks_event_list_path_idx": { + "name": "_home_pages_v_blocks_event_list_path_idx", + "columns": ["_path"], + "isUnique": false + } + }, + "foreignKeys": { + "_home_pages_v_blocks_event_list_parent_id_fk": { + "name": "_home_pages_v_blocks_event_list_parent_id_fk", + "tableFrom": "_home_pages_v_blocks_event_list", + "tableTo": "_home_pages_v", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_home_pages_v_blocks_event_table_dynamic_opts_by_types": { + "name": "_home_pages_v_blocks_event_table_dynamic_opts_by_types", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "value": { + "name": "value", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "_home_pages_v_blocks_event_table_dynamic_opts_by_types_order_idx": { + "name": "_home_pages_v_blocks_event_table_dynamic_opts_by_types_order_idx", + "columns": ["order"], + "isUnique": false + }, + "_home_pages_v_blocks_event_table_dynamic_opts_by_types_parent_idx": { + "name": "_home_pages_v_blocks_event_table_dynamic_opts_by_types_parent_idx", + "columns": ["parent_id"], + "isUnique": false + } + }, + "foreignKeys": { + "_home_pages_v_blocks_event_table_dynamic_opts_by_types_parent_fk": { + "name": "_home_pages_v_blocks_event_table_dynamic_opts_by_types_parent_fk", + "tableFrom": "_home_pages_v_blocks_event_table_dynamic_opts_by_types", + "tableTo": "_home_pages_v_blocks_event_table", + "columnsFrom": ["parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_home_pages_v_blocks_event_table": { + "name": "_home_pages_v_blocks_event_table", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "background_color": { + "name": "background_color", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'transparent'" + }, + "heading": { + "name": "heading", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "below_heading_content": { + "name": "below_heading_content", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "event_options": { + "name": "event_options", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'dynamic'" + }, + "dynamic_opts_max_events": { + "name": "dynamic_opts_max_events", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": 4 + }, + "_uuid": { + "name": "_uuid", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "_home_pages_v_blocks_event_table_order_idx": { + "name": "_home_pages_v_blocks_event_table_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "_home_pages_v_blocks_event_table_parent_id_idx": { + "name": "_home_pages_v_blocks_event_table_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "_home_pages_v_blocks_event_table_path_idx": { + "name": "_home_pages_v_blocks_event_table_path_idx", + "columns": ["_path"], + "isUnique": false + } + }, + "foreignKeys": { + "_home_pages_v_blocks_event_table_parent_id_fk": { + "name": "_home_pages_v_blocks_event_table_parent_id_fk", + "tableFrom": "_home_pages_v_blocks_event_table", + "tableTo": "_home_pages_v", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_home_pages_v_blocks_form_block": { + "name": "_home_pages_v_blocks_form_block", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "form_id": { + "name": "form_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "enable_intro": { + "name": "enable_intro", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "intro_content": { + "name": "intro_content", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "_uuid": { + "name": "_uuid", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "_home_pages_v_blocks_form_block_order_idx": { + "name": "_home_pages_v_blocks_form_block_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "_home_pages_v_blocks_form_block_parent_id_idx": { + "name": "_home_pages_v_blocks_form_block_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "_home_pages_v_blocks_form_block_path_idx": { + "name": "_home_pages_v_blocks_form_block_path_idx", + "columns": ["_path"], + "isUnique": false + }, + "_home_pages_v_blocks_form_block_form_idx": { + "name": "_home_pages_v_blocks_form_block_form_idx", + "columns": ["form_id"], + "isUnique": false + } + }, + "foreignKeys": { + "_home_pages_v_blocks_form_block_form_id_forms_id_fk": { + "name": "_home_pages_v_blocks_form_block_form_id_forms_id_fk", + "tableFrom": "_home_pages_v_blocks_form_block", + "tableTo": "forms", + "columnsFrom": ["form_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "_home_pages_v_blocks_form_block_parent_id_fk": { + "name": "_home_pages_v_blocks_form_block_parent_id_fk", + "tableFrom": "_home_pages_v_blocks_form_block", + "tableTo": "_home_pages_v", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_home_pages_v_blocks_generic_embed": { + "name": "_home_pages_v_blocks_generic_embed", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "html": { + "name": "html", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "background_color": { + "name": "background_color", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'transparent'" + }, + "align_content": { + "name": "align_content", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'left'" + }, + "_uuid": { + "name": "_uuid", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "_home_pages_v_blocks_generic_embed_order_idx": { + "name": "_home_pages_v_blocks_generic_embed_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "_home_pages_v_blocks_generic_embed_parent_id_idx": { + "name": "_home_pages_v_blocks_generic_embed_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "_home_pages_v_blocks_generic_embed_path_idx": { + "name": "_home_pages_v_blocks_generic_embed_path_idx", + "columns": ["_path"], + "isUnique": false + } + }, + "foreignKeys": { + "_home_pages_v_blocks_generic_embed_parent_id_fk": { + "name": "_home_pages_v_blocks_generic_embed_parent_id_fk", + "tableFrom": "_home_pages_v_blocks_generic_embed", + "tableTo": "_home_pages_v", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_home_pages_v_blocks_header_block": { + "name": "_home_pages_v_blocks_header_block", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "rich_text": { + "name": "rich_text", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "background_color": { + "name": "background_color", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'transparent'" + }, + "full_width_color": { + "name": "full_width_color", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": true + }, + "_uuid": { + "name": "_uuid", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "_home_pages_v_blocks_header_block_order_idx": { + "name": "_home_pages_v_blocks_header_block_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "_home_pages_v_blocks_header_block_parent_id_idx": { + "name": "_home_pages_v_blocks_header_block_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "_home_pages_v_blocks_header_block_path_idx": { + "name": "_home_pages_v_blocks_header_block_path_idx", + "columns": ["_path"], + "isUnique": false + } + }, + "foreignKeys": { + "_home_pages_v_blocks_header_block_parent_id_fk": { + "name": "_home_pages_v_blocks_header_block_parent_id_fk", + "tableFrom": "_home_pages_v_blocks_header_block", + "tableTo": "_home_pages_v", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_home_pages_v_blocks_image_link_grid_columns": { + "name": "_home_pages_v_blocks_image_link_grid_columns", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "image_id": { + "name": "image_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_type": { + "name": "link_type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'internal'" + }, + "link_new_tab": { + "name": "link_new_tab", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_url": { + "name": "link_url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "caption": { + "name": "caption", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "_uuid": { + "name": "_uuid", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "_home_pages_v_blocks_image_link_grid_columns_order_idx": { + "name": "_home_pages_v_blocks_image_link_grid_columns_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "_home_pages_v_blocks_image_link_grid_columns_parent_id_idx": { + "name": "_home_pages_v_blocks_image_link_grid_columns_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "_home_pages_v_blocks_image_link_grid_columns_image_idx": { + "name": "_home_pages_v_blocks_image_link_grid_columns_image_idx", + "columns": ["image_id"], + "isUnique": false + } + }, + "foreignKeys": { + "_home_pages_v_blocks_image_link_grid_columns_image_id_media_id_fk": { + "name": "_home_pages_v_blocks_image_link_grid_columns_image_id_media_id_fk", + "tableFrom": "_home_pages_v_blocks_image_link_grid_columns", + "tableTo": "media", + "columnsFrom": ["image_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "_home_pages_v_blocks_image_link_grid_columns_parent_id_fk": { + "name": "_home_pages_v_blocks_image_link_grid_columns_parent_id_fk", + "tableFrom": "_home_pages_v_blocks_image_link_grid_columns", + "tableTo": "_home_pages_v_blocks_image_link_grid", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_home_pages_v_blocks_image_link_grid": { + "name": "_home_pages_v_blocks_image_link_grid", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "_uuid": { + "name": "_uuid", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "_home_pages_v_blocks_image_link_grid_order_idx": { + "name": "_home_pages_v_blocks_image_link_grid_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "_home_pages_v_blocks_image_link_grid_parent_id_idx": { + "name": "_home_pages_v_blocks_image_link_grid_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "_home_pages_v_blocks_image_link_grid_path_idx": { + "name": "_home_pages_v_blocks_image_link_grid_path_idx", + "columns": ["_path"], + "isUnique": false + } + }, + "foreignKeys": { + "_home_pages_v_blocks_image_link_grid_parent_id_fk": { + "name": "_home_pages_v_blocks_image_link_grid_parent_id_fk", + "tableFrom": "_home_pages_v_blocks_image_link_grid", + "tableTo": "_home_pages_v", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_home_pages_v_blocks_image_text": { + "name": "_home_pages_v_blocks_image_text", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "background_color": { + "name": "background_color", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'transparent'" + }, + "image_layout": { + "name": "image_layout", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'left'" + }, + "image_id": { + "name": "image_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "text_wrap": { + "name": "text_wrap", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": false + }, + "rich_text": { + "name": "rich_text", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "_uuid": { + "name": "_uuid", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "_home_pages_v_blocks_image_text_order_idx": { + "name": "_home_pages_v_blocks_image_text_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "_home_pages_v_blocks_image_text_parent_id_idx": { + "name": "_home_pages_v_blocks_image_text_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "_home_pages_v_blocks_image_text_path_idx": { + "name": "_home_pages_v_blocks_image_text_path_idx", + "columns": ["_path"], + "isUnique": false + }, + "_home_pages_v_blocks_image_text_image_idx": { + "name": "_home_pages_v_blocks_image_text_image_idx", + "columns": ["image_id"], + "isUnique": false + } + }, + "foreignKeys": { + "_home_pages_v_blocks_image_text_image_id_media_id_fk": { + "name": "_home_pages_v_blocks_image_text_image_id_media_id_fk", + "tableFrom": "_home_pages_v_blocks_image_text", + "tableTo": "media", + "columnsFrom": ["image_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "_home_pages_v_blocks_image_text_parent_id_fk": { + "name": "_home_pages_v_blocks_image_text_parent_id_fk", + "tableFrom": "_home_pages_v_blocks_image_text", + "tableTo": "_home_pages_v", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_home_pages_v_blocks_link_preview_cards": { + "name": "_home_pages_v_blocks_link_preview_cards", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "image_id": { + "name": "image_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "text": { + "name": "text", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "button_type": { + "name": "button_type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'internal'" + }, + "button_new_tab": { + "name": "button_new_tab", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "button_url": { + "name": "button_url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "button_label": { + "name": "button_label", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "button_variant": { + "name": "button_variant", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'default'" + }, + "_uuid": { + "name": "_uuid", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "_home_pages_v_blocks_link_preview_cards_order_idx": { + "name": "_home_pages_v_blocks_link_preview_cards_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "_home_pages_v_blocks_link_preview_cards_parent_id_idx": { + "name": "_home_pages_v_blocks_link_preview_cards_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "_home_pages_v_blocks_link_preview_cards_image_idx": { + "name": "_home_pages_v_blocks_link_preview_cards_image_idx", + "columns": ["image_id"], + "isUnique": false + } + }, + "foreignKeys": { + "_home_pages_v_blocks_link_preview_cards_image_id_media_id_fk": { + "name": "_home_pages_v_blocks_link_preview_cards_image_id_media_id_fk", + "tableFrom": "_home_pages_v_blocks_link_preview_cards", + "tableTo": "media", + "columnsFrom": ["image_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "_home_pages_v_blocks_link_preview_cards_parent_id_fk": { + "name": "_home_pages_v_blocks_link_preview_cards_parent_id_fk", + "tableFrom": "_home_pages_v_blocks_link_preview_cards", + "tableTo": "_home_pages_v_blocks_link_preview", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_home_pages_v_blocks_link_preview": { + "name": "_home_pages_v_blocks_link_preview", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "header": { + "name": "header", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "background_color": { + "name": "background_color", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'transparent'" + }, + "_uuid": { + "name": "_uuid", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "_home_pages_v_blocks_link_preview_order_idx": { + "name": "_home_pages_v_blocks_link_preview_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "_home_pages_v_blocks_link_preview_parent_id_idx": { + "name": "_home_pages_v_blocks_link_preview_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "_home_pages_v_blocks_link_preview_path_idx": { + "name": "_home_pages_v_blocks_link_preview_path_idx", + "columns": ["_path"], + "isUnique": false + } + }, + "foreignKeys": { + "_home_pages_v_blocks_link_preview_parent_id_fk": { + "name": "_home_pages_v_blocks_link_preview_parent_id_fk", + "tableFrom": "_home_pages_v_blocks_link_preview", + "tableTo": "_home_pages_v", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_home_pages_v_blocks_media_block": { + "name": "_home_pages_v_blocks_media_block", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "media_id": { + "name": "media_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "caption": { + "name": "caption", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "background_color": { + "name": "background_color", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'transparent'" + }, + "align_content": { + "name": "align_content", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'left'" + }, + "image_size": { + "name": "image_size", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'original'" + }, + "_uuid": { + "name": "_uuid", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "_home_pages_v_blocks_media_block_order_idx": { + "name": "_home_pages_v_blocks_media_block_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "_home_pages_v_blocks_media_block_parent_id_idx": { + "name": "_home_pages_v_blocks_media_block_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "_home_pages_v_blocks_media_block_path_idx": { + "name": "_home_pages_v_blocks_media_block_path_idx", + "columns": ["_path"], + "isUnique": false + }, + "_home_pages_v_blocks_media_block_media_idx": { + "name": "_home_pages_v_blocks_media_block_media_idx", + "columns": ["media_id"], + "isUnique": false + } + }, + "foreignKeys": { + "_home_pages_v_blocks_media_block_media_id_media_id_fk": { + "name": "_home_pages_v_blocks_media_block_media_id_media_id_fk", + "tableFrom": "_home_pages_v_blocks_media_block", + "tableTo": "media", + "columnsFrom": ["media_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "_home_pages_v_blocks_media_block_parent_id_fk": { + "name": "_home_pages_v_blocks_media_block_parent_id_fk", + "tableFrom": "_home_pages_v_blocks_media_block", + "tableTo": "_home_pages_v", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_home_pages_v_blocks_nac_media_block": { + "name": "_home_pages_v_blocks_nac_media_block", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "background_color": { + "name": "background_color", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'transparent'" + }, + "mode": { + "name": "mode", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'carousel'" + }, + "_uuid": { + "name": "_uuid", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "_home_pages_v_blocks_nac_media_block_order_idx": { + "name": "_home_pages_v_blocks_nac_media_block_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "_home_pages_v_blocks_nac_media_block_parent_id_idx": { + "name": "_home_pages_v_blocks_nac_media_block_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "_home_pages_v_blocks_nac_media_block_path_idx": { + "name": "_home_pages_v_blocks_nac_media_block_path_idx", + "columns": ["_path"], + "isUnique": false + } + }, + "foreignKeys": { + "_home_pages_v_blocks_nac_media_block_parent_id_fk": { + "name": "_home_pages_v_blocks_nac_media_block_parent_id_fk", + "tableFrom": "_home_pages_v_blocks_nac_media_block", + "tableTo": "_home_pages_v", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_home_pages_v_blocks_single_blog_post": { + "name": "_home_pages_v_blocks_single_blog_post", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "background_color": { + "name": "background_color", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'transparent'" + }, + "post_id": { + "name": "post_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "_uuid": { + "name": "_uuid", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "_home_pages_v_blocks_single_blog_post_order_idx": { + "name": "_home_pages_v_blocks_single_blog_post_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "_home_pages_v_blocks_single_blog_post_parent_id_idx": { + "name": "_home_pages_v_blocks_single_blog_post_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "_home_pages_v_blocks_single_blog_post_path_idx": { + "name": "_home_pages_v_blocks_single_blog_post_path_idx", + "columns": ["_path"], + "isUnique": false + }, + "_home_pages_v_blocks_single_blog_post_post_idx": { + "name": "_home_pages_v_blocks_single_blog_post_post_idx", + "columns": ["post_id"], + "isUnique": false + } + }, + "foreignKeys": { + "_home_pages_v_blocks_single_blog_post_post_id_posts_id_fk": { + "name": "_home_pages_v_blocks_single_blog_post_post_id_posts_id_fk", + "tableFrom": "_home_pages_v_blocks_single_blog_post", + "tableTo": "posts", + "columnsFrom": ["post_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "_home_pages_v_blocks_single_blog_post_parent_id_fk": { + "name": "_home_pages_v_blocks_single_blog_post_parent_id_fk", + "tableFrom": "_home_pages_v_blocks_single_blog_post", + "tableTo": "_home_pages_v", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_home_pages_v_blocks_single_event": { + "name": "_home_pages_v_blocks_single_event", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "background_color": { + "name": "background_color", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'transparent'" + }, + "event_id": { + "name": "event_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "_uuid": { + "name": "_uuid", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "_home_pages_v_blocks_single_event_order_idx": { + "name": "_home_pages_v_blocks_single_event_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "_home_pages_v_blocks_single_event_parent_id_idx": { + "name": "_home_pages_v_blocks_single_event_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "_home_pages_v_blocks_single_event_path_idx": { + "name": "_home_pages_v_blocks_single_event_path_idx", + "columns": ["_path"], + "isUnique": false + }, + "_home_pages_v_blocks_single_event_event_idx": { + "name": "_home_pages_v_blocks_single_event_event_idx", + "columns": ["event_id"], + "isUnique": false + } + }, + "foreignKeys": { + "_home_pages_v_blocks_single_event_event_id_events_id_fk": { + "name": "_home_pages_v_blocks_single_event_event_id_events_id_fk", + "tableFrom": "_home_pages_v_blocks_single_event", + "tableTo": "events", + "columnsFrom": ["event_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "_home_pages_v_blocks_single_event_parent_id_fk": { + "name": "_home_pages_v_blocks_single_event_parent_id_fk", + "tableFrom": "_home_pages_v_blocks_single_event", + "tableTo": "_home_pages_v", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_home_pages_v_blocks_sponsors_block": { + "name": "_home_pages_v_blocks_sponsors_block", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "background_color": { + "name": "background_color", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'transparent'" + }, + "sponsors_layout": { + "name": "sponsors_layout", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'static'" + }, + "_uuid": { + "name": "_uuid", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "_home_pages_v_blocks_sponsors_block_order_idx": { + "name": "_home_pages_v_blocks_sponsors_block_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "_home_pages_v_blocks_sponsors_block_parent_id_idx": { + "name": "_home_pages_v_blocks_sponsors_block_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "_home_pages_v_blocks_sponsors_block_path_idx": { + "name": "_home_pages_v_blocks_sponsors_block_path_idx", + "columns": ["_path"], + "isUnique": false + } + }, + "foreignKeys": { + "_home_pages_v_blocks_sponsors_block_parent_id_fk": { + "name": "_home_pages_v_blocks_sponsors_block_parent_id_fk", + "tableFrom": "_home_pages_v_blocks_sponsors_block", + "tableTo": "_home_pages_v", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_home_pages_v_blocks_team": { + "name": "_home_pages_v_blocks_team", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "team_id": { + "name": "team_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "_uuid": { + "name": "_uuid", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "_home_pages_v_blocks_team_order_idx": { + "name": "_home_pages_v_blocks_team_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "_home_pages_v_blocks_team_parent_id_idx": { + "name": "_home_pages_v_blocks_team_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "_home_pages_v_blocks_team_path_idx": { + "name": "_home_pages_v_blocks_team_path_idx", + "columns": ["_path"], + "isUnique": false + }, + "_home_pages_v_blocks_team_team_idx": { + "name": "_home_pages_v_blocks_team_team_idx", + "columns": ["team_id"], + "isUnique": false + } + }, + "foreignKeys": { + "_home_pages_v_blocks_team_team_id_teams_id_fk": { + "name": "_home_pages_v_blocks_team_team_id_teams_id_fk", + "tableFrom": "_home_pages_v_blocks_team", + "tableTo": "teams", + "columnsFrom": ["team_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "_home_pages_v_blocks_team_parent_id_fk": { + "name": "_home_pages_v_blocks_team_parent_id_fk", + "tableFrom": "_home_pages_v_blocks_team", + "tableTo": "_home_pages_v", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_home_pages_v_version_document_references": { + "name": "_home_pages_v_version_document_references", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "collection": { + "name": "collection", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "doc_id": { + "name": "doc_id", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "instances": { + "name": "instances", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "_uuid": { + "name": "_uuid", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "_home_pages_v_version_document_references_order_idx": { + "name": "_home_pages_v_version_document_references_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "_home_pages_v_version_document_references_parent_id_idx": { + "name": "_home_pages_v_version_document_references_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + } + }, + "foreignKeys": { + "_home_pages_v_version_document_references_parent_id_fk": { + "name": "_home_pages_v_version_document_references_parent_id_fk", + "tableFrom": "_home_pages_v_version_document_references", + "tableTo": "_home_pages_v", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_home_pages_v": { + "name": "_home_pages_v", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_tenant_id": { + "name": "version_tenant_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_highlighted_content_enabled": { + "name": "version_highlighted_content_enabled", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": false + }, + "version_highlighted_content_heading": { + "name": "version_highlighted_content_heading", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_highlighted_content_background_color": { + "name": "version_highlighted_content_background_color", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'transparent'" + }, + "version_published_at": { + "name": "version_published_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_content_hash": { + "name": "version_content_hash", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_updated_at": { + "name": "version_updated_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_created_at": { + "name": "version_created_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version__status": { + "name": "version__status", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'draft'" + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + }, + "latest": { + "name": "latest", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "_home_pages_v_parent_idx": { + "name": "_home_pages_v_parent_idx", + "columns": ["parent_id"], + "isUnique": false + }, + "_home_pages_v_version_version_tenant_idx": { + "name": "_home_pages_v_version_version_tenant_idx", + "columns": ["version_tenant_id"], + "isUnique": false + }, + "_home_pages_v_version_version_updated_at_idx": { + "name": "_home_pages_v_version_version_updated_at_idx", + "columns": ["version_updated_at"], + "isUnique": false + }, + "_home_pages_v_version_version_created_at_idx": { + "name": "_home_pages_v_version_version_created_at_idx", + "columns": ["version_created_at"], + "isUnique": false + }, + "_home_pages_v_version_version__status_idx": { + "name": "_home_pages_v_version_version__status_idx", + "columns": ["version__status"], + "isUnique": false + }, + "_home_pages_v_created_at_idx": { + "name": "_home_pages_v_created_at_idx", + "columns": ["created_at"], + "isUnique": false + }, + "_home_pages_v_updated_at_idx": { + "name": "_home_pages_v_updated_at_idx", + "columns": ["updated_at"], + "isUnique": false + }, + "_home_pages_v_latest_idx": { + "name": "_home_pages_v_latest_idx", + "columns": ["latest"], + "isUnique": false + } + }, + "foreignKeys": { + "_home_pages_v_parent_id_home_pages_id_fk": { + "name": "_home_pages_v_parent_id_home_pages_id_fk", + "tableFrom": "_home_pages_v", + "tableTo": "home_pages", + "columnsFrom": ["parent_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "_home_pages_v_version_tenant_id_tenants_id_fk": { + "name": "_home_pages_v_version_tenant_id_tenants_id_fk", + "tableFrom": "_home_pages_v", + "tableTo": "tenants", + "columnsFrom": ["version_tenant_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_home_pages_v_rels": { + "name": "_home_pages_v_rels", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "path": { + "name": "path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "pages_id": { + "name": "pages_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "built_in_pages_id": { + "name": "built_in_pages_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "posts_id": { + "name": "posts_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "tags_id": { + "name": "tags_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "event_groups_id": { + "name": "event_groups_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "event_tags_id": { + "name": "event_tags_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "events_id": { + "name": "events_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "sponsors_id": { + "name": "sponsors_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "_home_pages_v_rels_order_idx": { + "name": "_home_pages_v_rels_order_idx", + "columns": ["order"], + "isUnique": false + }, + "_home_pages_v_rels_parent_idx": { + "name": "_home_pages_v_rels_parent_idx", + "columns": ["parent_id"], + "isUnique": false + }, + "_home_pages_v_rels_path_idx": { + "name": "_home_pages_v_rels_path_idx", + "columns": ["path"], + "isUnique": false + }, + "_home_pages_v_rels_pages_id_idx": { + "name": "_home_pages_v_rels_pages_id_idx", + "columns": ["pages_id"], + "isUnique": false + }, + "_home_pages_v_rels_built_in_pages_id_idx": { + "name": "_home_pages_v_rels_built_in_pages_id_idx", + "columns": ["built_in_pages_id"], + "isUnique": false + }, + "_home_pages_v_rels_posts_id_idx": { + "name": "_home_pages_v_rels_posts_id_idx", + "columns": ["posts_id"], + "isUnique": false + }, + "_home_pages_v_rels_tags_id_idx": { + "name": "_home_pages_v_rels_tags_id_idx", + "columns": ["tags_id"], + "isUnique": false + }, + "_home_pages_v_rels_event_groups_id_idx": { + "name": "_home_pages_v_rels_event_groups_id_idx", + "columns": ["event_groups_id"], + "isUnique": false + }, + "_home_pages_v_rels_event_tags_id_idx": { + "name": "_home_pages_v_rels_event_tags_id_idx", + "columns": ["event_tags_id"], + "isUnique": false + }, + "_home_pages_v_rels_events_id_idx": { + "name": "_home_pages_v_rels_events_id_idx", + "columns": ["events_id"], + "isUnique": false + }, + "_home_pages_v_rels_sponsors_id_idx": { + "name": "_home_pages_v_rels_sponsors_id_idx", + "columns": ["sponsors_id"], + "isUnique": false + } + }, + "foreignKeys": { + "_home_pages_v_rels_parent_fk": { + "name": "_home_pages_v_rels_parent_fk", + "tableFrom": "_home_pages_v_rels", + "tableTo": "_home_pages_v", + "columnsFrom": ["parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "_home_pages_v_rels_pages_fk": { + "name": "_home_pages_v_rels_pages_fk", + "tableFrom": "_home_pages_v_rels", + "tableTo": "pages", + "columnsFrom": ["pages_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "_home_pages_v_rels_built_in_pages_fk": { + "name": "_home_pages_v_rels_built_in_pages_fk", + "tableFrom": "_home_pages_v_rels", + "tableTo": "built_in_pages", + "columnsFrom": ["built_in_pages_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "_home_pages_v_rels_posts_fk": { + "name": "_home_pages_v_rels_posts_fk", + "tableFrom": "_home_pages_v_rels", + "tableTo": "posts", + "columnsFrom": ["posts_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "_home_pages_v_rels_tags_fk": { + "name": "_home_pages_v_rels_tags_fk", + "tableFrom": "_home_pages_v_rels", + "tableTo": "tags", + "columnsFrom": ["tags_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "_home_pages_v_rels_event_groups_fk": { + "name": "_home_pages_v_rels_event_groups_fk", + "tableFrom": "_home_pages_v_rels", + "tableTo": "event_groups", + "columnsFrom": ["event_groups_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "_home_pages_v_rels_event_tags_fk": { + "name": "_home_pages_v_rels_event_tags_fk", + "tableFrom": "_home_pages_v_rels", + "tableTo": "event_tags", + "columnsFrom": ["event_tags_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "_home_pages_v_rels_events_fk": { + "name": "_home_pages_v_rels_events_fk", + "tableFrom": "_home_pages_v_rels", + "tableTo": "events", + "columnsFrom": ["events_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "_home_pages_v_rels_sponsors_fk": { + "name": "_home_pages_v_rels_sponsors_fk", + "tableFrom": "_home_pages_v_rels", + "tableTo": "sponsors", + "columnsFrom": ["sponsors_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "built_in_pages": { + "name": "built_in_pages", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "url": { + "name": "url", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "tenant_id": { + "name": "tenant_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "content_hash": { + "name": "content_hash", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + } + }, + "indexes": { + "built_in_pages_tenant_idx": { + "name": "built_in_pages_tenant_idx", + "columns": ["tenant_id"], + "isUnique": false + }, + "built_in_pages_updated_at_idx": { + "name": "built_in_pages_updated_at_idx", + "columns": ["updated_at"], + "isUnique": false + }, + "built_in_pages_created_at_idx": { + "name": "built_in_pages_created_at_idx", + "columns": ["created_at"], + "isUnique": false + } + }, + "foreignKeys": { + "built_in_pages_tenant_id_tenants_id_fk": { + "name": "built_in_pages_tenant_id_tenants_id_fk", + "tableFrom": "built_in_pages", + "tableTo": "tenants", + "columnsFrom": ["tenant_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "pages_blocks_blog_list": { + "name": "pages_blocks_blog_list", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "heading": { + "name": "heading", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "below_heading_content": { + "name": "below_heading_content", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "background_color": { + "name": "background_color", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'transparent'" + }, + "post_options": { + "name": "post_options", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'dynamic'" + }, + "dynamic_options_sort_by": { + "name": "dynamic_options_sort_by", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'-publishedAt'" + }, + "dynamic_options_max_posts": { + "name": "dynamic_options_max_posts", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": 4 + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "pages_blocks_blog_list_order_idx": { + "name": "pages_blocks_blog_list_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "pages_blocks_blog_list_parent_id_idx": { + "name": "pages_blocks_blog_list_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "pages_blocks_blog_list_path_idx": { + "name": "pages_blocks_blog_list_path_idx", + "columns": ["_path"], + "isUnique": false + } + }, + "foreignKeys": { + "pages_blocks_blog_list_parent_id_fk": { + "name": "pages_blocks_blog_list_parent_id_fk", + "tableFrom": "pages_blocks_blog_list", + "tableTo": "pages", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "pages_blocks_content_columns": { + "name": "pages_blocks_content_columns", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "rich_text": { + "name": "rich_text", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'{\"root\":{\"type\":\"root\",\"format\":\"\",\"indent\":0,\"version\":1,\"children\":[{\"type\":\"paragraph\",\"format\":\"\",\"indent\":0,\"version\":1,\"children\":[],\"direction\":\"ltr\",\"textStyle\":\"\",\"textFormat\":0}],\"direction\":\"ltr\"}}'" + } + }, + "indexes": { + "pages_blocks_content_columns_order_idx": { + "name": "pages_blocks_content_columns_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "pages_blocks_content_columns_parent_id_idx": { + "name": "pages_blocks_content_columns_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + } + }, + "foreignKeys": { + "pages_blocks_content_columns_parent_id_fk": { + "name": "pages_blocks_content_columns_parent_id_fk", + "tableFrom": "pages_blocks_content_columns", + "tableTo": "pages_blocks_content", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "pages_blocks_content": { + "name": "pages_blocks_content", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "background_color": { + "name": "background_color", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'transparent'" + }, + "layout": { + "name": "layout", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'1_1'" + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "pages_blocks_content_order_idx": { + "name": "pages_blocks_content_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "pages_blocks_content_parent_id_idx": { + "name": "pages_blocks_content_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "pages_blocks_content_path_idx": { + "name": "pages_blocks_content_path_idx", + "columns": ["_path"], + "isUnique": false + } + }, + "foreignKeys": { + "pages_blocks_content_parent_id_fk": { + "name": "pages_blocks_content_parent_id_fk", + "tableFrom": "pages_blocks_content", + "tableTo": "pages", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "pages_blocks_document_block": { + "name": "pages_blocks_document_block", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "document_id": { + "name": "document_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "pages_blocks_document_block_order_idx": { + "name": "pages_blocks_document_block_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "pages_blocks_document_block_parent_id_idx": { + "name": "pages_blocks_document_block_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "pages_blocks_document_block_path_idx": { + "name": "pages_blocks_document_block_path_idx", + "columns": ["_path"], + "isUnique": false + }, + "pages_blocks_document_block_document_idx": { + "name": "pages_blocks_document_block_document_idx", + "columns": ["document_id"], + "isUnique": false + } + }, + "foreignKeys": { + "pages_blocks_document_block_document_id_documents_id_fk": { + "name": "pages_blocks_document_block_document_id_documents_id_fk", + "tableFrom": "pages_blocks_document_block", + "tableTo": "documents", + "columnsFrom": ["document_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "pages_blocks_document_block_parent_id_fk": { + "name": "pages_blocks_document_block_parent_id_fk", + "tableFrom": "pages_blocks_document_block", + "tableTo": "pages", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "pages_blocks_event_list_dynamic_opts_by_types": { + "name": "pages_blocks_event_list_dynamic_opts_by_types", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "parent_id": { + "name": "parent_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "value": { + "name": "value", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "pages_blocks_event_list_dynamic_opts_by_types_order_idx": { + "name": "pages_blocks_event_list_dynamic_opts_by_types_order_idx", + "columns": ["order"], + "isUnique": false + }, + "pages_blocks_event_list_dynamic_opts_by_types_parent_idx": { + "name": "pages_blocks_event_list_dynamic_opts_by_types_parent_idx", + "columns": ["parent_id"], + "isUnique": false + } + }, + "foreignKeys": { + "pages_blocks_event_list_dynamic_opts_by_types_parent_fk": { + "name": "pages_blocks_event_list_dynamic_opts_by_types_parent_fk", + "tableFrom": "pages_blocks_event_list_dynamic_opts_by_types", + "tableTo": "pages_blocks_event_list", + "columnsFrom": ["parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "pages_blocks_event_list": { + "name": "pages_blocks_event_list", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "background_color": { + "name": "background_color", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'transparent'" + }, + "heading": { + "name": "heading", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "below_heading_content": { + "name": "below_heading_content", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "event_options": { + "name": "event_options", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'dynamic'" + }, + "dynamic_opts_max_events": { + "name": "dynamic_opts_max_events", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": 4 + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "pages_blocks_event_list_order_idx": { + "name": "pages_blocks_event_list_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "pages_blocks_event_list_parent_id_idx": { + "name": "pages_blocks_event_list_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "pages_blocks_event_list_path_idx": { + "name": "pages_blocks_event_list_path_idx", + "columns": ["_path"], + "isUnique": false + } + }, + "foreignKeys": { + "pages_blocks_event_list_parent_id_fk": { + "name": "pages_blocks_event_list_parent_id_fk", + "tableFrom": "pages_blocks_event_list", + "tableTo": "pages", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "pages_blocks_event_table_dynamic_opts_by_types": { + "name": "pages_blocks_event_table_dynamic_opts_by_types", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "parent_id": { + "name": "parent_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "value": { + "name": "value", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "pages_blocks_event_table_dynamic_opts_by_types_order_idx": { + "name": "pages_blocks_event_table_dynamic_opts_by_types_order_idx", + "columns": ["order"], + "isUnique": false + }, + "pages_blocks_event_table_dynamic_opts_by_types_parent_idx": { + "name": "pages_blocks_event_table_dynamic_opts_by_types_parent_idx", + "columns": ["parent_id"], + "isUnique": false + } + }, + "foreignKeys": { + "pages_blocks_event_table_dynamic_opts_by_types_parent_fk": { + "name": "pages_blocks_event_table_dynamic_opts_by_types_parent_fk", + "tableFrom": "pages_blocks_event_table_dynamic_opts_by_types", + "tableTo": "pages_blocks_event_table", + "columnsFrom": ["parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "pages_blocks_event_table": { + "name": "pages_blocks_event_table", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "background_color": { + "name": "background_color", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'transparent'" + }, + "heading": { + "name": "heading", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "below_heading_content": { + "name": "below_heading_content", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "event_options": { + "name": "event_options", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'dynamic'" + }, + "dynamic_opts_max_events": { + "name": "dynamic_opts_max_events", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": 4 + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "pages_blocks_event_table_order_idx": { + "name": "pages_blocks_event_table_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "pages_blocks_event_table_parent_id_idx": { + "name": "pages_blocks_event_table_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "pages_blocks_event_table_path_idx": { + "name": "pages_blocks_event_table_path_idx", + "columns": ["_path"], + "isUnique": false + } + }, + "foreignKeys": { + "pages_blocks_event_table_parent_id_fk": { + "name": "pages_blocks_event_table_parent_id_fk", + "tableFrom": "pages_blocks_event_table", + "tableTo": "pages", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "pages_blocks_form_block": { + "name": "pages_blocks_form_block", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "form_id": { + "name": "form_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "enable_intro": { + "name": "enable_intro", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "intro_content": { + "name": "intro_content", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "pages_blocks_form_block_order_idx": { + "name": "pages_blocks_form_block_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "pages_blocks_form_block_parent_id_idx": { + "name": "pages_blocks_form_block_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "pages_blocks_form_block_path_idx": { + "name": "pages_blocks_form_block_path_idx", + "columns": ["_path"], + "isUnique": false + }, + "pages_blocks_form_block_form_idx": { + "name": "pages_blocks_form_block_form_idx", + "columns": ["form_id"], + "isUnique": false + } + }, + "foreignKeys": { + "pages_blocks_form_block_form_id_forms_id_fk": { + "name": "pages_blocks_form_block_form_id_forms_id_fk", + "tableFrom": "pages_blocks_form_block", + "tableTo": "forms", + "columnsFrom": ["form_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "pages_blocks_form_block_parent_id_fk": { + "name": "pages_blocks_form_block_parent_id_fk", + "tableFrom": "pages_blocks_form_block", + "tableTo": "pages", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "pages_blocks_generic_embed": { + "name": "pages_blocks_generic_embed", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "html": { + "name": "html", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "background_color": { + "name": "background_color", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'transparent'" + }, + "align_content": { + "name": "align_content", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'left'" + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "pages_blocks_generic_embed_order_idx": { + "name": "pages_blocks_generic_embed_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "pages_blocks_generic_embed_parent_id_idx": { + "name": "pages_blocks_generic_embed_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "pages_blocks_generic_embed_path_idx": { + "name": "pages_blocks_generic_embed_path_idx", + "columns": ["_path"], + "isUnique": false + } + }, + "foreignKeys": { + "pages_blocks_generic_embed_parent_id_fk": { + "name": "pages_blocks_generic_embed_parent_id_fk", + "tableFrom": "pages_blocks_generic_embed", + "tableTo": "pages", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "pages_blocks_header_block": { + "name": "pages_blocks_header_block", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "rich_text": { + "name": "rich_text", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "background_color": { + "name": "background_color", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'transparent'" + }, + "full_width_color": { + "name": "full_width_color", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": true + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "pages_blocks_header_block_order_idx": { + "name": "pages_blocks_header_block_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "pages_blocks_header_block_parent_id_idx": { + "name": "pages_blocks_header_block_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "pages_blocks_header_block_path_idx": { + "name": "pages_blocks_header_block_path_idx", + "columns": ["_path"], + "isUnique": false + } + }, + "foreignKeys": { + "pages_blocks_header_block_parent_id_fk": { + "name": "pages_blocks_header_block_parent_id_fk", + "tableFrom": "pages_blocks_header_block", + "tableTo": "pages", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "pages_blocks_image_link_grid_columns": { + "name": "pages_blocks_image_link_grid_columns", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "image_id": { + "name": "image_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_type": { + "name": "link_type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'internal'" + }, + "link_new_tab": { + "name": "link_new_tab", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_url": { + "name": "link_url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "caption": { + "name": "caption", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "pages_blocks_image_link_grid_columns_order_idx": { + "name": "pages_blocks_image_link_grid_columns_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "pages_blocks_image_link_grid_columns_parent_id_idx": { + "name": "pages_blocks_image_link_grid_columns_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "pages_blocks_image_link_grid_columns_image_idx": { + "name": "pages_blocks_image_link_grid_columns_image_idx", + "columns": ["image_id"], + "isUnique": false + } + }, + "foreignKeys": { + "pages_blocks_image_link_grid_columns_image_id_media_id_fk": { + "name": "pages_blocks_image_link_grid_columns_image_id_media_id_fk", + "tableFrom": "pages_blocks_image_link_grid_columns", + "tableTo": "media", + "columnsFrom": ["image_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "pages_blocks_image_link_grid_columns_parent_id_fk": { + "name": "pages_blocks_image_link_grid_columns_parent_id_fk", + "tableFrom": "pages_blocks_image_link_grid_columns", + "tableTo": "pages_blocks_image_link_grid", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "pages_blocks_image_link_grid": { + "name": "pages_blocks_image_link_grid", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "pages_blocks_image_link_grid_order_idx": { + "name": "pages_blocks_image_link_grid_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "pages_blocks_image_link_grid_parent_id_idx": { + "name": "pages_blocks_image_link_grid_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "pages_blocks_image_link_grid_path_idx": { + "name": "pages_blocks_image_link_grid_path_idx", + "columns": ["_path"], + "isUnique": false + } + }, + "foreignKeys": { + "pages_blocks_image_link_grid_parent_id_fk": { + "name": "pages_blocks_image_link_grid_parent_id_fk", + "tableFrom": "pages_blocks_image_link_grid", + "tableTo": "pages", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "pages_blocks_image_text": { + "name": "pages_blocks_image_text", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "background_color": { + "name": "background_color", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'transparent'" + }, + "image_layout": { + "name": "image_layout", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'left'" + }, + "image_id": { + "name": "image_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "text_wrap": { + "name": "text_wrap", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": false + }, + "rich_text": { + "name": "rich_text", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "pages_blocks_image_text_order_idx": { + "name": "pages_blocks_image_text_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "pages_blocks_image_text_parent_id_idx": { + "name": "pages_blocks_image_text_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "pages_blocks_image_text_path_idx": { + "name": "pages_blocks_image_text_path_idx", + "columns": ["_path"], + "isUnique": false + }, + "pages_blocks_image_text_image_idx": { + "name": "pages_blocks_image_text_image_idx", + "columns": ["image_id"], + "isUnique": false + } + }, + "foreignKeys": { + "pages_blocks_image_text_image_id_media_id_fk": { + "name": "pages_blocks_image_text_image_id_media_id_fk", + "tableFrom": "pages_blocks_image_text", + "tableTo": "media", + "columnsFrom": ["image_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "pages_blocks_image_text_parent_id_fk": { + "name": "pages_blocks_image_text_parent_id_fk", + "tableFrom": "pages_blocks_image_text", + "tableTo": "pages", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "pages_blocks_link_preview_cards": { + "name": "pages_blocks_link_preview_cards", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "image_id": { + "name": "image_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "text": { + "name": "text", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "button_type": { + "name": "button_type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'internal'" + }, + "button_new_tab": { + "name": "button_new_tab", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "button_url": { + "name": "button_url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "button_label": { + "name": "button_label", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "button_variant": { + "name": "button_variant", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'default'" + } + }, + "indexes": { + "pages_blocks_link_preview_cards_order_idx": { + "name": "pages_blocks_link_preview_cards_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "pages_blocks_link_preview_cards_parent_id_idx": { + "name": "pages_blocks_link_preview_cards_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "pages_blocks_link_preview_cards_image_idx": { + "name": "pages_blocks_link_preview_cards_image_idx", + "columns": ["image_id"], + "isUnique": false + } + }, + "foreignKeys": { + "pages_blocks_link_preview_cards_image_id_media_id_fk": { + "name": "pages_blocks_link_preview_cards_image_id_media_id_fk", + "tableFrom": "pages_blocks_link_preview_cards", + "tableTo": "media", + "columnsFrom": ["image_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "pages_blocks_link_preview_cards_parent_id_fk": { + "name": "pages_blocks_link_preview_cards_parent_id_fk", + "tableFrom": "pages_blocks_link_preview_cards", + "tableTo": "pages_blocks_link_preview", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "pages_blocks_link_preview": { + "name": "pages_blocks_link_preview", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "header": { + "name": "header", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "background_color": { + "name": "background_color", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'transparent'" + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "pages_blocks_link_preview_order_idx": { + "name": "pages_blocks_link_preview_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "pages_blocks_link_preview_parent_id_idx": { + "name": "pages_blocks_link_preview_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "pages_blocks_link_preview_path_idx": { + "name": "pages_blocks_link_preview_path_idx", + "columns": ["_path"], + "isUnique": false + } + }, + "foreignKeys": { + "pages_blocks_link_preview_parent_id_fk": { + "name": "pages_blocks_link_preview_parent_id_fk", + "tableFrom": "pages_blocks_link_preview", + "tableTo": "pages", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "pages_blocks_media_block": { + "name": "pages_blocks_media_block", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "media_id": { + "name": "media_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "caption": { + "name": "caption", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "background_color": { + "name": "background_color", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'transparent'" + }, + "align_content": { + "name": "align_content", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'left'" + }, + "image_size": { + "name": "image_size", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'original'" + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "pages_blocks_media_block_order_idx": { + "name": "pages_blocks_media_block_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "pages_blocks_media_block_parent_id_idx": { + "name": "pages_blocks_media_block_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "pages_blocks_media_block_path_idx": { + "name": "pages_blocks_media_block_path_idx", + "columns": ["_path"], + "isUnique": false + }, + "pages_blocks_media_block_media_idx": { + "name": "pages_blocks_media_block_media_idx", + "columns": ["media_id"], + "isUnique": false + } + }, + "foreignKeys": { + "pages_blocks_media_block_media_id_media_id_fk": { + "name": "pages_blocks_media_block_media_id_media_id_fk", + "tableFrom": "pages_blocks_media_block", + "tableTo": "media", + "columnsFrom": ["media_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "pages_blocks_media_block_parent_id_fk": { + "name": "pages_blocks_media_block_parent_id_fk", + "tableFrom": "pages_blocks_media_block", + "tableTo": "pages", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "pages_blocks_nac_media_block": { + "name": "pages_blocks_nac_media_block", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "background_color": { + "name": "background_color", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'transparent'" + }, + "mode": { + "name": "mode", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'carousel'" + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "pages_blocks_nac_media_block_order_idx": { + "name": "pages_blocks_nac_media_block_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "pages_blocks_nac_media_block_parent_id_idx": { + "name": "pages_blocks_nac_media_block_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "pages_blocks_nac_media_block_path_idx": { + "name": "pages_blocks_nac_media_block_path_idx", + "columns": ["_path"], + "isUnique": false + } + }, + "foreignKeys": { + "pages_blocks_nac_media_block_parent_id_fk": { + "name": "pages_blocks_nac_media_block_parent_id_fk", + "tableFrom": "pages_blocks_nac_media_block", + "tableTo": "pages", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "pages_blocks_single_blog_post": { + "name": "pages_blocks_single_blog_post", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "background_color": { + "name": "background_color", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'transparent'" + }, + "post_id": { + "name": "post_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "pages_blocks_single_blog_post_order_idx": { + "name": "pages_blocks_single_blog_post_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "pages_blocks_single_blog_post_parent_id_idx": { + "name": "pages_blocks_single_blog_post_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "pages_blocks_single_blog_post_path_idx": { + "name": "pages_blocks_single_blog_post_path_idx", + "columns": ["_path"], + "isUnique": false + }, + "pages_blocks_single_blog_post_post_idx": { + "name": "pages_blocks_single_blog_post_post_idx", + "columns": ["post_id"], + "isUnique": false + } + }, + "foreignKeys": { + "pages_blocks_single_blog_post_post_id_posts_id_fk": { + "name": "pages_blocks_single_blog_post_post_id_posts_id_fk", + "tableFrom": "pages_blocks_single_blog_post", + "tableTo": "posts", + "columnsFrom": ["post_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "pages_blocks_single_blog_post_parent_id_fk": { + "name": "pages_blocks_single_blog_post_parent_id_fk", + "tableFrom": "pages_blocks_single_blog_post", + "tableTo": "pages", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "pages_blocks_single_event": { + "name": "pages_blocks_single_event", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "background_color": { + "name": "background_color", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'transparent'" + }, + "event_id": { + "name": "event_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "pages_blocks_single_event_order_idx": { + "name": "pages_blocks_single_event_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "pages_blocks_single_event_parent_id_idx": { + "name": "pages_blocks_single_event_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "pages_blocks_single_event_path_idx": { + "name": "pages_blocks_single_event_path_idx", + "columns": ["_path"], + "isUnique": false + }, + "pages_blocks_single_event_event_idx": { + "name": "pages_blocks_single_event_event_idx", + "columns": ["event_id"], + "isUnique": false + } + }, + "foreignKeys": { + "pages_blocks_single_event_event_id_events_id_fk": { + "name": "pages_blocks_single_event_event_id_events_id_fk", + "tableFrom": "pages_blocks_single_event", + "tableTo": "events", + "columnsFrom": ["event_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "pages_blocks_single_event_parent_id_fk": { + "name": "pages_blocks_single_event_parent_id_fk", + "tableFrom": "pages_blocks_single_event", + "tableTo": "pages", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "pages_blocks_sponsors_block": { + "name": "pages_blocks_sponsors_block", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "background_color": { + "name": "background_color", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'transparent'" + }, + "sponsors_layout": { + "name": "sponsors_layout", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'static'" + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "pages_blocks_sponsors_block_order_idx": { + "name": "pages_blocks_sponsors_block_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "pages_blocks_sponsors_block_parent_id_idx": { + "name": "pages_blocks_sponsors_block_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "pages_blocks_sponsors_block_path_idx": { + "name": "pages_blocks_sponsors_block_path_idx", + "columns": ["_path"], + "isUnique": false + } + }, + "foreignKeys": { + "pages_blocks_sponsors_block_parent_id_fk": { + "name": "pages_blocks_sponsors_block_parent_id_fk", + "tableFrom": "pages_blocks_sponsors_block", + "tableTo": "pages", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "pages_blocks_team": { + "name": "pages_blocks_team", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "team_id": { + "name": "team_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "pages_blocks_team_order_idx": { + "name": "pages_blocks_team_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "pages_blocks_team_parent_id_idx": { + "name": "pages_blocks_team_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "pages_blocks_team_path_idx": { + "name": "pages_blocks_team_path_idx", + "columns": ["_path"], + "isUnique": false + }, + "pages_blocks_team_team_idx": { + "name": "pages_blocks_team_team_idx", + "columns": ["team_id"], + "isUnique": false + } + }, + "foreignKeys": { + "pages_blocks_team_team_id_teams_id_fk": { + "name": "pages_blocks_team_team_id_teams_id_fk", + "tableFrom": "pages_blocks_team", + "tableTo": "teams", + "columnsFrom": ["team_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "pages_blocks_team_parent_id_fk": { + "name": "pages_blocks_team_parent_id_fk", + "tableFrom": "pages_blocks_team", + "tableTo": "pages", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "pages_document_references": { + "name": "pages_document_references", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "collection": { + "name": "collection", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "doc_id": { + "name": "doc_id", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "instances": { + "name": "instances", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "pages_document_references_order_idx": { + "name": "pages_document_references_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "pages_document_references_parent_id_idx": { + "name": "pages_document_references_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + } + }, + "foreignKeys": { + "pages_document_references_parent_id_fk": { + "name": "pages_document_references_parent_id_fk", + "tableFrom": "pages_document_references", + "tableTo": "pages", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "pages": { + "name": "pages", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "meta_image_id": { + "name": "meta_image_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "meta_description": { + "name": "meta_description", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "published_at": { + "name": "published_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "slug": { + "name": "slug", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "tenant_id": { + "name": "tenant_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "content_hash": { + "name": "content_hash", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + }, + "_status": { + "name": "_status", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'draft'" + } + }, + "indexes": { + "pages_meta_meta_image_idx": { + "name": "pages_meta_meta_image_idx", + "columns": ["meta_image_id"], + "isUnique": false + }, + "pages_slug_idx": { + "name": "pages_slug_idx", + "columns": ["slug"], + "isUnique": false + }, + "pages_tenant_idx": { + "name": "pages_tenant_idx", + "columns": ["tenant_id"], + "isUnique": false + }, + "pages_updated_at_idx": { + "name": "pages_updated_at_idx", + "columns": ["updated_at"], + "isUnique": false + }, + "pages_created_at_idx": { + "name": "pages_created_at_idx", + "columns": ["created_at"], + "isUnique": false + }, + "pages__status_idx": { + "name": "pages__status_idx", + "columns": ["_status"], + "isUnique": false + } + }, + "foreignKeys": { + "pages_meta_image_id_media_id_fk": { + "name": "pages_meta_image_id_media_id_fk", + "tableFrom": "pages", + "tableTo": "media", + "columnsFrom": ["meta_image_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "pages_tenant_id_tenants_id_fk": { + "name": "pages_tenant_id_tenants_id_fk", + "tableFrom": "pages", + "tableTo": "tenants", + "columnsFrom": ["tenant_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "pages_rels": { + "name": "pages_rels", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "path": { + "name": "path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "tags_id": { + "name": "tags_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "posts_id": { + "name": "posts_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "event_groups_id": { + "name": "event_groups_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "event_tags_id": { + "name": "event_tags_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "events_id": { + "name": "events_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "pages_id": { + "name": "pages_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "built_in_pages_id": { + "name": "built_in_pages_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "sponsors_id": { + "name": "sponsors_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "pages_rels_order_idx": { + "name": "pages_rels_order_idx", + "columns": ["order"], + "isUnique": false + }, + "pages_rels_parent_idx": { + "name": "pages_rels_parent_idx", + "columns": ["parent_id"], + "isUnique": false + }, + "pages_rels_path_idx": { + "name": "pages_rels_path_idx", + "columns": ["path"], + "isUnique": false + }, + "pages_rels_tags_id_idx": { + "name": "pages_rels_tags_id_idx", + "columns": ["tags_id"], + "isUnique": false + }, + "pages_rels_posts_id_idx": { + "name": "pages_rels_posts_id_idx", + "columns": ["posts_id"], + "isUnique": false + }, + "pages_rels_event_groups_id_idx": { + "name": "pages_rels_event_groups_id_idx", + "columns": ["event_groups_id"], + "isUnique": false + }, + "pages_rels_event_tags_id_idx": { + "name": "pages_rels_event_tags_id_idx", + "columns": ["event_tags_id"], + "isUnique": false + }, + "pages_rels_events_id_idx": { + "name": "pages_rels_events_id_idx", + "columns": ["events_id"], + "isUnique": false + }, + "pages_rels_pages_id_idx": { + "name": "pages_rels_pages_id_idx", + "columns": ["pages_id"], + "isUnique": false + }, + "pages_rels_built_in_pages_id_idx": { + "name": "pages_rels_built_in_pages_id_idx", + "columns": ["built_in_pages_id"], + "isUnique": false + }, + "pages_rels_sponsors_id_idx": { + "name": "pages_rels_sponsors_id_idx", + "columns": ["sponsors_id"], + "isUnique": false + } + }, + "foreignKeys": { + "pages_rels_parent_fk": { + "name": "pages_rels_parent_fk", + "tableFrom": "pages_rels", + "tableTo": "pages", + "columnsFrom": ["parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "pages_rels_tags_fk": { + "name": "pages_rels_tags_fk", + "tableFrom": "pages_rels", + "tableTo": "tags", + "columnsFrom": ["tags_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "pages_rels_posts_fk": { + "name": "pages_rels_posts_fk", + "tableFrom": "pages_rels", + "tableTo": "posts", + "columnsFrom": ["posts_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "pages_rels_event_groups_fk": { + "name": "pages_rels_event_groups_fk", + "tableFrom": "pages_rels", + "tableTo": "event_groups", + "columnsFrom": ["event_groups_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "pages_rels_event_tags_fk": { + "name": "pages_rels_event_tags_fk", + "tableFrom": "pages_rels", + "tableTo": "event_tags", + "columnsFrom": ["event_tags_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "pages_rels_events_fk": { + "name": "pages_rels_events_fk", + "tableFrom": "pages_rels", + "tableTo": "events", + "columnsFrom": ["events_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "pages_rels_pages_fk": { + "name": "pages_rels_pages_fk", + "tableFrom": "pages_rels", + "tableTo": "pages", + "columnsFrom": ["pages_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "pages_rels_built_in_pages_fk": { + "name": "pages_rels_built_in_pages_fk", + "tableFrom": "pages_rels", + "tableTo": "built_in_pages", + "columnsFrom": ["built_in_pages_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "pages_rels_sponsors_fk": { + "name": "pages_rels_sponsors_fk", + "tableFrom": "pages_rels", + "tableTo": "sponsors", + "columnsFrom": ["sponsors_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_pages_v_blocks_blog_list": { + "name": "_pages_v_blocks_blog_list", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "heading": { + "name": "heading", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "below_heading_content": { + "name": "below_heading_content", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "background_color": { + "name": "background_color", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'transparent'" + }, + "post_options": { + "name": "post_options", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'dynamic'" + }, + "dynamic_options_sort_by": { + "name": "dynamic_options_sort_by", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'-publishedAt'" + }, + "dynamic_options_max_posts": { + "name": "dynamic_options_max_posts", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": 4 + }, + "_uuid": { + "name": "_uuid", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "_pages_v_blocks_blog_list_order_idx": { + "name": "_pages_v_blocks_blog_list_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "_pages_v_blocks_blog_list_parent_id_idx": { + "name": "_pages_v_blocks_blog_list_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "_pages_v_blocks_blog_list_path_idx": { + "name": "_pages_v_blocks_blog_list_path_idx", + "columns": ["_path"], + "isUnique": false + } + }, + "foreignKeys": { + "_pages_v_blocks_blog_list_parent_id_fk": { + "name": "_pages_v_blocks_blog_list_parent_id_fk", + "tableFrom": "_pages_v_blocks_blog_list", + "tableTo": "_pages_v", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_pages_v_blocks_content_columns": { + "name": "_pages_v_blocks_content_columns", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "rich_text": { + "name": "rich_text", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'{\"root\":{\"type\":\"root\",\"format\":\"\",\"indent\":0,\"version\":1,\"children\":[{\"type\":\"paragraph\",\"format\":\"\",\"indent\":0,\"version\":1,\"children\":[],\"direction\":\"ltr\",\"textStyle\":\"\",\"textFormat\":0}],\"direction\":\"ltr\"}}'" + }, + "_uuid": { + "name": "_uuid", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "_pages_v_blocks_content_columns_order_idx": { + "name": "_pages_v_blocks_content_columns_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "_pages_v_blocks_content_columns_parent_id_idx": { + "name": "_pages_v_blocks_content_columns_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + } + }, + "foreignKeys": { + "_pages_v_blocks_content_columns_parent_id_fk": { + "name": "_pages_v_blocks_content_columns_parent_id_fk", + "tableFrom": "_pages_v_blocks_content_columns", + "tableTo": "_pages_v_blocks_content", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_pages_v_blocks_content": { + "name": "_pages_v_blocks_content", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "background_color": { + "name": "background_color", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'transparent'" + }, + "layout": { + "name": "layout", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'1_1'" + }, + "_uuid": { + "name": "_uuid", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "_pages_v_blocks_content_order_idx": { + "name": "_pages_v_blocks_content_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "_pages_v_blocks_content_parent_id_idx": { + "name": "_pages_v_blocks_content_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "_pages_v_blocks_content_path_idx": { + "name": "_pages_v_blocks_content_path_idx", + "columns": ["_path"], + "isUnique": false + } + }, + "foreignKeys": { + "_pages_v_blocks_content_parent_id_fk": { + "name": "_pages_v_blocks_content_parent_id_fk", + "tableFrom": "_pages_v_blocks_content", + "tableTo": "_pages_v", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_pages_v_blocks_document_block": { + "name": "_pages_v_blocks_document_block", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "document_id": { + "name": "document_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "_uuid": { + "name": "_uuid", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "_pages_v_blocks_document_block_order_idx": { + "name": "_pages_v_blocks_document_block_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "_pages_v_blocks_document_block_parent_id_idx": { + "name": "_pages_v_blocks_document_block_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "_pages_v_blocks_document_block_path_idx": { + "name": "_pages_v_blocks_document_block_path_idx", + "columns": ["_path"], + "isUnique": false + }, + "_pages_v_blocks_document_block_document_idx": { + "name": "_pages_v_blocks_document_block_document_idx", + "columns": ["document_id"], + "isUnique": false + } + }, + "foreignKeys": { + "_pages_v_blocks_document_block_document_id_documents_id_fk": { + "name": "_pages_v_blocks_document_block_document_id_documents_id_fk", + "tableFrom": "_pages_v_blocks_document_block", + "tableTo": "documents", + "columnsFrom": ["document_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "_pages_v_blocks_document_block_parent_id_fk": { + "name": "_pages_v_blocks_document_block_parent_id_fk", + "tableFrom": "_pages_v_blocks_document_block", + "tableTo": "_pages_v", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_pages_v_blocks_event_list_dynamic_opts_by_types": { + "name": "_pages_v_blocks_event_list_dynamic_opts_by_types", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "value": { + "name": "value", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "_pages_v_blocks_event_list_dynamic_opts_by_types_order_idx": { + "name": "_pages_v_blocks_event_list_dynamic_opts_by_types_order_idx", + "columns": ["order"], + "isUnique": false + }, + "_pages_v_blocks_event_list_dynamic_opts_by_types_parent_idx": { + "name": "_pages_v_blocks_event_list_dynamic_opts_by_types_parent_idx", + "columns": ["parent_id"], + "isUnique": false + } + }, + "foreignKeys": { + "_pages_v_blocks_event_list_dynamic_opts_by_types_parent_fk": { + "name": "_pages_v_blocks_event_list_dynamic_opts_by_types_parent_fk", + "tableFrom": "_pages_v_blocks_event_list_dynamic_opts_by_types", + "tableTo": "_pages_v_blocks_event_list", + "columnsFrom": ["parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_pages_v_blocks_event_list": { + "name": "_pages_v_blocks_event_list", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "background_color": { + "name": "background_color", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'transparent'" + }, + "heading": { + "name": "heading", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "below_heading_content": { + "name": "below_heading_content", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "event_options": { + "name": "event_options", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'dynamic'" + }, + "dynamic_opts_max_events": { + "name": "dynamic_opts_max_events", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": 4 + }, + "_uuid": { + "name": "_uuid", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "_pages_v_blocks_event_list_order_idx": { + "name": "_pages_v_blocks_event_list_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "_pages_v_blocks_event_list_parent_id_idx": { + "name": "_pages_v_blocks_event_list_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "_pages_v_blocks_event_list_path_idx": { + "name": "_pages_v_blocks_event_list_path_idx", + "columns": ["_path"], + "isUnique": false + } + }, + "foreignKeys": { + "_pages_v_blocks_event_list_parent_id_fk": { + "name": "_pages_v_blocks_event_list_parent_id_fk", + "tableFrom": "_pages_v_blocks_event_list", + "tableTo": "_pages_v", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_pages_v_blocks_event_table_dynamic_opts_by_types": { + "name": "_pages_v_blocks_event_table_dynamic_opts_by_types", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "value": { + "name": "value", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "_pages_v_blocks_event_table_dynamic_opts_by_types_order_idx": { + "name": "_pages_v_blocks_event_table_dynamic_opts_by_types_order_idx", + "columns": ["order"], + "isUnique": false + }, + "_pages_v_blocks_event_table_dynamic_opts_by_types_parent_idx": { + "name": "_pages_v_blocks_event_table_dynamic_opts_by_types_parent_idx", + "columns": ["parent_id"], + "isUnique": false + } + }, + "foreignKeys": { + "_pages_v_blocks_event_table_dynamic_opts_by_types_parent_fk": { + "name": "_pages_v_blocks_event_table_dynamic_opts_by_types_parent_fk", + "tableFrom": "_pages_v_blocks_event_table_dynamic_opts_by_types", + "tableTo": "_pages_v_blocks_event_table", + "columnsFrom": ["parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_pages_v_blocks_event_table": { + "name": "_pages_v_blocks_event_table", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "background_color": { + "name": "background_color", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'transparent'" + }, + "heading": { + "name": "heading", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "below_heading_content": { + "name": "below_heading_content", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "event_options": { + "name": "event_options", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'dynamic'" + }, + "dynamic_opts_max_events": { + "name": "dynamic_opts_max_events", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": 4 + }, + "_uuid": { + "name": "_uuid", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "_pages_v_blocks_event_table_order_idx": { + "name": "_pages_v_blocks_event_table_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "_pages_v_blocks_event_table_parent_id_idx": { + "name": "_pages_v_blocks_event_table_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "_pages_v_blocks_event_table_path_idx": { + "name": "_pages_v_blocks_event_table_path_idx", + "columns": ["_path"], + "isUnique": false + } + }, + "foreignKeys": { + "_pages_v_blocks_event_table_parent_id_fk": { + "name": "_pages_v_blocks_event_table_parent_id_fk", + "tableFrom": "_pages_v_blocks_event_table", + "tableTo": "_pages_v", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_pages_v_blocks_form_block": { + "name": "_pages_v_blocks_form_block", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "form_id": { + "name": "form_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "enable_intro": { + "name": "enable_intro", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "intro_content": { + "name": "intro_content", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "_uuid": { + "name": "_uuid", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "_pages_v_blocks_form_block_order_idx": { + "name": "_pages_v_blocks_form_block_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "_pages_v_blocks_form_block_parent_id_idx": { + "name": "_pages_v_blocks_form_block_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "_pages_v_blocks_form_block_path_idx": { + "name": "_pages_v_blocks_form_block_path_idx", + "columns": ["_path"], + "isUnique": false + }, + "_pages_v_blocks_form_block_form_idx": { + "name": "_pages_v_blocks_form_block_form_idx", + "columns": ["form_id"], + "isUnique": false + } + }, + "foreignKeys": { + "_pages_v_blocks_form_block_form_id_forms_id_fk": { + "name": "_pages_v_blocks_form_block_form_id_forms_id_fk", + "tableFrom": "_pages_v_blocks_form_block", + "tableTo": "forms", + "columnsFrom": ["form_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "_pages_v_blocks_form_block_parent_id_fk": { + "name": "_pages_v_blocks_form_block_parent_id_fk", + "tableFrom": "_pages_v_blocks_form_block", + "tableTo": "_pages_v", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_pages_v_blocks_generic_embed": { + "name": "_pages_v_blocks_generic_embed", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "html": { + "name": "html", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "background_color": { + "name": "background_color", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'transparent'" + }, + "align_content": { + "name": "align_content", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'left'" + }, + "_uuid": { + "name": "_uuid", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "_pages_v_blocks_generic_embed_order_idx": { + "name": "_pages_v_blocks_generic_embed_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "_pages_v_blocks_generic_embed_parent_id_idx": { + "name": "_pages_v_blocks_generic_embed_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "_pages_v_blocks_generic_embed_path_idx": { + "name": "_pages_v_blocks_generic_embed_path_idx", + "columns": ["_path"], + "isUnique": false + } + }, + "foreignKeys": { + "_pages_v_blocks_generic_embed_parent_id_fk": { + "name": "_pages_v_blocks_generic_embed_parent_id_fk", + "tableFrom": "_pages_v_blocks_generic_embed", + "tableTo": "_pages_v", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_pages_v_blocks_header_block": { + "name": "_pages_v_blocks_header_block", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "rich_text": { + "name": "rich_text", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "background_color": { + "name": "background_color", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'transparent'" + }, + "full_width_color": { + "name": "full_width_color", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": true + }, + "_uuid": { + "name": "_uuid", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "_pages_v_blocks_header_block_order_idx": { + "name": "_pages_v_blocks_header_block_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "_pages_v_blocks_header_block_parent_id_idx": { + "name": "_pages_v_blocks_header_block_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "_pages_v_blocks_header_block_path_idx": { + "name": "_pages_v_blocks_header_block_path_idx", + "columns": ["_path"], + "isUnique": false + } + }, + "foreignKeys": { + "_pages_v_blocks_header_block_parent_id_fk": { + "name": "_pages_v_blocks_header_block_parent_id_fk", + "tableFrom": "_pages_v_blocks_header_block", + "tableTo": "_pages_v", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_pages_v_blocks_image_link_grid_columns": { + "name": "_pages_v_blocks_image_link_grid_columns", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "image_id": { + "name": "image_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_type": { + "name": "link_type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'internal'" + }, + "link_new_tab": { + "name": "link_new_tab", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_url": { + "name": "link_url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "caption": { + "name": "caption", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "_uuid": { + "name": "_uuid", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "_pages_v_blocks_image_link_grid_columns_order_idx": { + "name": "_pages_v_blocks_image_link_grid_columns_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "_pages_v_blocks_image_link_grid_columns_parent_id_idx": { + "name": "_pages_v_blocks_image_link_grid_columns_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "_pages_v_blocks_image_link_grid_columns_image_idx": { + "name": "_pages_v_blocks_image_link_grid_columns_image_idx", + "columns": ["image_id"], + "isUnique": false + } + }, + "foreignKeys": { + "_pages_v_blocks_image_link_grid_columns_image_id_media_id_fk": { + "name": "_pages_v_blocks_image_link_grid_columns_image_id_media_id_fk", + "tableFrom": "_pages_v_blocks_image_link_grid_columns", + "tableTo": "media", + "columnsFrom": ["image_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "_pages_v_blocks_image_link_grid_columns_parent_id_fk": { + "name": "_pages_v_blocks_image_link_grid_columns_parent_id_fk", + "tableFrom": "_pages_v_blocks_image_link_grid_columns", + "tableTo": "_pages_v_blocks_image_link_grid", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_pages_v_blocks_image_link_grid": { + "name": "_pages_v_blocks_image_link_grid", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "_uuid": { + "name": "_uuid", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "_pages_v_blocks_image_link_grid_order_idx": { + "name": "_pages_v_blocks_image_link_grid_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "_pages_v_blocks_image_link_grid_parent_id_idx": { + "name": "_pages_v_blocks_image_link_grid_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "_pages_v_blocks_image_link_grid_path_idx": { + "name": "_pages_v_blocks_image_link_grid_path_idx", + "columns": ["_path"], + "isUnique": false + } + }, + "foreignKeys": { + "_pages_v_blocks_image_link_grid_parent_id_fk": { + "name": "_pages_v_blocks_image_link_grid_parent_id_fk", + "tableFrom": "_pages_v_blocks_image_link_grid", + "tableTo": "_pages_v", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_pages_v_blocks_image_text": { + "name": "_pages_v_blocks_image_text", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "background_color": { + "name": "background_color", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'transparent'" + }, + "image_layout": { + "name": "image_layout", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'left'" + }, + "image_id": { + "name": "image_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "text_wrap": { + "name": "text_wrap", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": false + }, + "rich_text": { + "name": "rich_text", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "_uuid": { + "name": "_uuid", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "_pages_v_blocks_image_text_order_idx": { + "name": "_pages_v_blocks_image_text_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "_pages_v_blocks_image_text_parent_id_idx": { + "name": "_pages_v_blocks_image_text_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "_pages_v_blocks_image_text_path_idx": { + "name": "_pages_v_blocks_image_text_path_idx", + "columns": ["_path"], + "isUnique": false + }, + "_pages_v_blocks_image_text_image_idx": { + "name": "_pages_v_blocks_image_text_image_idx", + "columns": ["image_id"], + "isUnique": false + } + }, + "foreignKeys": { + "_pages_v_blocks_image_text_image_id_media_id_fk": { + "name": "_pages_v_blocks_image_text_image_id_media_id_fk", + "tableFrom": "_pages_v_blocks_image_text", + "tableTo": "media", + "columnsFrom": ["image_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "_pages_v_blocks_image_text_parent_id_fk": { + "name": "_pages_v_blocks_image_text_parent_id_fk", + "tableFrom": "_pages_v_blocks_image_text", + "tableTo": "_pages_v", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_pages_v_blocks_link_preview_cards": { + "name": "_pages_v_blocks_link_preview_cards", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "image_id": { + "name": "image_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "text": { + "name": "text", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "button_type": { + "name": "button_type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'internal'" + }, + "button_new_tab": { + "name": "button_new_tab", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "button_url": { + "name": "button_url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "button_label": { + "name": "button_label", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "button_variant": { + "name": "button_variant", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'default'" + }, + "_uuid": { + "name": "_uuid", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "_pages_v_blocks_link_preview_cards_order_idx": { + "name": "_pages_v_blocks_link_preview_cards_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "_pages_v_blocks_link_preview_cards_parent_id_idx": { + "name": "_pages_v_blocks_link_preview_cards_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "_pages_v_blocks_link_preview_cards_image_idx": { + "name": "_pages_v_blocks_link_preview_cards_image_idx", + "columns": ["image_id"], + "isUnique": false + } + }, + "foreignKeys": { + "_pages_v_blocks_link_preview_cards_image_id_media_id_fk": { + "name": "_pages_v_blocks_link_preview_cards_image_id_media_id_fk", + "tableFrom": "_pages_v_blocks_link_preview_cards", + "tableTo": "media", + "columnsFrom": ["image_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "_pages_v_blocks_link_preview_cards_parent_id_fk": { + "name": "_pages_v_blocks_link_preview_cards_parent_id_fk", + "tableFrom": "_pages_v_blocks_link_preview_cards", + "tableTo": "_pages_v_blocks_link_preview", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_pages_v_blocks_link_preview": { + "name": "_pages_v_blocks_link_preview", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "header": { + "name": "header", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "background_color": { + "name": "background_color", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'transparent'" + }, + "_uuid": { + "name": "_uuid", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "_pages_v_blocks_link_preview_order_idx": { + "name": "_pages_v_blocks_link_preview_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "_pages_v_blocks_link_preview_parent_id_idx": { + "name": "_pages_v_blocks_link_preview_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "_pages_v_blocks_link_preview_path_idx": { + "name": "_pages_v_blocks_link_preview_path_idx", + "columns": ["_path"], + "isUnique": false + } + }, + "foreignKeys": { + "_pages_v_blocks_link_preview_parent_id_fk": { + "name": "_pages_v_blocks_link_preview_parent_id_fk", + "tableFrom": "_pages_v_blocks_link_preview", + "tableTo": "_pages_v", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_pages_v_blocks_media_block": { + "name": "_pages_v_blocks_media_block", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "media_id": { + "name": "media_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "caption": { + "name": "caption", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "background_color": { + "name": "background_color", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'transparent'" + }, + "align_content": { + "name": "align_content", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'left'" + }, + "image_size": { + "name": "image_size", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'original'" + }, + "_uuid": { + "name": "_uuid", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "_pages_v_blocks_media_block_order_idx": { + "name": "_pages_v_blocks_media_block_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "_pages_v_blocks_media_block_parent_id_idx": { + "name": "_pages_v_blocks_media_block_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "_pages_v_blocks_media_block_path_idx": { + "name": "_pages_v_blocks_media_block_path_idx", + "columns": ["_path"], + "isUnique": false + }, + "_pages_v_blocks_media_block_media_idx": { + "name": "_pages_v_blocks_media_block_media_idx", + "columns": ["media_id"], + "isUnique": false + } + }, + "foreignKeys": { + "_pages_v_blocks_media_block_media_id_media_id_fk": { + "name": "_pages_v_blocks_media_block_media_id_media_id_fk", + "tableFrom": "_pages_v_blocks_media_block", + "tableTo": "media", + "columnsFrom": ["media_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "_pages_v_blocks_media_block_parent_id_fk": { + "name": "_pages_v_blocks_media_block_parent_id_fk", + "tableFrom": "_pages_v_blocks_media_block", + "tableTo": "_pages_v", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_pages_v_blocks_nac_media_block": { + "name": "_pages_v_blocks_nac_media_block", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "background_color": { + "name": "background_color", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'transparent'" + }, + "mode": { + "name": "mode", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'carousel'" + }, + "_uuid": { + "name": "_uuid", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "_pages_v_blocks_nac_media_block_order_idx": { + "name": "_pages_v_blocks_nac_media_block_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "_pages_v_blocks_nac_media_block_parent_id_idx": { + "name": "_pages_v_blocks_nac_media_block_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "_pages_v_blocks_nac_media_block_path_idx": { + "name": "_pages_v_blocks_nac_media_block_path_idx", + "columns": ["_path"], + "isUnique": false + } + }, + "foreignKeys": { + "_pages_v_blocks_nac_media_block_parent_id_fk": { + "name": "_pages_v_blocks_nac_media_block_parent_id_fk", + "tableFrom": "_pages_v_blocks_nac_media_block", + "tableTo": "_pages_v", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_pages_v_blocks_single_blog_post": { + "name": "_pages_v_blocks_single_blog_post", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "background_color": { + "name": "background_color", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'transparent'" + }, + "post_id": { + "name": "post_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "_uuid": { + "name": "_uuid", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "_pages_v_blocks_single_blog_post_order_idx": { + "name": "_pages_v_blocks_single_blog_post_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "_pages_v_blocks_single_blog_post_parent_id_idx": { + "name": "_pages_v_blocks_single_blog_post_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "_pages_v_blocks_single_blog_post_path_idx": { + "name": "_pages_v_blocks_single_blog_post_path_idx", + "columns": ["_path"], + "isUnique": false + }, + "_pages_v_blocks_single_blog_post_post_idx": { + "name": "_pages_v_blocks_single_blog_post_post_idx", + "columns": ["post_id"], + "isUnique": false + } + }, + "foreignKeys": { + "_pages_v_blocks_single_blog_post_post_id_posts_id_fk": { + "name": "_pages_v_blocks_single_blog_post_post_id_posts_id_fk", + "tableFrom": "_pages_v_blocks_single_blog_post", + "tableTo": "posts", + "columnsFrom": ["post_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "_pages_v_blocks_single_blog_post_parent_id_fk": { + "name": "_pages_v_blocks_single_blog_post_parent_id_fk", + "tableFrom": "_pages_v_blocks_single_blog_post", + "tableTo": "_pages_v", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_pages_v_blocks_single_event": { + "name": "_pages_v_blocks_single_event", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "background_color": { + "name": "background_color", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'transparent'" + }, + "event_id": { + "name": "event_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "_uuid": { + "name": "_uuid", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "_pages_v_blocks_single_event_order_idx": { + "name": "_pages_v_blocks_single_event_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "_pages_v_blocks_single_event_parent_id_idx": { + "name": "_pages_v_blocks_single_event_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "_pages_v_blocks_single_event_path_idx": { + "name": "_pages_v_blocks_single_event_path_idx", + "columns": ["_path"], + "isUnique": false + }, + "_pages_v_blocks_single_event_event_idx": { + "name": "_pages_v_blocks_single_event_event_idx", + "columns": ["event_id"], + "isUnique": false + } + }, + "foreignKeys": { + "_pages_v_blocks_single_event_event_id_events_id_fk": { + "name": "_pages_v_blocks_single_event_event_id_events_id_fk", + "tableFrom": "_pages_v_blocks_single_event", + "tableTo": "events", + "columnsFrom": ["event_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "_pages_v_blocks_single_event_parent_id_fk": { + "name": "_pages_v_blocks_single_event_parent_id_fk", + "tableFrom": "_pages_v_blocks_single_event", + "tableTo": "_pages_v", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_pages_v_blocks_sponsors_block": { + "name": "_pages_v_blocks_sponsors_block", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "background_color": { + "name": "background_color", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'transparent'" + }, + "sponsors_layout": { + "name": "sponsors_layout", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'static'" + }, + "_uuid": { + "name": "_uuid", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "_pages_v_blocks_sponsors_block_order_idx": { + "name": "_pages_v_blocks_sponsors_block_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "_pages_v_blocks_sponsors_block_parent_id_idx": { + "name": "_pages_v_blocks_sponsors_block_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "_pages_v_blocks_sponsors_block_path_idx": { + "name": "_pages_v_blocks_sponsors_block_path_idx", + "columns": ["_path"], + "isUnique": false + } + }, + "foreignKeys": { + "_pages_v_blocks_sponsors_block_parent_id_fk": { + "name": "_pages_v_blocks_sponsors_block_parent_id_fk", + "tableFrom": "_pages_v_blocks_sponsors_block", + "tableTo": "_pages_v", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_pages_v_blocks_team": { + "name": "_pages_v_blocks_team", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "team_id": { + "name": "team_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "_uuid": { + "name": "_uuid", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "_pages_v_blocks_team_order_idx": { + "name": "_pages_v_blocks_team_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "_pages_v_blocks_team_parent_id_idx": { + "name": "_pages_v_blocks_team_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "_pages_v_blocks_team_path_idx": { + "name": "_pages_v_blocks_team_path_idx", + "columns": ["_path"], + "isUnique": false + }, + "_pages_v_blocks_team_team_idx": { + "name": "_pages_v_blocks_team_team_idx", + "columns": ["team_id"], + "isUnique": false + } + }, + "foreignKeys": { + "_pages_v_blocks_team_team_id_teams_id_fk": { + "name": "_pages_v_blocks_team_team_id_teams_id_fk", + "tableFrom": "_pages_v_blocks_team", + "tableTo": "teams", + "columnsFrom": ["team_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "_pages_v_blocks_team_parent_id_fk": { + "name": "_pages_v_blocks_team_parent_id_fk", + "tableFrom": "_pages_v_blocks_team", + "tableTo": "_pages_v", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_pages_v_version_document_references": { + "name": "_pages_v_version_document_references", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "collection": { + "name": "collection", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "doc_id": { + "name": "doc_id", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "instances": { + "name": "instances", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "_uuid": { + "name": "_uuid", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "_pages_v_version_document_references_order_idx": { + "name": "_pages_v_version_document_references_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "_pages_v_version_document_references_parent_id_idx": { + "name": "_pages_v_version_document_references_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + } + }, + "foreignKeys": { + "_pages_v_version_document_references_parent_id_fk": { + "name": "_pages_v_version_document_references_parent_id_fk", + "tableFrom": "_pages_v_version_document_references", + "tableTo": "_pages_v", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_pages_v": { + "name": "_pages_v", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_title": { + "name": "version_title", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_meta_image_id": { + "name": "version_meta_image_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_meta_description": { + "name": "version_meta_description", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_published_at": { + "name": "version_published_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_slug": { + "name": "version_slug", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_tenant_id": { + "name": "version_tenant_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_content_hash": { + "name": "version_content_hash", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_updated_at": { + "name": "version_updated_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_created_at": { + "name": "version_created_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version__status": { + "name": "version__status", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'draft'" + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + }, + "latest": { + "name": "latest", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "_pages_v_parent_idx": { + "name": "_pages_v_parent_idx", + "columns": ["parent_id"], + "isUnique": false + }, + "_pages_v_version_meta_version_meta_image_idx": { + "name": "_pages_v_version_meta_version_meta_image_idx", + "columns": ["version_meta_image_id"], + "isUnique": false + }, + "_pages_v_version_version_slug_idx": { + "name": "_pages_v_version_version_slug_idx", + "columns": ["version_slug"], + "isUnique": false + }, + "_pages_v_version_version_tenant_idx": { + "name": "_pages_v_version_version_tenant_idx", + "columns": ["version_tenant_id"], + "isUnique": false + }, + "_pages_v_version_version_updated_at_idx": { + "name": "_pages_v_version_version_updated_at_idx", + "columns": ["version_updated_at"], + "isUnique": false + }, + "_pages_v_version_version_created_at_idx": { + "name": "_pages_v_version_version_created_at_idx", + "columns": ["version_created_at"], + "isUnique": false + }, + "_pages_v_version_version__status_idx": { + "name": "_pages_v_version_version__status_idx", + "columns": ["version__status"], + "isUnique": false + }, + "_pages_v_created_at_idx": { + "name": "_pages_v_created_at_idx", + "columns": ["created_at"], + "isUnique": false + }, + "_pages_v_updated_at_idx": { + "name": "_pages_v_updated_at_idx", + "columns": ["updated_at"], + "isUnique": false + }, + "_pages_v_latest_idx": { + "name": "_pages_v_latest_idx", + "columns": ["latest"], + "isUnique": false + } + }, + "foreignKeys": { + "_pages_v_parent_id_pages_id_fk": { + "name": "_pages_v_parent_id_pages_id_fk", + "tableFrom": "_pages_v", + "tableTo": "pages", + "columnsFrom": ["parent_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "_pages_v_version_meta_image_id_media_id_fk": { + "name": "_pages_v_version_meta_image_id_media_id_fk", + "tableFrom": "_pages_v", + "tableTo": "media", + "columnsFrom": ["version_meta_image_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "_pages_v_version_tenant_id_tenants_id_fk": { + "name": "_pages_v_version_tenant_id_tenants_id_fk", + "tableFrom": "_pages_v", + "tableTo": "tenants", + "columnsFrom": ["version_tenant_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_pages_v_rels": { + "name": "_pages_v_rels", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "path": { + "name": "path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "tags_id": { + "name": "tags_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "posts_id": { + "name": "posts_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "event_groups_id": { + "name": "event_groups_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "event_tags_id": { + "name": "event_tags_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "events_id": { + "name": "events_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "pages_id": { + "name": "pages_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "built_in_pages_id": { + "name": "built_in_pages_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "sponsors_id": { + "name": "sponsors_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "_pages_v_rels_order_idx": { + "name": "_pages_v_rels_order_idx", + "columns": ["order"], + "isUnique": false + }, + "_pages_v_rels_parent_idx": { + "name": "_pages_v_rels_parent_idx", + "columns": ["parent_id"], + "isUnique": false + }, + "_pages_v_rels_path_idx": { + "name": "_pages_v_rels_path_idx", + "columns": ["path"], + "isUnique": false + }, + "_pages_v_rels_tags_id_idx": { + "name": "_pages_v_rels_tags_id_idx", + "columns": ["tags_id"], + "isUnique": false + }, + "_pages_v_rels_posts_id_idx": { + "name": "_pages_v_rels_posts_id_idx", + "columns": ["posts_id"], + "isUnique": false + }, + "_pages_v_rels_event_groups_id_idx": { + "name": "_pages_v_rels_event_groups_id_idx", + "columns": ["event_groups_id"], + "isUnique": false + }, + "_pages_v_rels_event_tags_id_idx": { + "name": "_pages_v_rels_event_tags_id_idx", + "columns": ["event_tags_id"], + "isUnique": false + }, + "_pages_v_rels_events_id_idx": { + "name": "_pages_v_rels_events_id_idx", + "columns": ["events_id"], + "isUnique": false + }, + "_pages_v_rels_pages_id_idx": { + "name": "_pages_v_rels_pages_id_idx", + "columns": ["pages_id"], + "isUnique": false + }, + "_pages_v_rels_built_in_pages_id_idx": { + "name": "_pages_v_rels_built_in_pages_id_idx", + "columns": ["built_in_pages_id"], + "isUnique": false + }, + "_pages_v_rels_sponsors_id_idx": { + "name": "_pages_v_rels_sponsors_id_idx", + "columns": ["sponsors_id"], + "isUnique": false + } + }, + "foreignKeys": { + "_pages_v_rels_parent_fk": { + "name": "_pages_v_rels_parent_fk", + "tableFrom": "_pages_v_rels", + "tableTo": "_pages_v", + "columnsFrom": ["parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "_pages_v_rels_tags_fk": { + "name": "_pages_v_rels_tags_fk", + "tableFrom": "_pages_v_rels", + "tableTo": "tags", + "columnsFrom": ["tags_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "_pages_v_rels_posts_fk": { + "name": "_pages_v_rels_posts_fk", + "tableFrom": "_pages_v_rels", + "tableTo": "posts", + "columnsFrom": ["posts_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "_pages_v_rels_event_groups_fk": { + "name": "_pages_v_rels_event_groups_fk", + "tableFrom": "_pages_v_rels", + "tableTo": "event_groups", + "columnsFrom": ["event_groups_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "_pages_v_rels_event_tags_fk": { + "name": "_pages_v_rels_event_tags_fk", + "tableFrom": "_pages_v_rels", + "tableTo": "event_tags", + "columnsFrom": ["event_tags_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "_pages_v_rels_events_fk": { + "name": "_pages_v_rels_events_fk", + "tableFrom": "_pages_v_rels", + "tableTo": "events", + "columnsFrom": ["events_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "_pages_v_rels_pages_fk": { + "name": "_pages_v_rels_pages_fk", + "tableFrom": "_pages_v_rels", + "tableTo": "pages", + "columnsFrom": ["pages_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "_pages_v_rels_built_in_pages_fk": { + "name": "_pages_v_rels_built_in_pages_fk", + "tableFrom": "_pages_v_rels", + "tableTo": "built_in_pages", + "columnsFrom": ["built_in_pages_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "_pages_v_rels_sponsors_fk": { + "name": "_pages_v_rels_sponsors_fk", + "tableFrom": "_pages_v_rels", + "tableTo": "sponsors", + "columnsFrom": ["sponsors_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "posts_populated_authors": { + "name": "posts_populated_authors", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "posts_populated_authors_order_idx": { + "name": "posts_populated_authors_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "posts_populated_authors_parent_id_idx": { + "name": "posts_populated_authors_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + } + }, + "foreignKeys": { + "posts_populated_authors_parent_id_fk": { + "name": "posts_populated_authors_parent_id_fk", + "tableFrom": "posts_populated_authors", + "tableTo": "posts", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "posts_document_references": { + "name": "posts_document_references", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "collection": { + "name": "collection", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "doc_id": { + "name": "doc_id", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "instances": { + "name": "instances", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "posts_document_references_order_idx": { + "name": "posts_document_references_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "posts_document_references_parent_id_idx": { + "name": "posts_document_references_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + } + }, + "foreignKeys": { + "posts_document_references_parent_id_fk": { + "name": "posts_document_references_parent_id_fk", + "tableFrom": "posts_document_references", + "tableTo": "posts", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "posts": { + "name": "posts", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "tenant_id": { + "name": "tenant_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "featured_image_id": { + "name": "featured_image_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "content": { + "name": "content", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "show_authors": { + "name": "show_authors", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": false + }, + "published_at": { + "name": "published_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "show_date": { + "name": "show_date", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": true + }, + "slug": { + "name": "slug", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "content_hash": { + "name": "content_hash", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + }, + "_status": { + "name": "_status", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'draft'" + } + }, + "indexes": { + "posts_tenant_idx": { + "name": "posts_tenant_idx", + "columns": ["tenant_id"], + "isUnique": false + }, + "posts_featured_image_idx": { + "name": "posts_featured_image_idx", + "columns": ["featured_image_id"], + "isUnique": false + }, + "posts_slug_idx": { + "name": "posts_slug_idx", + "columns": ["slug"], + "isUnique": false + }, + "posts_updated_at_idx": { + "name": "posts_updated_at_idx", + "columns": ["updated_at"], + "isUnique": false + }, + "posts_created_at_idx": { + "name": "posts_created_at_idx", + "columns": ["created_at"], + "isUnique": false + }, + "posts__status_idx": { + "name": "posts__status_idx", + "columns": ["_status"], + "isUnique": false + } + }, + "foreignKeys": { + "posts_tenant_id_tenants_id_fk": { + "name": "posts_tenant_id_tenants_id_fk", + "tableFrom": "posts", + "tableTo": "tenants", + "columnsFrom": ["tenant_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "posts_featured_image_id_media_id_fk": { + "name": "posts_featured_image_id_media_id_fk", + "tableFrom": "posts", + "tableTo": "media", + "columnsFrom": ["featured_image_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "posts_rels": { + "name": "posts_rels", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "path": { + "name": "path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "biographies_id": { + "name": "biographies_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "tags_id": { + "name": "tags_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "posts_id": { + "name": "posts_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "posts_rels_order_idx": { + "name": "posts_rels_order_idx", + "columns": ["order"], + "isUnique": false + }, + "posts_rels_parent_idx": { + "name": "posts_rels_parent_idx", + "columns": ["parent_id"], + "isUnique": false + }, + "posts_rels_path_idx": { + "name": "posts_rels_path_idx", + "columns": ["path"], + "isUnique": false + }, + "posts_rels_biographies_id_idx": { + "name": "posts_rels_biographies_id_idx", + "columns": ["biographies_id"], + "isUnique": false + }, + "posts_rels_tags_id_idx": { + "name": "posts_rels_tags_id_idx", + "columns": ["tags_id"], + "isUnique": false + }, + "posts_rels_posts_id_idx": { + "name": "posts_rels_posts_id_idx", + "columns": ["posts_id"], + "isUnique": false + } + }, + "foreignKeys": { + "posts_rels_parent_fk": { + "name": "posts_rels_parent_fk", + "tableFrom": "posts_rels", + "tableTo": "posts", + "columnsFrom": ["parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "posts_rels_biographies_fk": { + "name": "posts_rels_biographies_fk", + "tableFrom": "posts_rels", + "tableTo": "biographies", + "columnsFrom": ["biographies_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "posts_rels_tags_fk": { + "name": "posts_rels_tags_fk", + "tableFrom": "posts_rels", + "tableTo": "tags", + "columnsFrom": ["tags_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "posts_rels_posts_fk": { + "name": "posts_rels_posts_fk", + "tableFrom": "posts_rels", + "tableTo": "posts", + "columnsFrom": ["posts_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_posts_v_version_populated_authors": { + "name": "_posts_v_version_populated_authors", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "_uuid": { + "name": "_uuid", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "_posts_v_version_populated_authors_order_idx": { + "name": "_posts_v_version_populated_authors_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "_posts_v_version_populated_authors_parent_id_idx": { + "name": "_posts_v_version_populated_authors_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + } + }, + "foreignKeys": { + "_posts_v_version_populated_authors_parent_id_fk": { + "name": "_posts_v_version_populated_authors_parent_id_fk", + "tableFrom": "_posts_v_version_populated_authors", + "tableTo": "_posts_v", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_posts_v_version_document_references": { + "name": "_posts_v_version_document_references", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "collection": { + "name": "collection", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "doc_id": { + "name": "doc_id", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "instances": { + "name": "instances", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "_uuid": { + "name": "_uuid", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "_posts_v_version_document_references_order_idx": { + "name": "_posts_v_version_document_references_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "_posts_v_version_document_references_parent_id_idx": { + "name": "_posts_v_version_document_references_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + } + }, + "foreignKeys": { + "_posts_v_version_document_references_parent_id_fk": { + "name": "_posts_v_version_document_references_parent_id_fk", + "tableFrom": "_posts_v_version_document_references", + "tableTo": "_posts_v", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_posts_v": { + "name": "_posts_v", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_tenant_id": { + "name": "version_tenant_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_title": { + "name": "version_title", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_featured_image_id": { + "name": "version_featured_image_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_description": { + "name": "version_description", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_content": { + "name": "version_content", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_show_authors": { + "name": "version_show_authors", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": false + }, + "version_published_at": { + "name": "version_published_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_show_date": { + "name": "version_show_date", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": true + }, + "version_slug": { + "name": "version_slug", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_content_hash": { + "name": "version_content_hash", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_updated_at": { + "name": "version_updated_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_created_at": { + "name": "version_created_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version__status": { + "name": "version__status", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'draft'" + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + }, + "latest": { + "name": "latest", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "_posts_v_parent_idx": { + "name": "_posts_v_parent_idx", + "columns": ["parent_id"], + "isUnique": false + }, + "_posts_v_version_version_tenant_idx": { + "name": "_posts_v_version_version_tenant_idx", + "columns": ["version_tenant_id"], + "isUnique": false + }, + "_posts_v_version_version_featured_image_idx": { + "name": "_posts_v_version_version_featured_image_idx", + "columns": ["version_featured_image_id"], + "isUnique": false + }, + "_posts_v_version_version_slug_idx": { + "name": "_posts_v_version_version_slug_idx", + "columns": ["version_slug"], + "isUnique": false + }, + "_posts_v_version_version_updated_at_idx": { + "name": "_posts_v_version_version_updated_at_idx", + "columns": ["version_updated_at"], + "isUnique": false + }, + "_posts_v_version_version_created_at_idx": { + "name": "_posts_v_version_version_created_at_idx", + "columns": ["version_created_at"], + "isUnique": false + }, + "_posts_v_version_version__status_idx": { + "name": "_posts_v_version_version__status_idx", + "columns": ["version__status"], + "isUnique": false + }, + "_posts_v_created_at_idx": { + "name": "_posts_v_created_at_idx", + "columns": ["created_at"], + "isUnique": false + }, + "_posts_v_updated_at_idx": { + "name": "_posts_v_updated_at_idx", + "columns": ["updated_at"], + "isUnique": false + }, + "_posts_v_latest_idx": { + "name": "_posts_v_latest_idx", + "columns": ["latest"], + "isUnique": false + } + }, + "foreignKeys": { + "_posts_v_parent_id_posts_id_fk": { + "name": "_posts_v_parent_id_posts_id_fk", + "tableFrom": "_posts_v", + "tableTo": "posts", + "columnsFrom": ["parent_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "_posts_v_version_tenant_id_tenants_id_fk": { + "name": "_posts_v_version_tenant_id_tenants_id_fk", + "tableFrom": "_posts_v", + "tableTo": "tenants", + "columnsFrom": ["version_tenant_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "_posts_v_version_featured_image_id_media_id_fk": { + "name": "_posts_v_version_featured_image_id_media_id_fk", + "tableFrom": "_posts_v", + "tableTo": "media", + "columnsFrom": ["version_featured_image_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_posts_v_rels": { + "name": "_posts_v_rels", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "path": { + "name": "path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "biographies_id": { + "name": "biographies_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "tags_id": { + "name": "tags_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "posts_id": { + "name": "posts_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "_posts_v_rels_order_idx": { + "name": "_posts_v_rels_order_idx", + "columns": ["order"], + "isUnique": false + }, + "_posts_v_rels_parent_idx": { + "name": "_posts_v_rels_parent_idx", + "columns": ["parent_id"], + "isUnique": false + }, + "_posts_v_rels_path_idx": { + "name": "_posts_v_rels_path_idx", + "columns": ["path"], + "isUnique": false + }, + "_posts_v_rels_biographies_id_idx": { + "name": "_posts_v_rels_biographies_id_idx", + "columns": ["biographies_id"], + "isUnique": false + }, + "_posts_v_rels_tags_id_idx": { + "name": "_posts_v_rels_tags_id_idx", + "columns": ["tags_id"], + "isUnique": false + }, + "_posts_v_rels_posts_id_idx": { + "name": "_posts_v_rels_posts_id_idx", + "columns": ["posts_id"], + "isUnique": false + } + }, + "foreignKeys": { + "_posts_v_rels_parent_fk": { + "name": "_posts_v_rels_parent_fk", + "tableFrom": "_posts_v_rels", + "tableTo": "_posts_v", + "columnsFrom": ["parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "_posts_v_rels_biographies_fk": { + "name": "_posts_v_rels_biographies_fk", + "tableFrom": "_posts_v_rels", + "tableTo": "biographies", + "columnsFrom": ["biographies_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "_posts_v_rels_tags_fk": { + "name": "_posts_v_rels_tags_fk", + "tableFrom": "_posts_v_rels", + "tableTo": "tags", + "columnsFrom": ["tags_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "_posts_v_rels_posts_fk": { + "name": "_posts_v_rels_posts_fk", + "tableFrom": "_posts_v_rels", + "tableTo": "posts", + "columnsFrom": ["posts_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "media": { + "name": "media", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "tenant_id": { + "name": "tenant_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "alt": { + "name": "alt", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "content_hash": { + "name": "content_hash", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "blur_data_url": { + "name": "blur_data_url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "prefix": { + "name": "prefix", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'local'" + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + }, + "url": { + "name": "url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "thumbnail_u_r_l": { + "name": "thumbnail_u_r_l", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "filename": { + "name": "filename", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "mime_type": { + "name": "mime_type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "filesize": { + "name": "filesize", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "width": { + "name": "width", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "height": { + "name": "height", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "focal_x": { + "name": "focal_x", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "focal_y": { + "name": "focal_y", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "sizes_thumbnail_url": { + "name": "sizes_thumbnail_url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "sizes_thumbnail_width": { + "name": "sizes_thumbnail_width", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "sizes_thumbnail_height": { + "name": "sizes_thumbnail_height", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "sizes_thumbnail_mime_type": { + "name": "sizes_thumbnail_mime_type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "sizes_thumbnail_filesize": { + "name": "sizes_thumbnail_filesize", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "sizes_thumbnail_filename": { + "name": "sizes_thumbnail_filename", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "media_tenant_idx": { + "name": "media_tenant_idx", + "columns": ["tenant_id"], + "isUnique": false + }, + "media_updated_at_idx": { + "name": "media_updated_at_idx", + "columns": ["updated_at"], + "isUnique": false + }, + "media_created_at_idx": { + "name": "media_created_at_idx", + "columns": ["created_at"], + "isUnique": false + }, + "media_filename_idx": { + "name": "media_filename_idx", + "columns": ["filename"], + "isUnique": true + }, + "media_sizes_thumbnail_sizes_thumbnail_filename_idx": { + "name": "media_sizes_thumbnail_sizes_thumbnail_filename_idx", + "columns": ["sizes_thumbnail_filename"], + "isUnique": false + } + }, + "foreignKeys": { + "media_tenant_id_tenants_id_fk": { + "name": "media_tenant_id_tenants_id_fk", + "tableFrom": "media", + "tableTo": "tenants", + "columnsFrom": ["tenant_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "documents": { + "name": "documents", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "tenant_id": { + "name": "tenant_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "content_hash": { + "name": "content_hash", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "prefix": { + "name": "prefix", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'local'" + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + }, + "url": { + "name": "url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "thumbnail_u_r_l": { + "name": "thumbnail_u_r_l", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "filename": { + "name": "filename", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "mime_type": { + "name": "mime_type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "filesize": { + "name": "filesize", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "width": { + "name": "width", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "height": { + "name": "height", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "focal_x": { + "name": "focal_x", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "focal_y": { + "name": "focal_y", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "documents_tenant_idx": { + "name": "documents_tenant_idx", + "columns": ["tenant_id"], + "isUnique": false + }, + "documents_updated_at_idx": { + "name": "documents_updated_at_idx", + "columns": ["updated_at"], + "isUnique": false + }, + "documents_created_at_idx": { + "name": "documents_created_at_idx", + "columns": ["created_at"], + "isUnique": false + }, + "documents_filename_idx": { + "name": "documents_filename_idx", + "columns": ["filename"], + "isUnique": true + } + }, + "foreignKeys": { + "documents_tenant_id_tenants_id_fk": { + "name": "documents_tenant_id_tenants_id_fk", + "tableFrom": "documents", + "tableTo": "tenants", + "columnsFrom": ["tenant_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "sponsors": { + "name": "sponsors", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "tenant_id": { + "name": "tenant_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "photo_id": { + "name": "photo_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "link": { + "name": "link", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "start_date": { + "name": "start_date", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "end_date": { + "name": "end_date", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "content_hash": { + "name": "content_hash", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + } + }, + "indexes": { + "sponsors_tenant_idx": { + "name": "sponsors_tenant_idx", + "columns": ["tenant_id"], + "isUnique": false + }, + "sponsors_photo_idx": { + "name": "sponsors_photo_idx", + "columns": ["photo_id"], + "isUnique": false + }, + "sponsors_updated_at_idx": { + "name": "sponsors_updated_at_idx", + "columns": ["updated_at"], + "isUnique": false + }, + "sponsors_created_at_idx": { + "name": "sponsors_created_at_idx", + "columns": ["created_at"], + "isUnique": false + } + }, + "foreignKeys": { + "sponsors_tenant_id_tenants_id_fk": { + "name": "sponsors_tenant_id_tenants_id_fk", + "tableFrom": "sponsors", + "tableTo": "tenants", + "columnsFrom": ["tenant_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "sponsors_photo_id_media_id_fk": { + "name": "sponsors_photo_id_media_id_fk", + "tableFrom": "sponsors", + "tableTo": "media", + "columnsFrom": ["photo_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "tags": { + "name": "tags", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "tenant_id": { + "name": "tenant_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "slug": { + "name": "slug", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "content_hash": { + "name": "content_hash", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + } + }, + "indexes": { + "tags_tenant_idx": { + "name": "tags_tenant_idx", + "columns": ["tenant_id"], + "isUnique": false + }, + "tags_slug_idx": { + "name": "tags_slug_idx", + "columns": ["slug"], + "isUnique": false + }, + "tags_updated_at_idx": { + "name": "tags_updated_at_idx", + "columns": ["updated_at"], + "isUnique": false + }, + "tags_created_at_idx": { + "name": "tags_created_at_idx", + "columns": ["created_at"], + "isUnique": false + } + }, + "foreignKeys": { + "tags_tenant_id_tenants_id_fk": { + "name": "tags_tenant_id_tenants_id_fk", + "tableFrom": "tags", + "tableTo": "tenants", + "columnsFrom": ["tenant_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "events_mode_of_travel": { + "name": "events_mode_of_travel", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "value": { + "name": "value", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "events_mode_of_travel_order_idx": { + "name": "events_mode_of_travel_order_idx", + "columns": ["order"], + "isUnique": false + }, + "events_mode_of_travel_parent_idx": { + "name": "events_mode_of_travel_parent_idx", + "columns": ["parent_id"], + "isUnique": false + } + }, + "foreignKeys": { + "events_mode_of_travel_parent_fk": { + "name": "events_mode_of_travel_parent_fk", + "tableFrom": "events_mode_of_travel", + "tableTo": "events", + "columnsFrom": ["parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "events_document_references": { + "name": "events_document_references", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "collection": { + "name": "collection", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "doc_id": { + "name": "doc_id", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "instances": { + "name": "instances", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "events_document_references_order_idx": { + "name": "events_document_references_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "events_document_references_parent_id_idx": { + "name": "events_document_references_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + } + }, + "foreignKeys": { + "events_document_references_parent_id_fk": { + "name": "events_document_references_parent_id_fk", + "tableFrom": "events_document_references", + "tableTo": "events", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "events": { + "name": "events", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "subtitle": { + "name": "subtitle", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "start_date": { + "name": "start_date", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "startdate_tz": { + "name": "startdate_tz", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "end_date": { + "name": "end_date", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "enddate_tz": { + "name": "enddate_tz", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "location_is_virtual": { + "name": "location_is_virtual", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": false + }, + "location_place_name": { + "name": "location_place_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "location_address": { + "name": "location_address", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "location_city": { + "name": "location_city", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "location_state": { + "name": "location_state", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "location_zip": { + "name": "location_zip", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "location_country": { + "name": "location_country", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'US'" + }, + "location_virtual_url": { + "name": "location_virtual_url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "location_extra_info": { + "name": "location_extra_info", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "featured_image_id": { + "name": "featured_image_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "thumbnail_image_id": { + "name": "thumbnail_image_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "registration_url": { + "name": "registration_url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "external_event_url": { + "name": "external_event_url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "registration_deadline": { + "name": "registration_deadline", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "registrationdeadline_tz": { + "name": "registrationdeadline_tz", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "skill_level": { + "name": "skill_level", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "content": { + "name": "content", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "slug": { + "name": "slug", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "type": { + "name": "type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "tenant_id": { + "name": "tenant_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "content_hash": { + "name": "content_hash", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + }, + "_status": { + "name": "_status", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'draft'" + } + }, + "indexes": { + "events_featured_image_idx": { + "name": "events_featured_image_idx", + "columns": ["featured_image_id"], + "isUnique": false + }, + "events_thumbnail_image_idx": { + "name": "events_thumbnail_image_idx", + "columns": ["thumbnail_image_id"], + "isUnique": false + }, + "events_slug_idx": { + "name": "events_slug_idx", + "columns": ["slug"], + "isUnique": false + }, + "events_tenant_idx": { + "name": "events_tenant_idx", + "columns": ["tenant_id"], + "isUnique": false + }, + "events_updated_at_idx": { + "name": "events_updated_at_idx", + "columns": ["updated_at"], + "isUnique": false + }, + "events_created_at_idx": { + "name": "events_created_at_idx", + "columns": ["created_at"], + "isUnique": false + }, + "events__status_idx": { + "name": "events__status_idx", + "columns": ["_status"], + "isUnique": false + } + }, + "foreignKeys": { + "events_featured_image_id_media_id_fk": { + "name": "events_featured_image_id_media_id_fk", + "tableFrom": "events", + "tableTo": "media", + "columnsFrom": ["featured_image_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "events_thumbnail_image_id_media_id_fk": { + "name": "events_thumbnail_image_id_media_id_fk", + "tableFrom": "events", + "tableTo": "media", + "columnsFrom": ["thumbnail_image_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "events_tenant_id_tenants_id_fk": { + "name": "events_tenant_id_tenants_id_fk", + "tableFrom": "events", + "tableTo": "tenants", + "columnsFrom": ["tenant_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "events_rels": { + "name": "events_rels", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "path": { + "name": "path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "event_groups_id": { + "name": "event_groups_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "event_tags_id": { + "name": "event_tags_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "events_rels_order_idx": { + "name": "events_rels_order_idx", + "columns": ["order"], + "isUnique": false + }, + "events_rels_parent_idx": { + "name": "events_rels_parent_idx", + "columns": ["parent_id"], + "isUnique": false + }, + "events_rels_path_idx": { + "name": "events_rels_path_idx", + "columns": ["path"], + "isUnique": false + }, + "events_rels_event_groups_id_idx": { + "name": "events_rels_event_groups_id_idx", + "columns": ["event_groups_id"], + "isUnique": false + }, + "events_rels_event_tags_id_idx": { + "name": "events_rels_event_tags_id_idx", + "columns": ["event_tags_id"], + "isUnique": false + } + }, + "foreignKeys": { + "events_rels_parent_fk": { + "name": "events_rels_parent_fk", + "tableFrom": "events_rels", + "tableTo": "events", + "columnsFrom": ["parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "events_rels_event_groups_fk": { + "name": "events_rels_event_groups_fk", + "tableFrom": "events_rels", + "tableTo": "event_groups", + "columnsFrom": ["event_groups_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "events_rels_event_tags_fk": { + "name": "events_rels_event_tags_fk", + "tableFrom": "events_rels", + "tableTo": "event_tags", + "columnsFrom": ["event_tags_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_events_v_version_mode_of_travel": { + "name": "_events_v_version_mode_of_travel", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "value": { + "name": "value", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "_events_v_version_mode_of_travel_order_idx": { + "name": "_events_v_version_mode_of_travel_order_idx", + "columns": ["order"], + "isUnique": false + }, + "_events_v_version_mode_of_travel_parent_idx": { + "name": "_events_v_version_mode_of_travel_parent_idx", + "columns": ["parent_id"], + "isUnique": false + } + }, + "foreignKeys": { + "_events_v_version_mode_of_travel_parent_fk": { + "name": "_events_v_version_mode_of_travel_parent_fk", + "tableFrom": "_events_v_version_mode_of_travel", + "tableTo": "_events_v", + "columnsFrom": ["parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_events_v_version_document_references": { + "name": "_events_v_version_document_references", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "collection": { + "name": "collection", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "doc_id": { + "name": "doc_id", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "instances": { + "name": "instances", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "_uuid": { + "name": "_uuid", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "_events_v_version_document_references_order_idx": { + "name": "_events_v_version_document_references_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "_events_v_version_document_references_parent_id_idx": { + "name": "_events_v_version_document_references_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + } + }, + "foreignKeys": { + "_events_v_version_document_references_parent_id_fk": { + "name": "_events_v_version_document_references_parent_id_fk", + "tableFrom": "_events_v_version_document_references", + "tableTo": "_events_v", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_events_v": { + "name": "_events_v", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_title": { + "name": "version_title", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_subtitle": { + "name": "version_subtitle", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_description": { + "name": "version_description", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_start_date": { + "name": "version_start_date", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_startdate_tz": { + "name": "version_startdate_tz", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_end_date": { + "name": "version_end_date", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_enddate_tz": { + "name": "version_enddate_tz", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_location_is_virtual": { + "name": "version_location_is_virtual", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": false + }, + "version_location_place_name": { + "name": "version_location_place_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_location_address": { + "name": "version_location_address", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_location_city": { + "name": "version_location_city", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_location_state": { + "name": "version_location_state", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_location_zip": { + "name": "version_location_zip", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_location_country": { + "name": "version_location_country", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'US'" + }, + "version_location_virtual_url": { + "name": "version_location_virtual_url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_location_extra_info": { + "name": "version_location_extra_info", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_featured_image_id": { + "name": "version_featured_image_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_thumbnail_image_id": { + "name": "version_thumbnail_image_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_registration_url": { + "name": "version_registration_url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_external_event_url": { + "name": "version_external_event_url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_registration_deadline": { + "name": "version_registration_deadline", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_registrationdeadline_tz": { + "name": "version_registrationdeadline_tz", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_skill_level": { + "name": "version_skill_level", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_content": { + "name": "version_content", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_slug": { + "name": "version_slug", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_type": { + "name": "version_type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_tenant_id": { + "name": "version_tenant_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_content_hash": { + "name": "version_content_hash", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_updated_at": { + "name": "version_updated_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_created_at": { + "name": "version_created_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version__status": { + "name": "version__status", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'draft'" + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + }, + "latest": { + "name": "latest", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "_events_v_parent_idx": { + "name": "_events_v_parent_idx", + "columns": ["parent_id"], + "isUnique": false + }, + "_events_v_version_version_featured_image_idx": { + "name": "_events_v_version_version_featured_image_idx", + "columns": ["version_featured_image_id"], + "isUnique": false + }, + "_events_v_version_version_thumbnail_image_idx": { + "name": "_events_v_version_version_thumbnail_image_idx", + "columns": ["version_thumbnail_image_id"], + "isUnique": false + }, + "_events_v_version_version_slug_idx": { + "name": "_events_v_version_version_slug_idx", + "columns": ["version_slug"], + "isUnique": false + }, + "_events_v_version_version_tenant_idx": { + "name": "_events_v_version_version_tenant_idx", + "columns": ["version_tenant_id"], + "isUnique": false + }, + "_events_v_version_version_updated_at_idx": { + "name": "_events_v_version_version_updated_at_idx", + "columns": ["version_updated_at"], + "isUnique": false + }, + "_events_v_version_version_created_at_idx": { + "name": "_events_v_version_version_created_at_idx", + "columns": ["version_created_at"], + "isUnique": false + }, + "_events_v_version_version__status_idx": { + "name": "_events_v_version_version__status_idx", + "columns": ["version__status"], + "isUnique": false + }, + "_events_v_created_at_idx": { + "name": "_events_v_created_at_idx", + "columns": ["created_at"], + "isUnique": false + }, + "_events_v_updated_at_idx": { + "name": "_events_v_updated_at_idx", + "columns": ["updated_at"], + "isUnique": false + }, + "_events_v_latest_idx": { + "name": "_events_v_latest_idx", + "columns": ["latest"], + "isUnique": false + } + }, + "foreignKeys": { + "_events_v_parent_id_events_id_fk": { + "name": "_events_v_parent_id_events_id_fk", + "tableFrom": "_events_v", + "tableTo": "events", + "columnsFrom": ["parent_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "_events_v_version_featured_image_id_media_id_fk": { + "name": "_events_v_version_featured_image_id_media_id_fk", + "tableFrom": "_events_v", + "tableTo": "media", + "columnsFrom": ["version_featured_image_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "_events_v_version_thumbnail_image_id_media_id_fk": { + "name": "_events_v_version_thumbnail_image_id_media_id_fk", + "tableFrom": "_events_v", + "tableTo": "media", + "columnsFrom": ["version_thumbnail_image_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "_events_v_version_tenant_id_tenants_id_fk": { + "name": "_events_v_version_tenant_id_tenants_id_fk", + "tableFrom": "_events_v", + "tableTo": "tenants", + "columnsFrom": ["version_tenant_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_events_v_rels": { + "name": "_events_v_rels", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "path": { + "name": "path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "event_groups_id": { + "name": "event_groups_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "event_tags_id": { + "name": "event_tags_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "_events_v_rels_order_idx": { + "name": "_events_v_rels_order_idx", + "columns": ["order"], + "isUnique": false + }, + "_events_v_rels_parent_idx": { + "name": "_events_v_rels_parent_idx", + "columns": ["parent_id"], + "isUnique": false + }, + "_events_v_rels_path_idx": { + "name": "_events_v_rels_path_idx", + "columns": ["path"], + "isUnique": false + }, + "_events_v_rels_event_groups_id_idx": { + "name": "_events_v_rels_event_groups_id_idx", + "columns": ["event_groups_id"], + "isUnique": false + }, + "_events_v_rels_event_tags_id_idx": { + "name": "_events_v_rels_event_tags_id_idx", + "columns": ["event_tags_id"], + "isUnique": false + } + }, + "foreignKeys": { + "_events_v_rels_parent_fk": { + "name": "_events_v_rels_parent_fk", + "tableFrom": "_events_v_rels", + "tableTo": "_events_v", + "columnsFrom": ["parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "_events_v_rels_event_groups_fk": { + "name": "_events_v_rels_event_groups_fk", + "tableFrom": "_events_v_rels", + "tableTo": "event_groups", + "columnsFrom": ["event_groups_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "_events_v_rels_event_tags_fk": { + "name": "_events_v_rels_event_tags_fk", + "tableFrom": "_events_v_rels", + "tableTo": "event_tags", + "columnsFrom": ["event_tags_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "event_groups": { + "name": "event_groups", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "tenant_id": { + "name": "tenant_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "slug": { + "name": "slug", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "content_hash": { + "name": "content_hash", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + } + }, + "indexes": { + "event_groups_tenant_idx": { + "name": "event_groups_tenant_idx", + "columns": ["tenant_id"], + "isUnique": false + }, + "event_groups_slug_idx": { + "name": "event_groups_slug_idx", + "columns": ["slug"], + "isUnique": false + }, + "event_groups_updated_at_idx": { + "name": "event_groups_updated_at_idx", + "columns": ["updated_at"], + "isUnique": false + }, + "event_groups_created_at_idx": { + "name": "event_groups_created_at_idx", + "columns": ["created_at"], + "isUnique": false + } + }, + "foreignKeys": { + "event_groups_tenant_id_tenants_id_fk": { + "name": "event_groups_tenant_id_tenants_id_fk", + "tableFrom": "event_groups", + "tableTo": "tenants", + "columnsFrom": ["tenant_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "event_tags": { + "name": "event_tags", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "tenant_id": { + "name": "tenant_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "slug": { + "name": "slug", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "content_hash": { + "name": "content_hash", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + } + }, + "indexes": { + "event_tags_tenant_idx": { + "name": "event_tags_tenant_idx", + "columns": ["tenant_id"], + "isUnique": false + }, + "event_tags_slug_idx": { + "name": "event_tags_slug_idx", + "columns": ["slug"], + "isUnique": false + }, + "event_tags_updated_at_idx": { + "name": "event_tags_updated_at_idx", + "columns": ["updated_at"], + "isUnique": false + }, + "event_tags_created_at_idx": { + "name": "event_tags_created_at_idx", + "columns": ["created_at"], + "isUnique": false + } + }, + "foreignKeys": { + "event_tags_tenant_id_tenants_id_fk": { + "name": "event_tags_tenant_id_tenants_id_fk", + "tableFrom": "event_tags", + "tableTo": "tenants", + "columnsFrom": ["tenant_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "providers_states_serviced": { + "name": "providers_states_serviced", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "value": { + "name": "value", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "providers_states_serviced_order_idx": { + "name": "providers_states_serviced_order_idx", + "columns": ["order"], + "isUnique": false + }, + "providers_states_serviced_parent_idx": { + "name": "providers_states_serviced_parent_idx", + "columns": ["parent_id"], + "isUnique": false + } + }, + "foreignKeys": { + "providers_states_serviced_parent_fk": { + "name": "providers_states_serviced_parent_fk", + "tableFrom": "providers_states_serviced", + "tableTo": "providers", + "columnsFrom": ["parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "providers_course_types": { + "name": "providers_course_types", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "value": { + "name": "value", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "providers_course_types_order_idx": { + "name": "providers_course_types_order_idx", + "columns": ["order"], + "isUnique": false + }, + "providers_course_types_parent_idx": { + "name": "providers_course_types_parent_idx", + "columns": ["parent_id"], + "isUnique": false + } + }, + "foreignKeys": { + "providers_course_types_parent_fk": { + "name": "providers_course_types_parent_fk", + "tableFrom": "providers_course_types", + "tableTo": "providers", + "columnsFrom": ["parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "providers": { + "name": "providers", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "details": { + "name": "details", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "phone": { + "name": "phone", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "website": { + "name": "website", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "location_address": { + "name": "location_address", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "location_city": { + "name": "location_city", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "location_state": { + "name": "location_state", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "location_zip": { + "name": "location_zip", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "location_country": { + "name": "location_country", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'US'" + }, + "slug": { + "name": "slug", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "notification_email": { + "name": "notification_email", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "content_hash": { + "name": "content_hash", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + }, + "_status": { + "name": "_status", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'draft'" + } + }, + "indexes": { + "providers_slug_idx": { + "name": "providers_slug_idx", + "columns": ["slug"], + "isUnique": false + }, + "providers_updated_at_idx": { + "name": "providers_updated_at_idx", + "columns": ["updated_at"], + "isUnique": false + }, + "providers_created_at_idx": { + "name": "providers_created_at_idx", + "columns": ["created_at"], + "isUnique": false + }, + "providers__status_idx": { + "name": "providers__status_idx", + "columns": ["_status"], + "isUnique": false + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_providers_v_version_states_serviced": { + "name": "_providers_v_version_states_serviced", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "value": { + "name": "value", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "_providers_v_version_states_serviced_order_idx": { + "name": "_providers_v_version_states_serviced_order_idx", + "columns": ["order"], + "isUnique": false + }, + "_providers_v_version_states_serviced_parent_idx": { + "name": "_providers_v_version_states_serviced_parent_idx", + "columns": ["parent_id"], + "isUnique": false + } + }, + "foreignKeys": { + "_providers_v_version_states_serviced_parent_fk": { + "name": "_providers_v_version_states_serviced_parent_fk", + "tableFrom": "_providers_v_version_states_serviced", + "tableTo": "_providers_v", + "columnsFrom": ["parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_providers_v_version_course_types": { + "name": "_providers_v_version_course_types", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "value": { + "name": "value", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "_providers_v_version_course_types_order_idx": { + "name": "_providers_v_version_course_types_order_idx", + "columns": ["order"], + "isUnique": false + }, + "_providers_v_version_course_types_parent_idx": { + "name": "_providers_v_version_course_types_parent_idx", + "columns": ["parent_id"], + "isUnique": false + } + }, + "foreignKeys": { + "_providers_v_version_course_types_parent_fk": { + "name": "_providers_v_version_course_types_parent_fk", + "tableFrom": "_providers_v_version_course_types", + "tableTo": "_providers_v", + "columnsFrom": ["parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_providers_v": { + "name": "_providers_v", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_name": { + "name": "version_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_details": { + "name": "version_details", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_email": { + "name": "version_email", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_phone": { + "name": "version_phone", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_website": { + "name": "version_website", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_location_address": { + "name": "version_location_address", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_location_city": { + "name": "version_location_city", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_location_state": { + "name": "version_location_state", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_location_zip": { + "name": "version_location_zip", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_location_country": { + "name": "version_location_country", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'US'" + }, + "version_slug": { + "name": "version_slug", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_notification_email": { + "name": "version_notification_email", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_content_hash": { + "name": "version_content_hash", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_updated_at": { + "name": "version_updated_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_created_at": { + "name": "version_created_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version__status": { + "name": "version__status", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'draft'" + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + }, + "latest": { + "name": "latest", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "_providers_v_parent_idx": { + "name": "_providers_v_parent_idx", + "columns": ["parent_id"], + "isUnique": false + }, + "_providers_v_version_version_slug_idx": { + "name": "_providers_v_version_version_slug_idx", + "columns": ["version_slug"], + "isUnique": false + }, + "_providers_v_version_version_updated_at_idx": { + "name": "_providers_v_version_version_updated_at_idx", + "columns": ["version_updated_at"], + "isUnique": false + }, + "_providers_v_version_version_created_at_idx": { + "name": "_providers_v_version_version_created_at_idx", + "columns": ["version_created_at"], + "isUnique": false + }, + "_providers_v_version_version__status_idx": { + "name": "_providers_v_version_version__status_idx", + "columns": ["version__status"], + "isUnique": false + }, + "_providers_v_created_at_idx": { + "name": "_providers_v_created_at_idx", + "columns": ["created_at"], + "isUnique": false + }, + "_providers_v_updated_at_idx": { + "name": "_providers_v_updated_at_idx", + "columns": ["updated_at"], + "isUnique": false + }, + "_providers_v_latest_idx": { + "name": "_providers_v_latest_idx", + "columns": ["latest"], + "isUnique": false + } + }, + "foreignKeys": { + "_providers_v_parent_id_providers_id_fk": { + "name": "_providers_v_parent_id_providers_id_fk", + "tableFrom": "_providers_v", + "tableTo": "providers", + "columnsFrom": ["parent_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "courses_mode_of_travel": { + "name": "courses_mode_of_travel", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "value": { + "name": "value", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "courses_mode_of_travel_order_idx": { + "name": "courses_mode_of_travel_order_idx", + "columns": ["order"], + "isUnique": false + }, + "courses_mode_of_travel_parent_idx": { + "name": "courses_mode_of_travel_parent_idx", + "columns": ["parent_id"], + "isUnique": false + } + }, + "foreignKeys": { + "courses_mode_of_travel_parent_fk": { + "name": "courses_mode_of_travel_parent_fk", + "tableFrom": "courses_mode_of_travel", + "tableTo": "courses", + "columnsFrom": ["parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "courses_affinity_groups": { + "name": "courses_affinity_groups", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "value": { + "name": "value", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "courses_affinity_groups_order_idx": { + "name": "courses_affinity_groups_order_idx", + "columns": ["order"], + "isUnique": false + }, + "courses_affinity_groups_parent_idx": { + "name": "courses_affinity_groups_parent_idx", + "columns": ["parent_id"], + "isUnique": false + } + }, + "foreignKeys": { + "courses_affinity_groups_parent_fk": { + "name": "courses_affinity_groups_parent_fk", + "tableFrom": "courses_affinity_groups", + "tableTo": "courses", + "columnsFrom": ["parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "courses": { + "name": "courses", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "subtitle": { + "name": "subtitle", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "start_date": { + "name": "start_date", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "startdate_tz": { + "name": "startdate_tz", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "end_date": { + "name": "end_date", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "enddate_tz": { + "name": "enddate_tz", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "location_place_name": { + "name": "location_place_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "location_address": { + "name": "location_address", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "location_city": { + "name": "location_city", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "location_state": { + "name": "location_state", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "location_zip": { + "name": "location_zip", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "location_country": { + "name": "location_country", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'US'" + }, + "course_url": { + "name": "course_url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "registration_deadline": { + "name": "registration_deadline", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "registrationdeadline_tz": { + "name": "registrationdeadline_tz", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "slug": { + "name": "slug", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "course_type": { + "name": "course_type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "provider_id": { + "name": "provider_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "content_hash": { + "name": "content_hash", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + }, + "_status": { + "name": "_status", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'draft'" + } + }, + "indexes": { + "courses_slug_idx": { + "name": "courses_slug_idx", + "columns": ["slug"], + "isUnique": false + }, + "courses_provider_idx": { + "name": "courses_provider_idx", + "columns": ["provider_id"], + "isUnique": false + }, + "courses_updated_at_idx": { + "name": "courses_updated_at_idx", + "columns": ["updated_at"], + "isUnique": false + }, + "courses_created_at_idx": { + "name": "courses_created_at_idx", + "columns": ["created_at"], + "isUnique": false + }, + "courses__status_idx": { + "name": "courses__status_idx", + "columns": ["_status"], + "isUnique": false + } + }, + "foreignKeys": { + "courses_provider_id_providers_id_fk": { + "name": "courses_provider_id_providers_id_fk", + "tableFrom": "courses", + "tableTo": "providers", + "columnsFrom": ["provider_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_courses_v_version_mode_of_travel": { + "name": "_courses_v_version_mode_of_travel", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "value": { + "name": "value", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "_courses_v_version_mode_of_travel_order_idx": { + "name": "_courses_v_version_mode_of_travel_order_idx", + "columns": ["order"], + "isUnique": false + }, + "_courses_v_version_mode_of_travel_parent_idx": { + "name": "_courses_v_version_mode_of_travel_parent_idx", + "columns": ["parent_id"], + "isUnique": false + } + }, + "foreignKeys": { + "_courses_v_version_mode_of_travel_parent_fk": { + "name": "_courses_v_version_mode_of_travel_parent_fk", + "tableFrom": "_courses_v_version_mode_of_travel", + "tableTo": "_courses_v", + "columnsFrom": ["parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_courses_v_version_affinity_groups": { + "name": "_courses_v_version_affinity_groups", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "value": { + "name": "value", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "_courses_v_version_affinity_groups_order_idx": { + "name": "_courses_v_version_affinity_groups_order_idx", + "columns": ["order"], + "isUnique": false + }, + "_courses_v_version_affinity_groups_parent_idx": { + "name": "_courses_v_version_affinity_groups_parent_idx", + "columns": ["parent_id"], + "isUnique": false + } + }, + "foreignKeys": { + "_courses_v_version_affinity_groups_parent_fk": { + "name": "_courses_v_version_affinity_groups_parent_fk", + "tableFrom": "_courses_v_version_affinity_groups", + "tableTo": "_courses_v", + "columnsFrom": ["parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_courses_v": { + "name": "_courses_v", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_title": { + "name": "version_title", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_subtitle": { + "name": "version_subtitle", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_description": { + "name": "version_description", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_start_date": { + "name": "version_start_date", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_startdate_tz": { + "name": "version_startdate_tz", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_end_date": { + "name": "version_end_date", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_enddate_tz": { + "name": "version_enddate_tz", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_location_place_name": { + "name": "version_location_place_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_location_address": { + "name": "version_location_address", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_location_city": { + "name": "version_location_city", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_location_state": { + "name": "version_location_state", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_location_zip": { + "name": "version_location_zip", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_location_country": { + "name": "version_location_country", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'US'" + }, + "version_course_url": { + "name": "version_course_url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_registration_deadline": { + "name": "version_registration_deadline", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_registrationdeadline_tz": { + "name": "version_registrationdeadline_tz", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_slug": { + "name": "version_slug", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_course_type": { + "name": "version_course_type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_provider_id": { + "name": "version_provider_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_content_hash": { + "name": "version_content_hash", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_updated_at": { + "name": "version_updated_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_created_at": { + "name": "version_created_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version__status": { + "name": "version__status", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'draft'" + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + }, + "latest": { + "name": "latest", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "_courses_v_parent_idx": { + "name": "_courses_v_parent_idx", + "columns": ["parent_id"], + "isUnique": false + }, + "_courses_v_version_version_slug_idx": { + "name": "_courses_v_version_version_slug_idx", + "columns": ["version_slug"], + "isUnique": false + }, + "_courses_v_version_version_provider_idx": { + "name": "_courses_v_version_version_provider_idx", + "columns": ["version_provider_id"], + "isUnique": false + }, + "_courses_v_version_version_updated_at_idx": { + "name": "_courses_v_version_version_updated_at_idx", + "columns": ["version_updated_at"], + "isUnique": false + }, + "_courses_v_version_version_created_at_idx": { + "name": "_courses_v_version_version_created_at_idx", + "columns": ["version_created_at"], + "isUnique": false + }, + "_courses_v_version_version__status_idx": { + "name": "_courses_v_version_version__status_idx", + "columns": ["version__status"], + "isUnique": false + }, + "_courses_v_created_at_idx": { + "name": "_courses_v_created_at_idx", + "columns": ["created_at"], + "isUnique": false + }, + "_courses_v_updated_at_idx": { + "name": "_courses_v_updated_at_idx", + "columns": ["updated_at"], + "isUnique": false + }, + "_courses_v_latest_idx": { + "name": "_courses_v_latest_idx", + "columns": ["latest"], + "isUnique": false + } + }, + "foreignKeys": { + "_courses_v_parent_id_courses_id_fk": { + "name": "_courses_v_parent_id_courses_id_fk", + "tableFrom": "_courses_v", + "tableTo": "courses", + "columnsFrom": ["parent_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "_courses_v_version_provider_id_providers_id_fk": { + "name": "_courses_v_version_provider_id_providers_id_fk", + "tableFrom": "_courses_v", + "tableTo": "providers", + "columnsFrom": ["version_provider_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "biographies": { + "name": "biographies", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "tenant_id": { + "name": "tenant_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "photo_id": { + "name": "photo_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "start_date": { + "name": "start_date", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "biography": { + "name": "biography", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "content_hash": { + "name": "content_hash", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + } + }, + "indexes": { + "biographies_tenant_idx": { + "name": "biographies_tenant_idx", + "columns": ["tenant_id"], + "isUnique": false + }, + "biographies_photo_idx": { + "name": "biographies_photo_idx", + "columns": ["photo_id"], + "isUnique": false + }, + "biographies_updated_at_idx": { + "name": "biographies_updated_at_idx", + "columns": ["updated_at"], + "isUnique": false + }, + "biographies_created_at_idx": { + "name": "biographies_created_at_idx", + "columns": ["created_at"], + "isUnique": false + } + }, + "foreignKeys": { + "biographies_tenant_id_tenants_id_fk": { + "name": "biographies_tenant_id_tenants_id_fk", + "tableFrom": "biographies", + "tableTo": "tenants", + "columnsFrom": ["tenant_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "biographies_photo_id_media_id_fk": { + "name": "biographies_photo_id_media_id_fk", + "tableFrom": "biographies", + "tableTo": "media", + "columnsFrom": ["photo_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "teams": { + "name": "teams", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "tenant_id": { + "name": "tenant_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "content_hash": { + "name": "content_hash", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + } + }, + "indexes": { + "teams_tenant_idx": { + "name": "teams_tenant_idx", + "columns": ["tenant_id"], + "isUnique": false + }, + "teams_updated_at_idx": { + "name": "teams_updated_at_idx", + "columns": ["updated_at"], + "isUnique": false + }, + "teams_created_at_idx": { + "name": "teams_created_at_idx", + "columns": ["created_at"], + "isUnique": false + } + }, + "foreignKeys": { + "teams_tenant_id_tenants_id_fk": { + "name": "teams_tenant_id_tenants_id_fk", + "tableFrom": "teams", + "tableTo": "tenants", + "columnsFrom": ["tenant_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "teams_rels": { + "name": "teams_rels", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "path": { + "name": "path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "biographies_id": { + "name": "biographies_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "teams_rels_order_idx": { + "name": "teams_rels_order_idx", + "columns": ["order"], + "isUnique": false + }, + "teams_rels_parent_idx": { + "name": "teams_rels_parent_idx", + "columns": ["parent_id"], + "isUnique": false + }, + "teams_rels_path_idx": { + "name": "teams_rels_path_idx", + "columns": ["path"], + "isUnique": false + }, + "teams_rels_biographies_id_idx": { + "name": "teams_rels_biographies_id_idx", + "columns": ["biographies_id"], + "isUnique": false + } + }, + "foreignKeys": { + "teams_rels_parent_fk": { + "name": "teams_rels_parent_fk", + "tableFrom": "teams_rels", + "tableTo": "teams", + "columnsFrom": ["parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "teams_rels_biographies_fk": { + "name": "teams_rels_biographies_fk", + "tableFrom": "teams_rels", + "tableTo": "biographies", + "columnsFrom": ["biographies_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "users_sessions": { + "name": "users_sessions", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "expires_at": { + "name": "expires_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "users_sessions_order_idx": { + "name": "users_sessions_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "users_sessions_parent_id_idx": { + "name": "users_sessions_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + } + }, + "foreignKeys": { + "users_sessions_parent_id_fk": { + "name": "users_sessions_parent_id_fk", + "tableFrom": "users_sessions", + "tableTo": "users", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "users": { + "name": "users", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "invite_token": { + "name": "invite_token", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "invite_expiration": { + "name": "invite_expiration", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "last_login": { + "name": "last_login", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "content_hash": { + "name": "content_hash", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + }, + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "reset_password_token": { + "name": "reset_password_token", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "reset_password_expiration": { + "name": "reset_password_expiration", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "salt": { + "name": "salt", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "hash": { + "name": "hash", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "login_attempts": { + "name": "login_attempts", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": 0 + }, + "lock_until": { + "name": "lock_until", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "users_name_idx": { + "name": "users_name_idx", + "columns": ["name"], + "isUnique": false + }, + "users_updated_at_idx": { + "name": "users_updated_at_idx", + "columns": ["updated_at"], + "isUnique": false + }, + "users_created_at_idx": { + "name": "users_created_at_idx", + "columns": ["created_at"], + "isUnique": false + }, + "users_email_idx": { + "name": "users_email_idx", + "columns": ["email"], + "isUnique": true + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "users_rels": { + "name": "users_rels", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "path": { + "name": "path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "providers_id": { + "name": "providers_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "users_rels_order_idx": { + "name": "users_rels_order_idx", + "columns": ["order"], + "isUnique": false + }, + "users_rels_parent_idx": { + "name": "users_rels_parent_idx", + "columns": ["parent_id"], + "isUnique": false + }, + "users_rels_path_idx": { + "name": "users_rels_path_idx", + "columns": ["path"], + "isUnique": false + }, + "users_rels_providers_id_idx": { + "name": "users_rels_providers_id_idx", + "columns": ["providers_id"], + "isUnique": false + } + }, + "foreignKeys": { + "users_rels_parent_fk": { + "name": "users_rels_parent_fk", + "tableFrom": "users_rels", + "tableTo": "users", + "columnsFrom": ["parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "users_rels_providers_fk": { + "name": "users_rels_providers_fk", + "tableFrom": "users_rels", + "tableTo": "providers", + "columnsFrom": ["providers_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "roles_rules_actions": { + "name": "roles_rules_actions", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "parent_id": { + "name": "parent_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "value": { + "name": "value", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "roles_rules_actions_order_idx": { + "name": "roles_rules_actions_order_idx", + "columns": ["order"], + "isUnique": false + }, + "roles_rules_actions_parent_idx": { + "name": "roles_rules_actions_parent_idx", + "columns": ["parent_id"], + "isUnique": false + } + }, + "foreignKeys": { + "roles_rules_actions_parent_fk": { + "name": "roles_rules_actions_parent_fk", + "tableFrom": "roles_rules_actions", + "tableTo": "roles_rules", + "columnsFrom": ["parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "roles_rules": { + "name": "roles_rules", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "roles_rules_order_idx": { + "name": "roles_rules_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "roles_rules_parent_id_idx": { + "name": "roles_rules_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + } + }, + "foreignKeys": { + "roles_rules_parent_id_fk": { + "name": "roles_rules_parent_id_fk", + "tableFrom": "roles_rules", + "tableTo": "roles", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "roles": { + "name": "roles", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "content_hash": { + "name": "content_hash", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + } + }, + "indexes": { + "roles_name_idx": { + "name": "roles_name_idx", + "columns": ["name"], + "isUnique": true + }, + "roles_updated_at_idx": { + "name": "roles_updated_at_idx", + "columns": ["updated_at"], + "isUnique": false + }, + "roles_created_at_idx": { + "name": "roles_created_at_idx", + "columns": ["created_at"], + "isUnique": false + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "roles_texts": { + "name": "roles_texts", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "path": { + "name": "path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "text": { + "name": "text", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "roles_texts_order_parent": { + "name": "roles_texts_order_parent", + "columns": ["order", "parent_id"], + "isUnique": false + } + }, + "foreignKeys": { + "roles_texts_parent_fk": { + "name": "roles_texts_parent_fk", + "tableFrom": "roles_texts", + "tableTo": "roles", + "columnsFrom": ["parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "role_assignments": { + "name": "role_assignments", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "tenant_id": { + "name": "tenant_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "role_id": { + "name": "role_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "content_hash": { + "name": "content_hash", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + } + }, + "indexes": { + "role_assignments_tenant_idx": { + "name": "role_assignments_tenant_idx", + "columns": ["tenant_id"], + "isUnique": false + }, + "role_assignments_role_idx": { + "name": "role_assignments_role_idx", + "columns": ["role_id"], + "isUnique": false + }, + "role_assignments_user_idx": { + "name": "role_assignments_user_idx", + "columns": ["user_id"], + "isUnique": false + }, + "role_assignments_updated_at_idx": { + "name": "role_assignments_updated_at_idx", + "columns": ["updated_at"], + "isUnique": false + }, + "role_assignments_created_at_idx": { + "name": "role_assignments_created_at_idx", + "columns": ["created_at"], + "isUnique": false + } + }, + "foreignKeys": { + "role_assignments_tenant_id_tenants_id_fk": { + "name": "role_assignments_tenant_id_tenants_id_fk", + "tableFrom": "role_assignments", + "tableTo": "tenants", + "columnsFrom": ["tenant_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "role_assignments_role_id_roles_id_fk": { + "name": "role_assignments_role_id_roles_id_fk", + "tableFrom": "role_assignments", + "tableTo": "roles", + "columnsFrom": ["role_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "role_assignments_user_id_users_id_fk": { + "name": "role_assignments_user_id_users_id_fk", + "tableFrom": "role_assignments", + "tableTo": "users", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "global_roles_rules_actions": { + "name": "global_roles_rules_actions", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "parent_id": { + "name": "parent_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "value": { + "name": "value", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "global_roles_rules_actions_order_idx": { + "name": "global_roles_rules_actions_order_idx", + "columns": ["order"], + "isUnique": false + }, + "global_roles_rules_actions_parent_idx": { + "name": "global_roles_rules_actions_parent_idx", + "columns": ["parent_id"], + "isUnique": false + } + }, + "foreignKeys": { + "global_roles_rules_actions_parent_fk": { + "name": "global_roles_rules_actions_parent_fk", + "tableFrom": "global_roles_rules_actions", + "tableTo": "global_roles_rules", + "columnsFrom": ["parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "global_roles_rules": { + "name": "global_roles_rules", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "global_roles_rules_order_idx": { + "name": "global_roles_rules_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "global_roles_rules_parent_id_idx": { + "name": "global_roles_rules_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + } + }, + "foreignKeys": { + "global_roles_rules_parent_id_fk": { + "name": "global_roles_rules_parent_id_fk", + "tableFrom": "global_roles_rules", + "tableTo": "global_roles", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "global_roles": { + "name": "global_roles", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "content_hash": { + "name": "content_hash", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + } + }, + "indexes": { + "global_roles_name_idx": { + "name": "global_roles_name_idx", + "columns": ["name"], + "isUnique": true + }, + "global_roles_updated_at_idx": { + "name": "global_roles_updated_at_idx", + "columns": ["updated_at"], + "isUnique": false + }, + "global_roles_created_at_idx": { + "name": "global_roles_created_at_idx", + "columns": ["created_at"], + "isUnique": false + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "global_roles_texts": { + "name": "global_roles_texts", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "path": { + "name": "path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "text": { + "name": "text", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "global_roles_texts_order_parent": { + "name": "global_roles_texts_order_parent", + "columns": ["order", "parent_id"], + "isUnique": false + } + }, + "foreignKeys": { + "global_roles_texts_parent_fk": { + "name": "global_roles_texts_parent_fk", + "tableFrom": "global_roles_texts", + "tableTo": "global_roles", + "columnsFrom": ["parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "global_role_assignments": { + "name": "global_role_assignments", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "global_role_id": { + "name": "global_role_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "content_hash": { + "name": "content_hash", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + } + }, + "indexes": { + "global_role_assignments_global_role_idx": { + "name": "global_role_assignments_global_role_idx", + "columns": ["global_role_id"], + "isUnique": false + }, + "global_role_assignments_user_idx": { + "name": "global_role_assignments_user_idx", + "columns": ["user_id"], + "isUnique": false + }, + "global_role_assignments_updated_at_idx": { + "name": "global_role_assignments_updated_at_idx", + "columns": ["updated_at"], + "isUnique": false + }, + "global_role_assignments_created_at_idx": { + "name": "global_role_assignments_created_at_idx", + "columns": ["created_at"], + "isUnique": false + } + }, + "foreignKeys": { + "global_role_assignments_global_role_id_global_roles_id_fk": { + "name": "global_role_assignments_global_role_id_global_roles_id_fk", + "tableFrom": "global_role_assignments", + "tableTo": "global_roles", + "columnsFrom": ["global_role_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "global_role_assignments_user_id_users_id_fk": { + "name": "global_role_assignments_user_id_users_id_fk", + "tableFrom": "global_role_assignments", + "tableTo": "users", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "tenants": { + "name": "tenants", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "slug": { + "name": "slug", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "content_hash": { + "name": "content_hash", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + } + }, + "indexes": { + "tenants_slug_idx": { + "name": "tenants_slug_idx", + "columns": ["slug"], + "isUnique": true + }, + "tenants_updated_at_idx": { + "name": "tenants_updated_at_idx", + "columns": ["updated_at"], + "isUnique": false + }, + "tenants_created_at_idx": { + "name": "tenants_created_at_idx", + "columns": ["created_at"], + "isUnique": false + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "navigations_weather_items_items": { + "name": "navigations_weather_items_items", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "link_type": { + "name": "link_type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'internal'" + }, + "link_url": { + "name": "link_url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_label": { + "name": "link_label", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_new_tab": { + "name": "link_new_tab", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": true + } + }, + "indexes": { + "navigations_weather_items_items_order_idx": { + "name": "navigations_weather_items_items_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "navigations_weather_items_items_parent_id_idx": { + "name": "navigations_weather_items_items_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + } + }, + "foreignKeys": { + "navigations_weather_items_items_parent_id_fk": { + "name": "navigations_weather_items_items_parent_id_fk", + "tableFrom": "navigations_weather_items_items", + "tableTo": "navigations_weather_items", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "navigations_weather_items": { + "name": "navigations_weather_items", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "label": { + "name": "label", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_type": { + "name": "link_type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'internal'" + }, + "link_url": { + "name": "link_url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_label": { + "name": "link_label", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_new_tab": { + "name": "link_new_tab", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": true + } + }, + "indexes": { + "navigations_weather_items_order_idx": { + "name": "navigations_weather_items_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "navigations_weather_items_parent_id_idx": { + "name": "navigations_weather_items_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + } + }, + "foreignKeys": { + "navigations_weather_items_parent_id_fk": { + "name": "navigations_weather_items_parent_id_fk", + "tableFrom": "navigations_weather_items", + "tableTo": "navigations", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "navigations_education_items_items": { + "name": "navigations_education_items_items", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "link_type": { + "name": "link_type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'internal'" + }, + "link_url": { + "name": "link_url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_label": { + "name": "link_label", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_new_tab": { + "name": "link_new_tab", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": true + } + }, + "indexes": { + "navigations_education_items_items_order_idx": { + "name": "navigations_education_items_items_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "navigations_education_items_items_parent_id_idx": { + "name": "navigations_education_items_items_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + } + }, + "foreignKeys": { + "navigations_education_items_items_parent_id_fk": { + "name": "navigations_education_items_items_parent_id_fk", + "tableFrom": "navigations_education_items_items", + "tableTo": "navigations_education_items", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "navigations_education_items": { + "name": "navigations_education_items", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "label": { + "name": "label", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_type": { + "name": "link_type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'internal'" + }, + "link_url": { + "name": "link_url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_label": { + "name": "link_label", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_new_tab": { + "name": "link_new_tab", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": true + } + }, + "indexes": { + "navigations_education_items_order_idx": { + "name": "navigations_education_items_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "navigations_education_items_parent_id_idx": { + "name": "navigations_education_items_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + } + }, + "foreignKeys": { + "navigations_education_items_parent_id_fk": { + "name": "navigations_education_items_parent_id_fk", + "tableFrom": "navigations_education_items", + "tableTo": "navigations", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "navigations_accidents_items_items": { + "name": "navigations_accidents_items_items", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "link_type": { + "name": "link_type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'internal'" + }, + "link_url": { + "name": "link_url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_label": { + "name": "link_label", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_new_tab": { + "name": "link_new_tab", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": true + } + }, + "indexes": { + "navigations_accidents_items_items_order_idx": { + "name": "navigations_accidents_items_items_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "navigations_accidents_items_items_parent_id_idx": { + "name": "navigations_accidents_items_items_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + } + }, + "foreignKeys": { + "navigations_accidents_items_items_parent_id_fk": { + "name": "navigations_accidents_items_items_parent_id_fk", + "tableFrom": "navigations_accidents_items_items", + "tableTo": "navigations_accidents_items", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "navigations_accidents_items": { + "name": "navigations_accidents_items", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "label": { + "name": "label", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_type": { + "name": "link_type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'internal'" + }, + "link_url": { + "name": "link_url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_label": { + "name": "link_label", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_new_tab": { + "name": "link_new_tab", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": true + } + }, + "indexes": { + "navigations_accidents_items_order_idx": { + "name": "navigations_accidents_items_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "navigations_accidents_items_parent_id_idx": { + "name": "navigations_accidents_items_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + } + }, + "foreignKeys": { + "navigations_accidents_items_parent_id_fk": { + "name": "navigations_accidents_items_parent_id_fk", + "tableFrom": "navigations_accidents_items", + "tableTo": "navigations", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "navigations_blog_items_items": { + "name": "navigations_blog_items_items", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "link_type": { + "name": "link_type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'internal'" + }, + "link_url": { + "name": "link_url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_label": { + "name": "link_label", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_new_tab": { + "name": "link_new_tab", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": true + } + }, + "indexes": { + "navigations_blog_items_items_order_idx": { + "name": "navigations_blog_items_items_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "navigations_blog_items_items_parent_id_idx": { + "name": "navigations_blog_items_items_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + } + }, + "foreignKeys": { + "navigations_blog_items_items_parent_id_fk": { + "name": "navigations_blog_items_items_parent_id_fk", + "tableFrom": "navigations_blog_items_items", + "tableTo": "navigations_blog_items", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "navigations_blog_items": { + "name": "navigations_blog_items", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "label": { + "name": "label", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_type": { + "name": "link_type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'internal'" + }, + "link_url": { + "name": "link_url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_label": { + "name": "link_label", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_new_tab": { + "name": "link_new_tab", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": true + } + }, + "indexes": { + "navigations_blog_items_order_idx": { + "name": "navigations_blog_items_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "navigations_blog_items_parent_id_idx": { + "name": "navigations_blog_items_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + } + }, + "foreignKeys": { + "navigations_blog_items_parent_id_fk": { + "name": "navigations_blog_items_parent_id_fk", + "tableFrom": "navigations_blog_items", + "tableTo": "navigations", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "navigations_events_items_items": { + "name": "navigations_events_items_items", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "link_type": { + "name": "link_type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'internal'" + }, + "link_url": { + "name": "link_url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_label": { + "name": "link_label", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_new_tab": { + "name": "link_new_tab", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": true + } + }, + "indexes": { + "navigations_events_items_items_order_idx": { + "name": "navigations_events_items_items_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "navigations_events_items_items_parent_id_idx": { + "name": "navigations_events_items_items_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + } + }, + "foreignKeys": { + "navigations_events_items_items_parent_id_fk": { + "name": "navigations_events_items_items_parent_id_fk", + "tableFrom": "navigations_events_items_items", + "tableTo": "navigations_events_items", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "navigations_events_items": { + "name": "navigations_events_items", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "label": { + "name": "label", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_type": { + "name": "link_type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'internal'" + }, + "link_url": { + "name": "link_url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_label": { + "name": "link_label", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_new_tab": { + "name": "link_new_tab", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": true + } + }, + "indexes": { + "navigations_events_items_order_idx": { + "name": "navigations_events_items_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "navigations_events_items_parent_id_idx": { + "name": "navigations_events_items_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + } + }, + "foreignKeys": { + "navigations_events_items_parent_id_fk": { + "name": "navigations_events_items_parent_id_fk", + "tableFrom": "navigations_events_items", + "tableTo": "navigations", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "navigations_about_items_items": { + "name": "navigations_about_items_items", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "link_type": { + "name": "link_type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'internal'" + }, + "link_url": { + "name": "link_url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_label": { + "name": "link_label", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_new_tab": { + "name": "link_new_tab", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": true + } + }, + "indexes": { + "navigations_about_items_items_order_idx": { + "name": "navigations_about_items_items_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "navigations_about_items_items_parent_id_idx": { + "name": "navigations_about_items_items_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + } + }, + "foreignKeys": { + "navigations_about_items_items_parent_id_fk": { + "name": "navigations_about_items_items_parent_id_fk", + "tableFrom": "navigations_about_items_items", + "tableTo": "navigations_about_items", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "navigations_about_items": { + "name": "navigations_about_items", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "label": { + "name": "label", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_type": { + "name": "link_type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'internal'" + }, + "link_url": { + "name": "link_url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_label": { + "name": "link_label", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_new_tab": { + "name": "link_new_tab", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": true + } + }, + "indexes": { + "navigations_about_items_order_idx": { + "name": "navigations_about_items_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "navigations_about_items_parent_id_idx": { + "name": "navigations_about_items_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + } + }, + "foreignKeys": { + "navigations_about_items_parent_id_fk": { + "name": "navigations_about_items_parent_id_fk", + "tableFrom": "navigations_about_items", + "tableTo": "navigations", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "navigations_support_items_items": { + "name": "navigations_support_items_items", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "link_type": { + "name": "link_type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'internal'" + }, + "link_url": { + "name": "link_url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_label": { + "name": "link_label", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_new_tab": { + "name": "link_new_tab", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": true + } + }, + "indexes": { + "navigations_support_items_items_order_idx": { + "name": "navigations_support_items_items_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "navigations_support_items_items_parent_id_idx": { + "name": "navigations_support_items_items_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + } + }, + "foreignKeys": { + "navigations_support_items_items_parent_id_fk": { + "name": "navigations_support_items_items_parent_id_fk", + "tableFrom": "navigations_support_items_items", + "tableTo": "navigations_support_items", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "navigations_support_items": { + "name": "navigations_support_items", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "label": { + "name": "label", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_type": { + "name": "link_type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'internal'" + }, + "link_url": { + "name": "link_url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_label": { + "name": "link_label", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_new_tab": { + "name": "link_new_tab", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": true + } + }, + "indexes": { + "navigations_support_items_order_idx": { + "name": "navigations_support_items_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "navigations_support_items_parent_id_idx": { + "name": "navigations_support_items_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + } + }, + "foreignKeys": { + "navigations_support_items_parent_id_fk": { + "name": "navigations_support_items_parent_id_fk", + "tableFrom": "navigations_support_items", + "tableTo": "navigations", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "navigations": { + "name": "navigations", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "tenant_id": { + "name": "tenant_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "weather_options_enabled": { + "name": "weather_options_enabled", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": true + }, + "education_options_enabled": { + "name": "education_options_enabled", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": true + }, + "accidents_options_enabled": { + "name": "accidents_options_enabled", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": true + }, + "blog_options_enabled": { + "name": "blog_options_enabled", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": true + }, + "events_options_enabled": { + "name": "events_options_enabled", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": true + }, + "about_options_enabled": { + "name": "about_options_enabled", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": true + }, + "support_options_enabled": { + "name": "support_options_enabled", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": true + }, + "donate_options_enabled": { + "name": "donate_options_enabled", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": true + }, + "donate_link_type": { + "name": "donate_link_type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'internal'" + }, + "donate_link_url": { + "name": "donate_link_url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "donate_link_label": { + "name": "donate_link_label", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "donate_link_new_tab": { + "name": "donate_link_new_tab", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": true + }, + "content_hash": { + "name": "content_hash", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + }, + "_status": { + "name": "_status", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'draft'" + } + }, + "indexes": { + "navigations_tenant_idx": { + "name": "navigations_tenant_idx", + "columns": ["tenant_id"], + "isUnique": true + }, + "navigations_updated_at_idx": { + "name": "navigations_updated_at_idx", + "columns": ["updated_at"], + "isUnique": false + }, + "navigations_created_at_idx": { + "name": "navigations_created_at_idx", + "columns": ["created_at"], + "isUnique": false + }, + "navigations__status_idx": { + "name": "navigations__status_idx", + "columns": ["_status"], + "isUnique": false + } + }, + "foreignKeys": { + "navigations_tenant_id_tenants_id_fk": { + "name": "navigations_tenant_id_tenants_id_fk", + "tableFrom": "navigations", + "tableTo": "tenants", + "columnsFrom": ["tenant_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "navigations_rels": { + "name": "navigations_rels", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "path": { + "name": "path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "pages_id": { + "name": "pages_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "built_in_pages_id": { + "name": "built_in_pages_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "posts_id": { + "name": "posts_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "navigations_rels_order_idx": { + "name": "navigations_rels_order_idx", + "columns": ["order"], + "isUnique": false + }, + "navigations_rels_parent_idx": { + "name": "navigations_rels_parent_idx", + "columns": ["parent_id"], + "isUnique": false + }, + "navigations_rels_path_idx": { + "name": "navigations_rels_path_idx", + "columns": ["path"], + "isUnique": false + }, + "navigations_rels_pages_id_idx": { + "name": "navigations_rels_pages_id_idx", + "columns": ["pages_id"], + "isUnique": false + }, + "navigations_rels_built_in_pages_id_idx": { + "name": "navigations_rels_built_in_pages_id_idx", + "columns": ["built_in_pages_id"], + "isUnique": false + }, + "navigations_rels_posts_id_idx": { + "name": "navigations_rels_posts_id_idx", + "columns": ["posts_id"], + "isUnique": false + } + }, + "foreignKeys": { + "navigations_rels_parent_fk": { + "name": "navigations_rels_parent_fk", + "tableFrom": "navigations_rels", + "tableTo": "navigations", + "columnsFrom": ["parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "navigations_rels_pages_fk": { + "name": "navigations_rels_pages_fk", + "tableFrom": "navigations_rels", + "tableTo": "pages", + "columnsFrom": ["pages_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "navigations_rels_built_in_pages_fk": { + "name": "navigations_rels_built_in_pages_fk", + "tableFrom": "navigations_rels", + "tableTo": "built_in_pages", + "columnsFrom": ["built_in_pages_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "navigations_rels_posts_fk": { + "name": "navigations_rels_posts_fk", + "tableFrom": "navigations_rels", + "tableTo": "posts", + "columnsFrom": ["posts_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_navigations_v_version_weather_items_items": { + "name": "_navigations_v_version_weather_items_items", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "link_type": { + "name": "link_type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'internal'" + }, + "link_url": { + "name": "link_url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_label": { + "name": "link_label", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_new_tab": { + "name": "link_new_tab", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": true + }, + "_uuid": { + "name": "_uuid", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "_navigations_v_version_weather_items_items_order_idx": { + "name": "_navigations_v_version_weather_items_items_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "_navigations_v_version_weather_items_items_parent_id_idx": { + "name": "_navigations_v_version_weather_items_items_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + } + }, + "foreignKeys": { + "_navigations_v_version_weather_items_items_parent_id_fk": { + "name": "_navigations_v_version_weather_items_items_parent_id_fk", + "tableFrom": "_navigations_v_version_weather_items_items", + "tableTo": "_navigations_v_version_weather_items", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_navigations_v_version_weather_items": { + "name": "_navigations_v_version_weather_items", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "label": { + "name": "label", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_type": { + "name": "link_type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'internal'" + }, + "link_url": { + "name": "link_url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_label": { + "name": "link_label", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_new_tab": { + "name": "link_new_tab", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": true + }, + "_uuid": { + "name": "_uuid", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "_navigations_v_version_weather_items_order_idx": { + "name": "_navigations_v_version_weather_items_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "_navigations_v_version_weather_items_parent_id_idx": { + "name": "_navigations_v_version_weather_items_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + } + }, + "foreignKeys": { + "_navigations_v_version_weather_items_parent_id_fk": { + "name": "_navigations_v_version_weather_items_parent_id_fk", + "tableFrom": "_navigations_v_version_weather_items", + "tableTo": "_navigations_v", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_navigations_v_version_education_items_items": { + "name": "_navigations_v_version_education_items_items", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "link_type": { + "name": "link_type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'internal'" + }, + "link_url": { + "name": "link_url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_label": { + "name": "link_label", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_new_tab": { + "name": "link_new_tab", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": true + }, + "_uuid": { + "name": "_uuid", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "_navigations_v_version_education_items_items_order_idx": { + "name": "_navigations_v_version_education_items_items_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "_navigations_v_version_education_items_items_parent_id_idx": { + "name": "_navigations_v_version_education_items_items_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + } + }, + "foreignKeys": { + "_navigations_v_version_education_items_items_parent_id_fk": { + "name": "_navigations_v_version_education_items_items_parent_id_fk", + "tableFrom": "_navigations_v_version_education_items_items", + "tableTo": "_navigations_v_version_education_items", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_navigations_v_version_education_items": { + "name": "_navigations_v_version_education_items", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "label": { + "name": "label", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_type": { + "name": "link_type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'internal'" + }, + "link_url": { + "name": "link_url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_label": { + "name": "link_label", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_new_tab": { + "name": "link_new_tab", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": true + }, + "_uuid": { + "name": "_uuid", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "_navigations_v_version_education_items_order_idx": { + "name": "_navigations_v_version_education_items_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "_navigations_v_version_education_items_parent_id_idx": { + "name": "_navigations_v_version_education_items_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + } + }, + "foreignKeys": { + "_navigations_v_version_education_items_parent_id_fk": { + "name": "_navigations_v_version_education_items_parent_id_fk", + "tableFrom": "_navigations_v_version_education_items", + "tableTo": "_navigations_v", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_navigations_v_version_accidents_items_items": { + "name": "_navigations_v_version_accidents_items_items", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "link_type": { + "name": "link_type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'internal'" + }, + "link_url": { + "name": "link_url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_label": { + "name": "link_label", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_new_tab": { + "name": "link_new_tab", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": true + }, + "_uuid": { + "name": "_uuid", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "_navigations_v_version_accidents_items_items_order_idx": { + "name": "_navigations_v_version_accidents_items_items_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "_navigations_v_version_accidents_items_items_parent_id_idx": { + "name": "_navigations_v_version_accidents_items_items_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + } + }, + "foreignKeys": { + "_navigations_v_version_accidents_items_items_parent_id_fk": { + "name": "_navigations_v_version_accidents_items_items_parent_id_fk", + "tableFrom": "_navigations_v_version_accidents_items_items", + "tableTo": "_navigations_v_version_accidents_items", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_navigations_v_version_accidents_items": { + "name": "_navigations_v_version_accidents_items", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "label": { + "name": "label", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_type": { + "name": "link_type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'internal'" + }, + "link_url": { + "name": "link_url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_label": { + "name": "link_label", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_new_tab": { + "name": "link_new_tab", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": true + }, + "_uuid": { + "name": "_uuid", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "_navigations_v_version_accidents_items_order_idx": { + "name": "_navigations_v_version_accidents_items_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "_navigations_v_version_accidents_items_parent_id_idx": { + "name": "_navigations_v_version_accidents_items_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + } + }, + "foreignKeys": { + "_navigations_v_version_accidents_items_parent_id_fk": { + "name": "_navigations_v_version_accidents_items_parent_id_fk", + "tableFrom": "_navigations_v_version_accidents_items", + "tableTo": "_navigations_v", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_navigations_v_version_blog_items_items": { + "name": "_navigations_v_version_blog_items_items", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "link_type": { + "name": "link_type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'internal'" + }, + "link_url": { + "name": "link_url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_label": { + "name": "link_label", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_new_tab": { + "name": "link_new_tab", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": true + }, + "_uuid": { + "name": "_uuid", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "_navigations_v_version_blog_items_items_order_idx": { + "name": "_navigations_v_version_blog_items_items_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "_navigations_v_version_blog_items_items_parent_id_idx": { + "name": "_navigations_v_version_blog_items_items_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + } + }, + "foreignKeys": { + "_navigations_v_version_blog_items_items_parent_id_fk": { + "name": "_navigations_v_version_blog_items_items_parent_id_fk", + "tableFrom": "_navigations_v_version_blog_items_items", + "tableTo": "_navigations_v_version_blog_items", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_navigations_v_version_blog_items": { + "name": "_navigations_v_version_blog_items", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "label": { + "name": "label", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_type": { + "name": "link_type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'internal'" + }, + "link_url": { + "name": "link_url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_label": { + "name": "link_label", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_new_tab": { + "name": "link_new_tab", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": true + }, + "_uuid": { + "name": "_uuid", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "_navigations_v_version_blog_items_order_idx": { + "name": "_navigations_v_version_blog_items_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "_navigations_v_version_blog_items_parent_id_idx": { + "name": "_navigations_v_version_blog_items_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + } + }, + "foreignKeys": { + "_navigations_v_version_blog_items_parent_id_fk": { + "name": "_navigations_v_version_blog_items_parent_id_fk", + "tableFrom": "_navigations_v_version_blog_items", + "tableTo": "_navigations_v", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_navigations_v_version_events_items_items": { + "name": "_navigations_v_version_events_items_items", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "link_type": { + "name": "link_type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'internal'" + }, + "link_url": { + "name": "link_url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_label": { + "name": "link_label", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_new_tab": { + "name": "link_new_tab", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": true + }, + "_uuid": { + "name": "_uuid", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "_navigations_v_version_events_items_items_order_idx": { + "name": "_navigations_v_version_events_items_items_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "_navigations_v_version_events_items_items_parent_id_idx": { + "name": "_navigations_v_version_events_items_items_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + } + }, + "foreignKeys": { + "_navigations_v_version_events_items_items_parent_id_fk": { + "name": "_navigations_v_version_events_items_items_parent_id_fk", + "tableFrom": "_navigations_v_version_events_items_items", + "tableTo": "_navigations_v_version_events_items", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_navigations_v_version_events_items": { + "name": "_navigations_v_version_events_items", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "label": { + "name": "label", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_type": { + "name": "link_type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'internal'" + }, + "link_url": { + "name": "link_url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_label": { + "name": "link_label", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_new_tab": { + "name": "link_new_tab", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": true + }, + "_uuid": { + "name": "_uuid", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "_navigations_v_version_events_items_order_idx": { + "name": "_navigations_v_version_events_items_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "_navigations_v_version_events_items_parent_id_idx": { + "name": "_navigations_v_version_events_items_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + } + }, + "foreignKeys": { + "_navigations_v_version_events_items_parent_id_fk": { + "name": "_navigations_v_version_events_items_parent_id_fk", + "tableFrom": "_navigations_v_version_events_items", + "tableTo": "_navigations_v", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_navigations_v_version_about_items_items": { + "name": "_navigations_v_version_about_items_items", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "link_type": { + "name": "link_type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'internal'" + }, + "link_url": { + "name": "link_url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_label": { + "name": "link_label", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_new_tab": { + "name": "link_new_tab", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": true + }, + "_uuid": { + "name": "_uuid", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "_navigations_v_version_about_items_items_order_idx": { + "name": "_navigations_v_version_about_items_items_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "_navigations_v_version_about_items_items_parent_id_idx": { + "name": "_navigations_v_version_about_items_items_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + } + }, + "foreignKeys": { + "_navigations_v_version_about_items_items_parent_id_fk": { + "name": "_navigations_v_version_about_items_items_parent_id_fk", + "tableFrom": "_navigations_v_version_about_items_items", + "tableTo": "_navigations_v_version_about_items", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_navigations_v_version_about_items": { + "name": "_navigations_v_version_about_items", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "label": { + "name": "label", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_type": { + "name": "link_type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'internal'" + }, + "link_url": { + "name": "link_url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_label": { + "name": "link_label", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_new_tab": { + "name": "link_new_tab", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": true + }, + "_uuid": { + "name": "_uuid", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "_navigations_v_version_about_items_order_idx": { + "name": "_navigations_v_version_about_items_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "_navigations_v_version_about_items_parent_id_idx": { + "name": "_navigations_v_version_about_items_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + } + }, + "foreignKeys": { + "_navigations_v_version_about_items_parent_id_fk": { + "name": "_navigations_v_version_about_items_parent_id_fk", + "tableFrom": "_navigations_v_version_about_items", + "tableTo": "_navigations_v", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_navigations_v_version_support_items_items": { + "name": "_navigations_v_version_support_items_items", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "link_type": { + "name": "link_type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'internal'" + }, + "link_url": { + "name": "link_url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_label": { + "name": "link_label", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_new_tab": { + "name": "link_new_tab", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": true + }, + "_uuid": { + "name": "_uuid", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "_navigations_v_version_support_items_items_order_idx": { + "name": "_navigations_v_version_support_items_items_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "_navigations_v_version_support_items_items_parent_id_idx": { + "name": "_navigations_v_version_support_items_items_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + } + }, + "foreignKeys": { + "_navigations_v_version_support_items_items_parent_id_fk": { + "name": "_navigations_v_version_support_items_items_parent_id_fk", + "tableFrom": "_navigations_v_version_support_items_items", + "tableTo": "_navigations_v_version_support_items", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_navigations_v_version_support_items": { + "name": "_navigations_v_version_support_items", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "label": { + "name": "label", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_type": { + "name": "link_type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'internal'" + }, + "link_url": { + "name": "link_url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_label": { + "name": "link_label", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_new_tab": { + "name": "link_new_tab", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": true + }, + "_uuid": { + "name": "_uuid", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "_navigations_v_version_support_items_order_idx": { + "name": "_navigations_v_version_support_items_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "_navigations_v_version_support_items_parent_id_idx": { + "name": "_navigations_v_version_support_items_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + } + }, + "foreignKeys": { + "_navigations_v_version_support_items_parent_id_fk": { + "name": "_navigations_v_version_support_items_parent_id_fk", + "tableFrom": "_navigations_v_version_support_items", + "tableTo": "_navigations_v", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_navigations_v": { + "name": "_navigations_v", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_tenant_id": { + "name": "version_tenant_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_weather_options_enabled": { + "name": "version_weather_options_enabled", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": true + }, + "version_education_options_enabled": { + "name": "version_education_options_enabled", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": true + }, + "version_accidents_options_enabled": { + "name": "version_accidents_options_enabled", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": true + }, + "version_blog_options_enabled": { + "name": "version_blog_options_enabled", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": true + }, + "version_events_options_enabled": { + "name": "version_events_options_enabled", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": true + }, + "version_about_options_enabled": { + "name": "version_about_options_enabled", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": true + }, + "version_support_options_enabled": { + "name": "version_support_options_enabled", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": true + }, + "version_donate_options_enabled": { + "name": "version_donate_options_enabled", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": true + }, + "version_donate_link_type": { + "name": "version_donate_link_type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'internal'" + }, + "version_donate_link_url": { + "name": "version_donate_link_url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_donate_link_label": { + "name": "version_donate_link_label", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_donate_link_new_tab": { + "name": "version_donate_link_new_tab", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": true + }, + "version_content_hash": { + "name": "version_content_hash", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_updated_at": { + "name": "version_updated_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version_created_at": { + "name": "version_created_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "version__status": { + "name": "version__status", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'draft'" + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + }, + "latest": { + "name": "latest", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "_navigations_v_parent_idx": { + "name": "_navigations_v_parent_idx", + "columns": ["parent_id"], + "isUnique": false + }, + "_navigations_v_version_version_tenant_idx": { + "name": "_navigations_v_version_version_tenant_idx", + "columns": ["version_tenant_id"], + "isUnique": false + }, + "_navigations_v_version_version_updated_at_idx": { + "name": "_navigations_v_version_version_updated_at_idx", + "columns": ["version_updated_at"], + "isUnique": false + }, + "_navigations_v_version_version_created_at_idx": { + "name": "_navigations_v_version_version_created_at_idx", + "columns": ["version_created_at"], + "isUnique": false + }, + "_navigations_v_version_version__status_idx": { + "name": "_navigations_v_version_version__status_idx", + "columns": ["version__status"], + "isUnique": false + }, + "_navigations_v_created_at_idx": { + "name": "_navigations_v_created_at_idx", + "columns": ["created_at"], + "isUnique": false + }, + "_navigations_v_updated_at_idx": { + "name": "_navigations_v_updated_at_idx", + "columns": ["updated_at"], + "isUnique": false + }, + "_navigations_v_latest_idx": { + "name": "_navigations_v_latest_idx", + "columns": ["latest"], + "isUnique": false + } + }, + "foreignKeys": { + "_navigations_v_parent_id_navigations_id_fk": { + "name": "_navigations_v_parent_id_navigations_id_fk", + "tableFrom": "_navigations_v", + "tableTo": "navigations", + "columnsFrom": ["parent_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "_navigations_v_version_tenant_id_tenants_id_fk": { + "name": "_navigations_v_version_tenant_id_tenants_id_fk", + "tableFrom": "_navigations_v", + "tableTo": "tenants", + "columnsFrom": ["version_tenant_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "_navigations_v_rels": { + "name": "_navigations_v_rels", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "path": { + "name": "path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "pages_id": { + "name": "pages_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "built_in_pages_id": { + "name": "built_in_pages_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "posts_id": { + "name": "posts_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "_navigations_v_rels_order_idx": { + "name": "_navigations_v_rels_order_idx", + "columns": ["order"], + "isUnique": false + }, + "_navigations_v_rels_parent_idx": { + "name": "_navigations_v_rels_parent_idx", + "columns": ["parent_id"], + "isUnique": false + }, + "_navigations_v_rels_path_idx": { + "name": "_navigations_v_rels_path_idx", + "columns": ["path"], + "isUnique": false + }, + "_navigations_v_rels_pages_id_idx": { + "name": "_navigations_v_rels_pages_id_idx", + "columns": ["pages_id"], + "isUnique": false + }, + "_navigations_v_rels_built_in_pages_id_idx": { + "name": "_navigations_v_rels_built_in_pages_id_idx", + "columns": ["built_in_pages_id"], + "isUnique": false + }, + "_navigations_v_rels_posts_id_idx": { + "name": "_navigations_v_rels_posts_id_idx", + "columns": ["posts_id"], + "isUnique": false + } + }, + "foreignKeys": { + "_navigations_v_rels_parent_fk": { + "name": "_navigations_v_rels_parent_fk", + "tableFrom": "_navigations_v_rels", + "tableTo": "_navigations_v", + "columnsFrom": ["parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "_navigations_v_rels_pages_fk": { + "name": "_navigations_v_rels_pages_fk", + "tableFrom": "_navigations_v_rels", + "tableTo": "pages", + "columnsFrom": ["pages_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "_navigations_v_rels_built_in_pages_fk": { + "name": "_navigations_v_rels_built_in_pages_fk", + "tableFrom": "_navigations_v_rels", + "tableTo": "built_in_pages", + "columnsFrom": ["built_in_pages_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "_navigations_v_rels_posts_fk": { + "name": "_navigations_v_rels_posts_fk", + "tableFrom": "_navigations_v_rels", + "tableTo": "posts", + "columnsFrom": ["posts_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "settings": { + "name": "settings", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "tenant_id": { + "name": "tenant_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "address": { + "name": "address", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "phone_label": { + "name": "phone_label", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "phone": { + "name": "phone", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "phone_secondary_label": { + "name": "phone_secondary_label", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "phone_secondary": { + "name": "phone_secondary", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "footer_form_title": { + "name": "footer_form_title", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "footer_form_subtitle": { + "name": "footer_form_subtitle", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "footer_form_type": { + "name": "footer_form_type", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "'none'" + }, + "footer_form_html": { + "name": "footer_form_html", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "logo_id": { + "name": "logo_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "icon_id": { + "name": "icon_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "banner_id": { + "name": "banner_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "usfs_logo_id": { + "name": "usfs_logo_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "social_media_instagram": { + "name": "social_media_instagram", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "social_media_facebook": { + "name": "social_media_facebook", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "social_media_twitter": { + "name": "social_media_twitter", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "social_media_linkedin": { + "name": "social_media_linkedin", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "social_media_youtube": { + "name": "social_media_youtube", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "social_media_hashtag": { + "name": "social_media_hashtag", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "terms_id": { + "name": "terms_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "privacy_id": { + "name": "privacy_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "content_hash": { + "name": "content_hash", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + } + }, + "indexes": { + "settings_tenant_idx": { + "name": "settings_tenant_idx", + "columns": ["tenant_id"], + "isUnique": true + }, + "settings_logo_idx": { + "name": "settings_logo_idx", + "columns": ["logo_id"], + "isUnique": false + }, + "settings_icon_idx": { + "name": "settings_icon_idx", + "columns": ["icon_id"], + "isUnique": false + }, + "settings_banner_idx": { + "name": "settings_banner_idx", + "columns": ["banner_id"], + "isUnique": false + }, + "settings_usfs_logo_idx": { + "name": "settings_usfs_logo_idx", + "columns": ["usfs_logo_id"], + "isUnique": false + }, + "settings_terms_idx": { + "name": "settings_terms_idx", + "columns": ["terms_id"], + "isUnique": false + }, + "settings_privacy_idx": { + "name": "settings_privacy_idx", + "columns": ["privacy_id"], + "isUnique": false + }, + "settings_updated_at_idx": { + "name": "settings_updated_at_idx", + "columns": ["updated_at"], + "isUnique": false + }, + "settings_created_at_idx": { + "name": "settings_created_at_idx", + "columns": ["created_at"], + "isUnique": false + } + }, + "foreignKeys": { + "settings_tenant_id_tenants_id_fk": { + "name": "settings_tenant_id_tenants_id_fk", + "tableFrom": "settings", + "tableTo": "tenants", + "columnsFrom": ["tenant_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "settings_logo_id_media_id_fk": { + "name": "settings_logo_id_media_id_fk", + "tableFrom": "settings", + "tableTo": "media", + "columnsFrom": ["logo_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "settings_icon_id_media_id_fk": { + "name": "settings_icon_id_media_id_fk", + "tableFrom": "settings", + "tableTo": "media", + "columnsFrom": ["icon_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "settings_banner_id_media_id_fk": { + "name": "settings_banner_id_media_id_fk", + "tableFrom": "settings", + "tableTo": "media", + "columnsFrom": ["banner_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "settings_usfs_logo_id_media_id_fk": { + "name": "settings_usfs_logo_id_media_id_fk", + "tableFrom": "settings", + "tableTo": "media", + "columnsFrom": ["usfs_logo_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "settings_terms_id_pages_id_fk": { + "name": "settings_terms_id_pages_id_fk", + "tableFrom": "settings", + "tableTo": "pages", + "columnsFrom": ["terms_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "settings_privacy_id_pages_id_fk": { + "name": "settings_privacy_id_pages_id_fk", + "tableFrom": "settings", + "tableTo": "pages", + "columnsFrom": ["privacy_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "settings_rels": { + "name": "settings_rels", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "path": { + "name": "path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "forms_id": { + "name": "forms_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "settings_rels_order_idx": { + "name": "settings_rels_order_idx", + "columns": ["order"], + "isUnique": false + }, + "settings_rels_parent_idx": { + "name": "settings_rels_parent_idx", + "columns": ["parent_id"], + "isUnique": false + }, + "settings_rels_path_idx": { + "name": "settings_rels_path_idx", + "columns": ["path"], + "isUnique": false + }, + "settings_rels_forms_id_idx": { + "name": "settings_rels_forms_id_idx", + "columns": ["forms_id"], + "isUnique": false + } + }, + "foreignKeys": { + "settings_rels_parent_fk": { + "name": "settings_rels_parent_fk", + "tableFrom": "settings_rels", + "tableTo": "settings", + "columnsFrom": ["parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "settings_rels_forms_fk": { + "name": "settings_rels_forms_fk", + "tableFrom": "settings_rels", + "tableTo": "forms", + "columnsFrom": ["forms_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "redirects": { + "name": "redirects", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "from": { + "name": "from", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "to_type": { + "name": "to_type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'internal'" + }, + "to_new_tab": { + "name": "to_new_tab", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "to_url": { + "name": "to_url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "tenant_id": { + "name": "tenant_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "content_hash": { + "name": "content_hash", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + } + }, + "indexes": { + "redirects_from_idx": { + "name": "redirects_from_idx", + "columns": ["from"], + "isUnique": false + }, + "redirects_tenant_idx": { + "name": "redirects_tenant_idx", + "columns": ["tenant_id"], + "isUnique": false + }, + "redirects_updated_at_idx": { + "name": "redirects_updated_at_idx", + "columns": ["updated_at"], + "isUnique": false + }, + "redirects_created_at_idx": { + "name": "redirects_created_at_idx", + "columns": ["created_at"], + "isUnique": false + } + }, + "foreignKeys": { + "redirects_tenant_id_tenants_id_fk": { + "name": "redirects_tenant_id_tenants_id_fk", + "tableFrom": "redirects", + "tableTo": "tenants", + "columnsFrom": ["tenant_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "redirects_rels": { + "name": "redirects_rels", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "path": { + "name": "path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "pages_id": { + "name": "pages_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "built_in_pages_id": { + "name": "built_in_pages_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "posts_id": { + "name": "posts_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "redirects_rels_order_idx": { + "name": "redirects_rels_order_idx", + "columns": ["order"], + "isUnique": false + }, + "redirects_rels_parent_idx": { + "name": "redirects_rels_parent_idx", + "columns": ["parent_id"], + "isUnique": false + }, + "redirects_rels_path_idx": { + "name": "redirects_rels_path_idx", + "columns": ["path"], + "isUnique": false + }, + "redirects_rels_pages_id_idx": { + "name": "redirects_rels_pages_id_idx", + "columns": ["pages_id"], + "isUnique": false + }, + "redirects_rels_built_in_pages_id_idx": { + "name": "redirects_rels_built_in_pages_id_idx", + "columns": ["built_in_pages_id"], + "isUnique": false + }, + "redirects_rels_posts_id_idx": { + "name": "redirects_rels_posts_id_idx", + "columns": ["posts_id"], + "isUnique": false + } + }, + "foreignKeys": { + "redirects_rels_parent_fk": { + "name": "redirects_rels_parent_fk", + "tableFrom": "redirects_rels", + "tableTo": "redirects", + "columnsFrom": ["parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "redirects_rels_pages_fk": { + "name": "redirects_rels_pages_fk", + "tableFrom": "redirects_rels", + "tableTo": "pages", + "columnsFrom": ["pages_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "redirects_rels_built_in_pages_fk": { + "name": "redirects_rels_built_in_pages_fk", + "tableFrom": "redirects_rels", + "tableTo": "built_in_pages", + "columnsFrom": ["built_in_pages_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "redirects_rels_posts_fk": { + "name": "redirects_rels_posts_fk", + "tableFrom": "redirects_rels", + "tableTo": "posts", + "columnsFrom": ["posts_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "forms_blocks_checkbox": { + "name": "forms_blocks_checkbox", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "label": { + "name": "label", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "width": { + "name": "width", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "required": { + "name": "required", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "default_value": { + "name": "default_value", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "forms_blocks_checkbox_order_idx": { + "name": "forms_blocks_checkbox_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "forms_blocks_checkbox_parent_id_idx": { + "name": "forms_blocks_checkbox_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "forms_blocks_checkbox_path_idx": { + "name": "forms_blocks_checkbox_path_idx", + "columns": ["_path"], + "isUnique": false + } + }, + "foreignKeys": { + "forms_blocks_checkbox_parent_id_fk": { + "name": "forms_blocks_checkbox_parent_id_fk", + "tableFrom": "forms_blocks_checkbox", + "tableTo": "forms", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "forms_blocks_country": { + "name": "forms_blocks_country", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "label": { + "name": "label", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "width": { + "name": "width", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "required": { + "name": "required", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "forms_blocks_country_order_idx": { + "name": "forms_blocks_country_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "forms_blocks_country_parent_id_idx": { + "name": "forms_blocks_country_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "forms_blocks_country_path_idx": { + "name": "forms_blocks_country_path_idx", + "columns": ["_path"], + "isUnique": false + } + }, + "foreignKeys": { + "forms_blocks_country_parent_id_fk": { + "name": "forms_blocks_country_parent_id_fk", + "tableFrom": "forms_blocks_country", + "tableTo": "forms", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "forms_blocks_email": { + "name": "forms_blocks_email", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "label": { + "name": "label", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "width": { + "name": "width", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "required": { + "name": "required", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "forms_blocks_email_order_idx": { + "name": "forms_blocks_email_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "forms_blocks_email_parent_id_idx": { + "name": "forms_blocks_email_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "forms_blocks_email_path_idx": { + "name": "forms_blocks_email_path_idx", + "columns": ["_path"], + "isUnique": false + } + }, + "foreignKeys": { + "forms_blocks_email_parent_id_fk": { + "name": "forms_blocks_email_parent_id_fk", + "tableFrom": "forms_blocks_email", + "tableTo": "forms", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "forms_blocks_message": { + "name": "forms_blocks_message", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "message": { + "name": "message", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "forms_blocks_message_order_idx": { + "name": "forms_blocks_message_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "forms_blocks_message_parent_id_idx": { + "name": "forms_blocks_message_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "forms_blocks_message_path_idx": { + "name": "forms_blocks_message_path_idx", + "columns": ["_path"], + "isUnique": false + } + }, + "foreignKeys": { + "forms_blocks_message_parent_id_fk": { + "name": "forms_blocks_message_parent_id_fk", + "tableFrom": "forms_blocks_message", + "tableTo": "forms", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "forms_blocks_number": { + "name": "forms_blocks_number", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "label": { + "name": "label", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "width": { + "name": "width", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "default_value": { + "name": "default_value", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "required": { + "name": "required", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "forms_blocks_number_order_idx": { + "name": "forms_blocks_number_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "forms_blocks_number_parent_id_idx": { + "name": "forms_blocks_number_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "forms_blocks_number_path_idx": { + "name": "forms_blocks_number_path_idx", + "columns": ["_path"], + "isUnique": false + } + }, + "foreignKeys": { + "forms_blocks_number_parent_id_fk": { + "name": "forms_blocks_number_parent_id_fk", + "tableFrom": "forms_blocks_number", + "tableTo": "forms", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "forms_blocks_select_options": { + "name": "forms_blocks_select_options", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "label": { + "name": "label", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "value": { + "name": "value", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "forms_blocks_select_options_order_idx": { + "name": "forms_blocks_select_options_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "forms_blocks_select_options_parent_id_idx": { + "name": "forms_blocks_select_options_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + } + }, + "foreignKeys": { + "forms_blocks_select_options_parent_id_fk": { + "name": "forms_blocks_select_options_parent_id_fk", + "tableFrom": "forms_blocks_select_options", + "tableTo": "forms_blocks_select", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "forms_blocks_select": { + "name": "forms_blocks_select", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "label": { + "name": "label", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "width": { + "name": "width", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "default_value": { + "name": "default_value", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "placeholder": { + "name": "placeholder", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "required": { + "name": "required", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "forms_blocks_select_order_idx": { + "name": "forms_blocks_select_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "forms_blocks_select_parent_id_idx": { + "name": "forms_blocks_select_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "forms_blocks_select_path_idx": { + "name": "forms_blocks_select_path_idx", + "columns": ["_path"], + "isUnique": false + } + }, + "foreignKeys": { + "forms_blocks_select_parent_id_fk": { + "name": "forms_blocks_select_parent_id_fk", + "tableFrom": "forms_blocks_select", + "tableTo": "forms", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "forms_blocks_state": { + "name": "forms_blocks_state", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "label": { + "name": "label", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "width": { + "name": "width", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "required": { + "name": "required", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "forms_blocks_state_order_idx": { + "name": "forms_blocks_state_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "forms_blocks_state_parent_id_idx": { + "name": "forms_blocks_state_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "forms_blocks_state_path_idx": { + "name": "forms_blocks_state_path_idx", + "columns": ["_path"], + "isUnique": false + } + }, + "foreignKeys": { + "forms_blocks_state_parent_id_fk": { + "name": "forms_blocks_state_parent_id_fk", + "tableFrom": "forms_blocks_state", + "tableTo": "forms", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "forms_blocks_text": { + "name": "forms_blocks_text", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "label": { + "name": "label", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "width": { + "name": "width", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "default_value": { + "name": "default_value", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "required": { + "name": "required", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "forms_blocks_text_order_idx": { + "name": "forms_blocks_text_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "forms_blocks_text_parent_id_idx": { + "name": "forms_blocks_text_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "forms_blocks_text_path_idx": { + "name": "forms_blocks_text_path_idx", + "columns": ["_path"], + "isUnique": false + } + }, + "foreignKeys": { + "forms_blocks_text_parent_id_fk": { + "name": "forms_blocks_text_parent_id_fk", + "tableFrom": "forms_blocks_text", + "tableTo": "forms", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "forms_blocks_textarea": { + "name": "forms_blocks_textarea", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "label": { + "name": "label", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "width": { + "name": "width", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "default_value": { + "name": "default_value", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "required": { + "name": "required", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "forms_blocks_textarea_order_idx": { + "name": "forms_blocks_textarea_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "forms_blocks_textarea_parent_id_idx": { + "name": "forms_blocks_textarea_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + }, + "forms_blocks_textarea_path_idx": { + "name": "forms_blocks_textarea_path_idx", + "columns": ["_path"], + "isUnique": false + } + }, + "foreignKeys": { + "forms_blocks_textarea_parent_id_fk": { + "name": "forms_blocks_textarea_parent_id_fk", + "tableFrom": "forms_blocks_textarea", + "tableTo": "forms", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "forms_emails": { + "name": "forms_emails", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "email_to": { + "name": "email_to", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "cc": { + "name": "cc", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "bcc": { + "name": "bcc", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "reply_to": { + "name": "reply_to", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "email_from": { + "name": "email_from", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "subject": { + "name": "subject", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "'You''ve received a new message.'" + }, + "message": { + "name": "message", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "forms_emails_order_idx": { + "name": "forms_emails_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "forms_emails_parent_id_idx": { + "name": "forms_emails_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + } + }, + "foreignKeys": { + "forms_emails_parent_id_fk": { + "name": "forms_emails_parent_id_fk", + "tableFrom": "forms_emails", + "tableTo": "forms", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "forms": { + "name": "forms", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "submit_button_label": { + "name": "submit_button_label", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "confirmation_type": { + "name": "confirmation_type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'message'" + }, + "confirmation_message": { + "name": "confirmation_message", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "redirect_url": { + "name": "redirect_url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "tenant_id": { + "name": "tenant_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + } + }, + "indexes": { + "forms_tenant_idx": { + "name": "forms_tenant_idx", + "columns": ["tenant_id"], + "isUnique": false + }, + "forms_updated_at_idx": { + "name": "forms_updated_at_idx", + "columns": ["updated_at"], + "isUnique": false + }, + "forms_created_at_idx": { + "name": "forms_created_at_idx", + "columns": ["created_at"], + "isUnique": false + } + }, + "foreignKeys": { + "forms_tenant_id_tenants_id_fk": { + "name": "forms_tenant_id_tenants_id_fk", + "tableFrom": "forms", + "tableTo": "tenants", + "columnsFrom": ["tenant_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "form_submissions_submission_data": { + "name": "form_submissions_submission_data", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "field": { + "name": "field", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "value": { + "name": "value", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "form_submissions_submission_data_order_idx": { + "name": "form_submissions_submission_data_order_idx", + "columns": ["_order"], + "isUnique": false + }, + "form_submissions_submission_data_parent_id_idx": { + "name": "form_submissions_submission_data_parent_id_idx", + "columns": ["_parent_id"], + "isUnique": false + } + }, + "foreignKeys": { + "form_submissions_submission_data_parent_id_fk": { + "name": "form_submissions_submission_data_parent_id_fk", + "tableFrom": "form_submissions_submission_data", + "tableTo": "form_submissions", + "columnsFrom": ["_parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "form_submissions": { + "name": "form_submissions", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "form_id": { + "name": "form_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "tenant_id": { + "name": "tenant_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + } + }, + "indexes": { + "form_submissions_form_idx": { + "name": "form_submissions_form_idx", + "columns": ["form_id"], + "isUnique": false + }, + "form_submissions_tenant_idx": { + "name": "form_submissions_tenant_idx", + "columns": ["tenant_id"], + "isUnique": false + }, + "form_submissions_updated_at_idx": { + "name": "form_submissions_updated_at_idx", + "columns": ["updated_at"], + "isUnique": false + }, + "form_submissions_created_at_idx": { + "name": "form_submissions_created_at_idx", + "columns": ["created_at"], + "isUnique": false + } + }, + "foreignKeys": { + "form_submissions_form_id_forms_id_fk": { + "name": "form_submissions_form_id_forms_id_fk", + "tableFrom": "form_submissions", + "tableTo": "forms", + "columnsFrom": ["form_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "form_submissions_tenant_id_tenants_id_fk": { + "name": "form_submissions_tenant_id_tenants_id_fk", + "tableFrom": "form_submissions", + "tableTo": "tenants", + "columnsFrom": ["tenant_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "payload_mcp_api_keys": { + "name": "payload_mcp_api_keys", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "label": { + "name": "label", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "pages_find": { + "name": "pages_find", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": false + }, + "posts_find": { + "name": "posts_find", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": false + }, + "home_pages_find": { + "name": "home_pages_find", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": false + }, + "events_find": { + "name": "events_find", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": false + }, + "media_find": { + "name": "media_find", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": false + }, + "teams_find": { + "name": "teams_find", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": false + }, + "biographies_find": { + "name": "biographies_find", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": false + }, + "sponsors_find": { + "name": "sponsors_find", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": false + }, + "tags_find": { + "name": "tags_find", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": false + }, + "documents_find": { + "name": "documents_find", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": false + }, + "forms_find": { + "name": "forms_find", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": false + }, + "navigations_find": { + "name": "navigations_find", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": false + }, + "settings_find": { + "name": "settings_find", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": false + }, + "tenants_find": { + "name": "tenants_find", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": false + }, + "event_groups_find": { + "name": "event_groups_find", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": false + }, + "event_tags_find": { + "name": "event_tags_find", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": false + }, + "nac_widgets_config_find": { + "name": "nac_widgets_config_find", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": false + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + }, + "enable_a_p_i_key": { + "name": "enable_a_p_i_key", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "api_key": { + "name": "api_key", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "api_key_index": { + "name": "api_key_index", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "payload_mcp_api_keys_user_idx": { + "name": "payload_mcp_api_keys_user_idx", + "columns": ["user_id"], + "isUnique": false + }, + "payload_mcp_api_keys_updated_at_idx": { + "name": "payload_mcp_api_keys_updated_at_idx", + "columns": ["updated_at"], + "isUnique": false + }, + "payload_mcp_api_keys_created_at_idx": { + "name": "payload_mcp_api_keys_created_at_idx", + "columns": ["created_at"], + "isUnique": false + } + }, + "foreignKeys": { + "payload_mcp_api_keys_user_id_users_id_fk": { + "name": "payload_mcp_api_keys_user_id_users_id_fk", + "tableFrom": "payload_mcp_api_keys", + "tableTo": "users", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "payload_kv": { + "name": "payload_kv", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "key": { + "name": "key", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "data": { + "name": "data", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "payload_kv_key_idx": { + "name": "payload_kv_key_idx", + "columns": ["key"], + "isUnique": true + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "payload_locked_documents": { + "name": "payload_locked_documents", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "global_slug": { + "name": "global_slug", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + } + }, + "indexes": { + "payload_locked_documents_global_slug_idx": { + "name": "payload_locked_documents_global_slug_idx", + "columns": ["global_slug"], + "isUnique": false + }, + "payload_locked_documents_updated_at_idx": { + "name": "payload_locked_documents_updated_at_idx", + "columns": ["updated_at"], + "isUnique": false + }, + "payload_locked_documents_created_at_idx": { + "name": "payload_locked_documents_created_at_idx", + "columns": ["created_at"], + "isUnique": false + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "payload_locked_documents_rels": { + "name": "payload_locked_documents_rels", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "path": { + "name": "path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "home_pages_id": { + "name": "home_pages_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "built_in_pages_id": { + "name": "built_in_pages_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "pages_id": { + "name": "pages_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "posts_id": { + "name": "posts_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "media_id": { + "name": "media_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "documents_id": { + "name": "documents_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "sponsors_id": { + "name": "sponsors_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "tags_id": { + "name": "tags_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "events_id": { + "name": "events_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "event_groups_id": { + "name": "event_groups_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "event_tags_id": { + "name": "event_tags_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "providers_id": { + "name": "providers_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "courses_id": { + "name": "courses_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "biographies_id": { + "name": "biographies_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "teams_id": { + "name": "teams_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "users_id": { + "name": "users_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "roles_id": { + "name": "roles_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "role_assignments_id": { + "name": "role_assignments_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "global_roles_id": { + "name": "global_roles_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "global_role_assignments_id": { + "name": "global_role_assignments_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "tenants_id": { + "name": "tenants_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "navigations_id": { + "name": "navigations_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "settings_id": { + "name": "settings_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "redirects_id": { + "name": "redirects_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "forms_id": { + "name": "forms_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "form_submissions_id": { + "name": "form_submissions_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "payload_mcp_api_keys_id": { + "name": "payload_mcp_api_keys_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "payload_locked_documents_rels_order_idx": { + "name": "payload_locked_documents_rels_order_idx", + "columns": ["order"], + "isUnique": false + }, + "payload_locked_documents_rels_parent_idx": { + "name": "payload_locked_documents_rels_parent_idx", + "columns": ["parent_id"], + "isUnique": false + }, + "payload_locked_documents_rels_path_idx": { + "name": "payload_locked_documents_rels_path_idx", + "columns": ["path"], + "isUnique": false + }, + "payload_locked_documents_rels_home_pages_id_idx": { + "name": "payload_locked_documents_rels_home_pages_id_idx", + "columns": ["home_pages_id"], + "isUnique": false + }, + "payload_locked_documents_rels_built_in_pages_id_idx": { + "name": "payload_locked_documents_rels_built_in_pages_id_idx", + "columns": ["built_in_pages_id"], + "isUnique": false + }, + "payload_locked_documents_rels_pages_id_idx": { + "name": "payload_locked_documents_rels_pages_id_idx", + "columns": ["pages_id"], + "isUnique": false + }, + "payload_locked_documents_rels_posts_id_idx": { + "name": "payload_locked_documents_rels_posts_id_idx", + "columns": ["posts_id"], + "isUnique": false + }, + "payload_locked_documents_rels_media_id_idx": { + "name": "payload_locked_documents_rels_media_id_idx", + "columns": ["media_id"], + "isUnique": false + }, + "payload_locked_documents_rels_documents_id_idx": { + "name": "payload_locked_documents_rels_documents_id_idx", + "columns": ["documents_id"], + "isUnique": false + }, + "payload_locked_documents_rels_sponsors_id_idx": { + "name": "payload_locked_documents_rels_sponsors_id_idx", + "columns": ["sponsors_id"], + "isUnique": false + }, + "payload_locked_documents_rels_tags_id_idx": { + "name": "payload_locked_documents_rels_tags_id_idx", + "columns": ["tags_id"], + "isUnique": false + }, + "payload_locked_documents_rels_events_id_idx": { + "name": "payload_locked_documents_rels_events_id_idx", + "columns": ["events_id"], + "isUnique": false + }, + "payload_locked_documents_rels_event_groups_id_idx": { + "name": "payload_locked_documents_rels_event_groups_id_idx", + "columns": ["event_groups_id"], + "isUnique": false + }, + "payload_locked_documents_rels_event_tags_id_idx": { + "name": "payload_locked_documents_rels_event_tags_id_idx", + "columns": ["event_tags_id"], + "isUnique": false + }, + "payload_locked_documents_rels_providers_id_idx": { + "name": "payload_locked_documents_rels_providers_id_idx", + "columns": ["providers_id"], + "isUnique": false + }, + "payload_locked_documents_rels_courses_id_idx": { + "name": "payload_locked_documents_rels_courses_id_idx", + "columns": ["courses_id"], + "isUnique": false + }, + "payload_locked_documents_rels_biographies_id_idx": { + "name": "payload_locked_documents_rels_biographies_id_idx", + "columns": ["biographies_id"], + "isUnique": false + }, + "payload_locked_documents_rels_teams_id_idx": { + "name": "payload_locked_documents_rels_teams_id_idx", + "columns": ["teams_id"], + "isUnique": false + }, + "payload_locked_documents_rels_users_id_idx": { + "name": "payload_locked_documents_rels_users_id_idx", + "columns": ["users_id"], + "isUnique": false + }, + "payload_locked_documents_rels_roles_id_idx": { + "name": "payload_locked_documents_rels_roles_id_idx", + "columns": ["roles_id"], + "isUnique": false + }, + "payload_locked_documents_rels_role_assignments_id_idx": { + "name": "payload_locked_documents_rels_role_assignments_id_idx", + "columns": ["role_assignments_id"], + "isUnique": false + }, + "payload_locked_documents_rels_global_roles_id_idx": { + "name": "payload_locked_documents_rels_global_roles_id_idx", + "columns": ["global_roles_id"], + "isUnique": false + }, + "payload_locked_documents_rels_global_role_assignments_id_idx": { + "name": "payload_locked_documents_rels_global_role_assignments_id_idx", + "columns": ["global_role_assignments_id"], + "isUnique": false + }, + "payload_locked_documents_rels_tenants_id_idx": { + "name": "payload_locked_documents_rels_tenants_id_idx", + "columns": ["tenants_id"], + "isUnique": false + }, + "payload_locked_documents_rels_navigations_id_idx": { + "name": "payload_locked_documents_rels_navigations_id_idx", + "columns": ["navigations_id"], + "isUnique": false + }, + "payload_locked_documents_rels_settings_id_idx": { + "name": "payload_locked_documents_rels_settings_id_idx", + "columns": ["settings_id"], + "isUnique": false + }, + "payload_locked_documents_rels_redirects_id_idx": { + "name": "payload_locked_documents_rels_redirects_id_idx", + "columns": ["redirects_id"], + "isUnique": false + }, + "payload_locked_documents_rels_forms_id_idx": { + "name": "payload_locked_documents_rels_forms_id_idx", + "columns": ["forms_id"], + "isUnique": false + }, + "payload_locked_documents_rels_form_submissions_id_idx": { + "name": "payload_locked_documents_rels_form_submissions_id_idx", + "columns": ["form_submissions_id"], + "isUnique": false + }, + "payload_locked_documents_rels_payload_mcp_api_keys_id_idx": { + "name": "payload_locked_documents_rels_payload_mcp_api_keys_id_idx", + "columns": ["payload_mcp_api_keys_id"], + "isUnique": false + } + }, + "foreignKeys": { + "payload_locked_documents_rels_parent_fk": { + "name": "payload_locked_documents_rels_parent_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "payload_locked_documents", + "columnsFrom": ["parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_home_pages_fk": { + "name": "payload_locked_documents_rels_home_pages_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "home_pages", + "columnsFrom": ["home_pages_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_built_in_pages_fk": { + "name": "payload_locked_documents_rels_built_in_pages_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "built_in_pages", + "columnsFrom": ["built_in_pages_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_pages_fk": { + "name": "payload_locked_documents_rels_pages_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "pages", + "columnsFrom": ["pages_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_posts_fk": { + "name": "payload_locked_documents_rels_posts_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "posts", + "columnsFrom": ["posts_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_media_fk": { + "name": "payload_locked_documents_rels_media_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "media", + "columnsFrom": ["media_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_documents_fk": { + "name": "payload_locked_documents_rels_documents_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "documents", + "columnsFrom": ["documents_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_sponsors_fk": { + "name": "payload_locked_documents_rels_sponsors_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "sponsors", + "columnsFrom": ["sponsors_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_tags_fk": { + "name": "payload_locked_documents_rels_tags_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "tags", + "columnsFrom": ["tags_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_events_fk": { + "name": "payload_locked_documents_rels_events_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "events", + "columnsFrom": ["events_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_event_groups_fk": { + "name": "payload_locked_documents_rels_event_groups_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "event_groups", + "columnsFrom": ["event_groups_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_event_tags_fk": { + "name": "payload_locked_documents_rels_event_tags_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "event_tags", + "columnsFrom": ["event_tags_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_providers_fk": { + "name": "payload_locked_documents_rels_providers_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "providers", + "columnsFrom": ["providers_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_courses_fk": { + "name": "payload_locked_documents_rels_courses_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "courses", + "columnsFrom": ["courses_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_biographies_fk": { + "name": "payload_locked_documents_rels_biographies_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "biographies", + "columnsFrom": ["biographies_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_teams_fk": { + "name": "payload_locked_documents_rels_teams_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "teams", + "columnsFrom": ["teams_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_users_fk": { + "name": "payload_locked_documents_rels_users_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "users", + "columnsFrom": ["users_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_roles_fk": { + "name": "payload_locked_documents_rels_roles_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "roles", + "columnsFrom": ["roles_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_role_assignments_fk": { + "name": "payload_locked_documents_rels_role_assignments_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "role_assignments", + "columnsFrom": ["role_assignments_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_global_roles_fk": { + "name": "payload_locked_documents_rels_global_roles_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "global_roles", + "columnsFrom": ["global_roles_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_global_role_assignments_fk": { + "name": "payload_locked_documents_rels_global_role_assignments_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "global_role_assignments", + "columnsFrom": ["global_role_assignments_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_tenants_fk": { + "name": "payload_locked_documents_rels_tenants_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "tenants", + "columnsFrom": ["tenants_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_navigations_fk": { + "name": "payload_locked_documents_rels_navigations_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "navigations", + "columnsFrom": ["navigations_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_settings_fk": { + "name": "payload_locked_documents_rels_settings_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "settings", + "columnsFrom": ["settings_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_redirects_fk": { + "name": "payload_locked_documents_rels_redirects_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "redirects", + "columnsFrom": ["redirects_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_forms_fk": { + "name": "payload_locked_documents_rels_forms_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "forms", + "columnsFrom": ["forms_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_form_submissions_fk": { + "name": "payload_locked_documents_rels_form_submissions_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "form_submissions", + "columnsFrom": ["form_submissions_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_payload_mcp_api_keys_fk": { + "name": "payload_locked_documents_rels_payload_mcp_api_keys_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "payload_mcp_api_keys", + "columnsFrom": ["payload_mcp_api_keys_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "payload_preferences": { + "name": "payload_preferences", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "key": { + "name": "key", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "value": { + "name": "value", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + } + }, + "indexes": { + "payload_preferences_key_idx": { + "name": "payload_preferences_key_idx", + "columns": ["key"], + "isUnique": false + }, + "payload_preferences_updated_at_idx": { + "name": "payload_preferences_updated_at_idx", + "columns": ["updated_at"], + "isUnique": false + }, + "payload_preferences_created_at_idx": { + "name": "payload_preferences_created_at_idx", + "columns": ["created_at"], + "isUnique": false + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "payload_preferences_rels": { + "name": "payload_preferences_rels", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "path": { + "name": "path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "users_id": { + "name": "users_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "payload_mcp_api_keys_id": { + "name": "payload_mcp_api_keys_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "payload_preferences_rels_order_idx": { + "name": "payload_preferences_rels_order_idx", + "columns": ["order"], + "isUnique": false + }, + "payload_preferences_rels_parent_idx": { + "name": "payload_preferences_rels_parent_idx", + "columns": ["parent_id"], + "isUnique": false + }, + "payload_preferences_rels_path_idx": { + "name": "payload_preferences_rels_path_idx", + "columns": ["path"], + "isUnique": false + }, + "payload_preferences_rels_users_id_idx": { + "name": "payload_preferences_rels_users_id_idx", + "columns": ["users_id"], + "isUnique": false + }, + "payload_preferences_rels_payload_mcp_api_keys_id_idx": { + "name": "payload_preferences_rels_payload_mcp_api_keys_id_idx", + "columns": ["payload_mcp_api_keys_id"], + "isUnique": false + } + }, + "foreignKeys": { + "payload_preferences_rels_parent_fk": { + "name": "payload_preferences_rels_parent_fk", + "tableFrom": "payload_preferences_rels", + "tableTo": "payload_preferences", + "columnsFrom": ["parent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_preferences_rels_users_fk": { + "name": "payload_preferences_rels_users_fk", + "tableFrom": "payload_preferences_rels", + "tableTo": "users", + "columnsFrom": ["users_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_preferences_rels_payload_mcp_api_keys_fk": { + "name": "payload_preferences_rels_payload_mcp_api_keys_fk", + "tableFrom": "payload_preferences_rels", + "tableTo": "payload_mcp_api_keys", + "columnsFrom": ["payload_mcp_api_keys_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "payload_migrations": { + "name": "payload_migrations", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "batch": { + "name": "batch", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + } + }, + "indexes": { + "payload_migrations_updated_at_idx": { + "name": "payload_migrations_updated_at_idx", + "columns": ["updated_at"], + "isUnique": false + }, + "payload_migrations_created_at_idx": { + "name": "payload_migrations_created_at_idx", + "columns": ["created_at"], + "isUnique": false + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "nac_widgets_config": { + "name": "nac_widgets_config", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "version": { + "name": "version", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "base_url": { + "name": "base_url", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "'https://du6amfiq9m9h7.cloudfront.net/public/v2'" + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "diagnostics": { + "name": "diagnostics", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "a3_management": { + "name": "a3_management", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "provider_manager_role_id": { + "name": "provider_manager_role_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "a3_management_provider_manager_role_idx": { + "name": "a3_management_provider_manager_role_idx", + "columns": ["provider_manager_role_id"], + "isUnique": false + } + }, + "foreignKeys": { + "a3_management_provider_manager_role_id_global_roles_id_fk": { + "name": "a3_management_provider_manager_role_id_global_roles_id_fk", + "tableFrom": "a3_management", + "tableTo": "global_roles", + "columnsFrom": ["provider_manager_role_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + } + }, + "views": {}, + "enums": {}, + "_meta": { + "tables": {}, + "columns": {} + }, + "internal": { + "indexes": {} + }, + "id": "561d9c25-8efb-4c2e-9250-507d8a266d6e", + "prevId": "00000000-0000-0000-0000-000000000000" +} diff --git a/src/migrations/20260414_034842_remove_old_block_tracking_fields.ts b/src/migrations/20260414_034842_remove_old_block_tracking_fields.ts new file mode 100644 index 000000000..ff375e77a --- /dev/null +++ b/src/migrations/20260414_034842_remove_old_block_tracking_fields.ts @@ -0,0 +1,112 @@ +import { MigrateDownArgs, MigrateUpArgs, sql } from '@payloadcms/db-sqlite' + +export async function up({ db, payload, req }: MigrateUpArgs): Promise { + await db.run(sql`DROP TABLE \`home_pages_blocks_in_highlighted_content\`;`) + await db.run(sql`DROP TABLE \`_home_pages_v_version_blocks_in_highlighted_content\`;`) + await db.run(sql`DROP TABLE \`posts_blocks_in_content\`;`) + await db.run(sql`DROP TABLE \`_posts_v_version_blocks_in_content\`;`) + await db.run(sql`DROP TABLE \`events_blocks_in_content\`;`) + await db.run(sql`DROP TABLE \`_events_v_version_blocks_in_content\`;`) +} + +export async function down({ db, payload, req }: MigrateDownArgs): Promise { + await db.run(sql`CREATE TABLE \`home_pages_blocks_in_highlighted_content\` ( + \`_order\` integer NOT NULL, + \`_parent_id\` integer NOT NULL, + \`id\` text PRIMARY KEY NOT NULL, + \`block_type\` text, + \`collection\` text, + \`doc_id\` numeric, + FOREIGN KEY (\`_parent_id\`) REFERENCES \`home_pages\`(\`id\`) ON UPDATE no action ON DELETE cascade + ); + `) + await db.run( + sql`CREATE INDEX \`home_pages_blocks_in_highlighted_content_order_idx\` ON \`home_pages_blocks_in_highlighted_content\` (\`_order\`);`, + ) + await db.run( + sql`CREATE INDEX \`home_pages_blocks_in_highlighted_content_parent_id_idx\` ON \`home_pages_blocks_in_highlighted_content\` (\`_parent_id\`);`, + ) + await db.run(sql`CREATE TABLE \`_home_pages_v_version_blocks_in_highlighted_content\` ( + \`_order\` integer NOT NULL, + \`_parent_id\` integer NOT NULL, + \`id\` integer PRIMARY KEY NOT NULL, + \`block_type\` text, + \`collection\` text, + \`doc_id\` numeric, + \`_uuid\` text, + FOREIGN KEY (\`_parent_id\`) REFERENCES \`_home_pages_v\`(\`id\`) ON UPDATE no action ON DELETE cascade + ); + `) + await db.run( + sql`CREATE INDEX \`_home_pages_v_version_blocks_in_highlighted_content_order_idx\` ON \`_home_pages_v_version_blocks_in_highlighted_content\` (\`_order\`);`, + ) + await db.run( + sql`CREATE INDEX \`_home_pages_v_version_blocks_in_highlighted_content_parent_id_idx\` ON \`_home_pages_v_version_blocks_in_highlighted_content\` (\`_parent_id\`);`, + ) + await db.run(sql`CREATE TABLE \`posts_blocks_in_content\` ( + \`_order\` integer NOT NULL, + \`_parent_id\` integer NOT NULL, + \`id\` text PRIMARY KEY NOT NULL, + \`block_type\` text, + \`collection\` text, + \`doc_id\` numeric, + FOREIGN KEY (\`_parent_id\`) REFERENCES \`posts\`(\`id\`) ON UPDATE no action ON DELETE cascade + ); + `) + await db.run( + sql`CREATE INDEX \`posts_blocks_in_content_order_idx\` ON \`posts_blocks_in_content\` (\`_order\`);`, + ) + await db.run( + sql`CREATE INDEX \`posts_blocks_in_content_parent_id_idx\` ON \`posts_blocks_in_content\` (\`_parent_id\`);`, + ) + await db.run(sql`CREATE TABLE \`_posts_v_version_blocks_in_content\` ( + \`_order\` integer NOT NULL, + \`_parent_id\` integer NOT NULL, + \`id\` integer PRIMARY KEY NOT NULL, + \`block_type\` text, + \`collection\` text, + \`doc_id\` numeric, + \`_uuid\` text, + FOREIGN KEY (\`_parent_id\`) REFERENCES \`_posts_v\`(\`id\`) ON UPDATE no action ON DELETE cascade + ); + `) + await db.run( + sql`CREATE INDEX \`_posts_v_version_blocks_in_content_order_idx\` ON \`_posts_v_version_blocks_in_content\` (\`_order\`);`, + ) + await db.run( + sql`CREATE INDEX \`_posts_v_version_blocks_in_content_parent_id_idx\` ON \`_posts_v_version_blocks_in_content\` (\`_parent_id\`);`, + ) + await db.run(sql`CREATE TABLE \`events_blocks_in_content\` ( + \`_order\` integer NOT NULL, + \`_parent_id\` integer NOT NULL, + \`id\` text PRIMARY KEY NOT NULL, + \`block_type\` text, + \`collection\` text, + \`doc_id\` numeric, + FOREIGN KEY (\`_parent_id\`) REFERENCES \`events\`(\`id\`) ON UPDATE no action ON DELETE cascade + ); + `) + await db.run( + sql`CREATE INDEX \`events_blocks_in_content_order_idx\` ON \`events_blocks_in_content\` (\`_order\`);`, + ) + await db.run( + sql`CREATE INDEX \`events_blocks_in_content_parent_id_idx\` ON \`events_blocks_in_content\` (\`_parent_id\`);`, + ) + await db.run(sql`CREATE TABLE \`_events_v_version_blocks_in_content\` ( + \`_order\` integer NOT NULL, + \`_parent_id\` integer NOT NULL, + \`id\` integer PRIMARY KEY NOT NULL, + \`block_type\` text, + \`collection\` text, + \`doc_id\` numeric, + \`_uuid\` text, + FOREIGN KEY (\`_parent_id\`) REFERENCES \`_events_v\`(\`id\`) ON UPDATE no action ON DELETE cascade + ); + `) + await db.run( + sql`CREATE INDEX \`_events_v_version_blocks_in_content_order_idx\` ON \`_events_v_version_blocks_in_content\` (\`_order\`);`, + ) + await db.run( + sql`CREATE INDEX \`_events_v_version_blocks_in_content_parent_id_idx\` ON \`_events_v_version_blocks_in_content\` (\`_parent_id\`);`, + ) +} diff --git a/src/migrations/20260414_034842_remove_old_block_tracking_fields_explanation.md b/src/migrations/20260414_034842_remove_old_block_tracking_fields_explanation.md new file mode 100644 index 000000000..8bcee6cd4 --- /dev/null +++ b/src/migrations/20260414_034842_remove_old_block_tracking_fields_explanation.md @@ -0,0 +1,19 @@ +## Actual changes in JSON snapshots + +Drops 6 tables (3 tracking tables + their version tables): + +- `posts_blocks_in_content` / `_posts_v_version_blocks_in_content` +- `events_blocks_in_content` / `_events_v_version_blocks_in_content` +- `home_pages_blocks_in_highlighted_content` / `_home_pages_v_version_blocks_in_highlighted_content` + +## What caused these changes + +The old block-tracking system used per-collection array fields (`blocksInContent` on Posts/Events, `blocksInHighlightedContent` on HomePages) to track which blocks were embedded in Lexical rich text content. These fields were populated by `beforeChange` hooks (`populateBlocksInContent`, `populateBlocksInHighlightedContent`) that walked the Lexical AST at save time. + +This system has been fully replaced by the unified `documentReferences` JSON field and `populateDocumentReferences` hook, which automatically discovers all relationship, upload, and block references across any collection's fields using the Payload collection config. The unified system was introduced across commits `6b7ace80` through `6b2ee8d2` on the `unified-revalidation` branch. + +The old tracking fields, their population hooks, and their query utilities (`findDocumentsWithBlockReferences`, `findDocumentsWithRelationshipReferences`, `getBlocksFromConfig`, `getRelationshipsFromConfig`, `extractBlockReferencesFromLexical`, `revalidateBlockReferences`, `revalidateRelationshipReferences`) have all been removed. + +## Conclusion + +The data in these tables is safe to drop. It was only used for cache revalidation lookups (finding which documents reference a changed document). The same data is now stored in the `documentReferences` JSON field, which was backfilled in the prior migration (`20260414_030934_backfill_document_references`). No user-facing content is lost. diff --git a/src/migrations/index.ts b/src/migrations/index.ts index 59ddf3211..8687b2207 100644 --- a/src/migrations/index.ts +++ b/src/migrations/index.ts @@ -49,6 +49,7 @@ import * as migration_20260319_152951_add_text_wrap_to_image_text_block from './ import * as migration_20260403_204010 from './20260403_204010' import * as migration_20260414_030626_add_documentReferences_field from './20260414_030626_add_documentReferences_field' import * as migration_20260414_030934_backfill_document_references from './20260414_030934_backfill_document_references' +import * as migration_20260414_034842_remove_old_block_tracking_fields from './20260414_034842_remove_old_block_tracking_fields' export const migrations = [ { @@ -306,4 +307,9 @@ export const migrations = [ down: migration_20260414_030934_backfill_document_references.down, name: '20260414_030934_backfill_document_references', }, + { + up: migration_20260414_034842_remove_old_block_tracking_fields.up, + down: migration_20260414_034842_remove_old_block_tracking_fields.down, + name: '20260414_034842_remove_old_block_tracking_fields', + }, ] diff --git a/src/payload-types.ts b/src/payload-types.ts index 8491289b4..a1d76b846 100644 --- a/src/payload-types.ts +++ b/src/payload-types.ts @@ -297,17 +297,6 @@ export interface HomePage { | SponsorsBlock | TeamBlock )[]; - /** - * Automatically populated field tracking block references in highlightedContent for revalidation purposes. - */ - blocksInHighlightedContent?: - | { - blockType?: string | null; - collection?: string | null; - docId?: number | null; - id?: string | null; - }[] - | null; publishedAt?: string | null; documentReferences?: | { @@ -540,14 +529,6 @@ export interface Post { showDate?: boolean | null; tags?: (number | Tag)[] | null; relatedPosts?: (number | Post)[] | null; - blocksInContent?: - | { - blockType?: string | null; - collection?: string | null; - docId?: number | null; - id?: string | null; - }[] - | null; slug: string; documentReferences?: | { @@ -907,14 +888,6 @@ export interface Event { }; [k: string]: unknown; } | null; - blocksInContent?: - | { - blockType?: string | null; - collection?: string | null; - docId?: number | null; - id?: string | null; - }[] - | null; slug: string; type: 'event' | 'awareness' | 'field-class'; eventGroups?: (number | EventGroup)[] | null; @@ -2977,14 +2950,6 @@ export interface HomePagesSelect { sponsorsBlock?: T | SponsorsBlockSelect; team?: T | TeamBlockSelect; }; - blocksInHighlightedContent?: - | T - | { - blockType?: T; - collection?: T; - docId?: T; - id?: T; - }; publishedAt?: T; documentReferences?: | T @@ -3341,14 +3306,6 @@ export interface PostsSelect { showDate?: T; tags?: T; relatedPosts?: T; - blocksInContent?: - | T - | { - blockType?: T; - collection?: T; - docId?: T; - id?: T; - }; slug?: T; documentReferences?: | T @@ -3480,14 +3437,6 @@ export interface EventsSelect { registrationDeadline_tz?: T; skillLevel?: T; content?: T; - blocksInContent?: - | T - | { - blockType?: T; - collection?: T; - docId?: T; - id?: T; - }; slug?: T; type?: T; eventGroups?: T; diff --git a/src/utilities/extractBlockReferencesFromLexical.ts b/src/utilities/extractBlockReferencesFromLexical.ts deleted file mode 100644 index d4e958267..000000000 --- a/src/utilities/extractBlockReferencesFromLexical.ts +++ /dev/null @@ -1,87 +0,0 @@ -export interface BlockReference { - blockType: string - collection: string - docId: number -} - -interface LexicalNode { - type?: string - children?: LexicalNode[] - fields?: Record -} - -/** - * Extract ID from field value (handles both direct ID and populated object) - */ -function extractIdsFromFieldValue(fieldValue: unknown): number[] | null { - if (typeof fieldValue === 'number') { - return [fieldValue] - } - - if (typeof fieldValue === 'object' && fieldValue !== null && 'id' in fieldValue) { - const obj = fieldValue - if (typeof obj.id === 'number') { - return [obj.id] - } - } - - if (Array.isArray(fieldValue) && fieldValue.length > 0) { - return fieldValue - .flatMap((val) => extractIdsFromFieldValue(val)) - .filter((val): val is number => val !== null && typeof val === 'number') - } - - return null -} - -/** - * Walk Lexical AST nodes and extract block references based on provided mappings - */ -export function walkLexicalNodes( - nodes: LexicalNode[], - blockMappings: Record< - string, - Array<{ blockType: string; fieldName: string; isHasMany: boolean }> - >, -): BlockReference[] { - const references: BlockReference[] = [] - - function walkNodes(nodesToWalk: LexicalNode[]) { - for (const node of nodesToWalk) { - if (node.type === 'block' && node.fields) { - const blockType = node.fields.blockType - - if (typeof blockType === 'string') { - for (const [collection, mappings] of Object.entries(blockMappings)) { - const blockTypeMappings = mappings.filter( - ({ blockType: mappingBlockType }) => mappingBlockType === blockType, - ) - - for (const mapping of blockTypeMappings) { - const fieldValue = node.fields[mapping.fieldName] - const docIds = extractIdsFromFieldValue(fieldValue) - - if (docIds !== null) { - for (const docId of docIds) { - references.push({ - blockType, - collection, - docId, - }) - } - } - } - } - } - } - - // Recursively process children - if (node.children) { - walkNodes(node.children) - } - } - } - - walkNodes(nodes) - return references -} diff --git a/src/utilities/findDocumentsWithBlockReferences.ts b/src/utilities/findDocumentsWithBlockReferences.ts deleted file mode 100644 index cbbb6750f..000000000 --- a/src/utilities/findDocumentsWithBlockReferences.ts +++ /dev/null @@ -1,345 +0,0 @@ -import configPromise from '@payload-config' -import { getPayload } from 'payload' -import { getBlocksFromConfig } from './getBlocksFromConfig' -import { DocumentForRevalidation, RevalidationReference } from './revalidateDocument' - -function isRecord(value: unknown): value is Record { - return typeof value === 'object' && value !== null -} - -function hasId(value: unknown): value is { id: unknown } { - return typeof value === 'object' && value !== null && 'id' in value -} - -/** - * Recursively search for matching references in a block's data structure - */ -function hasMatchingReference( - obj: unknown, - fieldName: string, - referenceId: string | number, -): boolean { - if (!isRecord(obj)) return false - - if (fieldName in obj) { - const fieldValue = obj[fieldName] - - if (Array.isArray(fieldValue)) { - if (fieldValue.includes(referenceId)) { - return true - } - for (const item of fieldValue) { - if (hasId(item) && item.id === referenceId) { - return true - } - } - } - - if (hasId(fieldValue) && fieldValue.id === referenceId) { - return true - } - - if (fieldValue === referenceId) { - return true - } - } - - for (const value of Object.values(obj)) { - if (Array.isArray(value)) { - for (const item of value) { - if (hasMatchingReference(item, fieldName, referenceId)) { - return true - } - } - } else if (isRecord(value)) { - if (hasMatchingReference(value, fieldName, referenceId)) { - return true - } - } - } - - return false -} - -/** - * Find all pages, posts, and homePages that contain blocks referencing a specific document - * This is used for revalidation when reference collections (biographies, teams, media, forms) change - */ -export async function findDocumentsWithBlockReferences( - reference: RevalidationReference, -): Promise { - const payload = await getPayload({ config: configPromise }) - const results: DocumentForRevalidation[] = [] - - const { - pagesBlockMappings, - postsBlockMappings, - homePagesBlockMappings, - homePagesHighlightedContentBlockMappings, - eventsBlockMappings, - } = await getBlocksFromConfig() - - const pagesMappings = pagesBlockMappings[reference.collection] - - if (pagesMappings) { - for (const mapping of pagesMappings) { - try { - if (mapping.isHasMany) { - // We can't query nested arrays with the Payload Local API so we need to find all - // pages with this blockType and then filter the results using custom logic - const pagesRes = await payload.find({ - collection: 'pages', - where: { - and: [ - { - _status: { equals: 'published' }, - }, - { - 'layout.blockType': { equals: mapping.blockType }, - }, - ], - }, - depth: 1, - }) - - const pagesWithMatchingBlocks = pagesRes.docs.filter(({ layout }) => { - const matchingBlocks = layout.find((block) => { - if (block.blockType === mapping.blockType) { - return hasMatchingReference(block, mapping.fieldName, reference.id) - } - return false - }) - - return !!matchingBlocks - }) - - const pagesWithBlocks: DocumentForRevalidation[] = pagesWithMatchingBlocks.map((doc) => ({ - collection: 'pages', - id: doc.id, - slug: doc.slug, - tenant: doc.tenant, - })) - - results.push(...pagesWithBlocks) - } else { - const pagesWithBlocksRes = await payload.find({ - collection: 'pages', - where: { - and: [ - { - _status: { equals: 'published' }, - }, - { - [`layout.${mapping.fieldName}`]: { equals: reference.id }, - }, - ], - }, - depth: 1, - }) - - const pagesWithBlocks: DocumentForRevalidation[] = pagesWithBlocksRes.docs.map((doc) => ({ - collection: 'pages', - id: doc.id, - slug: doc.slug, - tenant: doc.tenant, - })) - - results.push(...pagesWithBlocks) - } - } catch (error) { - const cause = error instanceof Error && error.cause ? ` | Cause: ${error.cause}` : '' - payload.logger.warn( - `Error querying pages for ${reference.collection} reference ${reference.id} in field ${mapping.fieldName}: ${error}${cause}`, - ) - } - } - } - - const postsMappings = postsBlockMappings[reference.collection] - - if (postsMappings) { - try { - const postsWithBlocksRes = await payload.find({ - collection: 'posts', - where: { - and: [ - { - _status: { equals: 'published' }, - }, - { - 'blocksInContent.collection': { equals: reference.collection }, - }, - { - 'blocksInContent.docId': { equals: reference.id }, - }, - ], - }, - depth: 1, - }) - - const postsWithBlocks: DocumentForRevalidation[] = postsWithBlocksRes.docs.map((doc) => ({ - collection: 'posts', - id: doc.id, - slug: doc.slug, - tenant: doc.tenant, - })) - - results.push(...postsWithBlocks) - } catch (error) { - const cause = error instanceof Error && error.cause ? ` | Cause: ${error.cause}` : '' - payload.logger.warn( - `Error querying posts for ${reference.collection} reference ${reference.id}: ${error}${cause}`, - ) - } - } - - const homePagesMapping = homePagesBlockMappings[reference.collection] - - if (homePagesMapping) { - for (const mapping of homePagesMapping) { - try { - if (mapping.isHasMany) { - // We can't query nested arrays with the Payload Local API so we need to find all - // pages with this blockType and then filter the results using custom logic - const homePagesRes = await payload.find({ - collection: 'homePages', - where: { - and: [ - { - _status: { equals: 'published' }, - }, - { - 'layout.blockType': { equals: mapping.blockType }, - }, - ], - }, - depth: 1, - }) - - const pagesWithMatchingBlocks = homePagesRes.docs.filter(({ layout }) => { - const matchingBlocks = layout.find((block) => { - if (block.blockType === mapping.blockType) { - return hasMatchingReference(block, mapping.fieldName, reference.id) - } - return false - }) - - return !!matchingBlocks - }) - - const pagesWithBlocks: DocumentForRevalidation[] = pagesWithMatchingBlocks.map((doc) => ({ - collection: 'homePages', - id: doc.id, - slug: '', - tenant: doc.tenant, - })) - - results.push(...pagesWithBlocks) - } else { - const homePagesWithBlocksRes = await payload.find({ - collection: 'homePages', - where: { - [`layout.${mapping.fieldName}`]: { equals: reference.id }, - }, - depth: 1, - }) - - const homePagesWithBlocks: DocumentForRevalidation[] = homePagesWithBlocksRes.docs.map( - (doc) => ({ - collection: 'homePages', - id: doc.id, - slug: '', - tenant: doc.tenant, - }), - ) - - results.push(...homePagesWithBlocks) - } - } catch (error) { - const cause = error instanceof Error && error.cause ? ` | Cause: ${error.cause}` : '' - payload.logger.warn( - `Error querying homePages for ${reference.collection} reference ${reference.id}: ${error}${cause}`, - ) - } - } - } - - // Query homePages.blocksInHighlightedContent for references in highlightedContent richText fields - const homePagesHighlightedContentMappings = - homePagesHighlightedContentBlockMappings[reference.collection] - - if (homePagesHighlightedContentMappings) { - try { - const homePagesWithBlocksRes = await payload.find({ - collection: 'homePages', - where: { - and: [ - { - 'blocksInHighlightedContent.collection': { equals: reference.collection }, - }, - { - 'blocksInHighlightedContent.docId': { equals: reference.id }, - }, - ], - }, - depth: 1, - }) - - const homePagesWithBlocks: DocumentForRevalidation[] = homePagesWithBlocksRes.docs.map( - (doc) => ({ - collection: 'homePages', - id: doc.id, - slug: '', - tenant: doc.tenant, - }), - ) - - results.push(...homePagesWithBlocks) - } catch (error) { - const cause = error instanceof Error && error.cause ? ` | Cause: ${error.cause}` : '' - payload.logger.warn( - `Error querying homePages.blocksInHighlightedContent for ${reference.collection} reference ${reference.id}: ${error}${cause}`, - ) - } - } - - const eventsMappings = eventsBlockMappings[reference.collection] - - if (eventsMappings) { - try { - const eventsWithBlocksRes = await payload.find({ - collection: 'events', - where: { - and: [ - { - _status: { equals: 'published' }, - }, - { - 'blocksInContent.collection': { equals: reference.collection }, - }, - { - 'blocksInContent.docId': { equals: reference.id }, - }, - ], - }, - depth: 1, - }) - - const eventsWithBlocks: DocumentForRevalidation[] = eventsWithBlocksRes.docs.map((doc) => ({ - collection: 'events', - id: doc.id, - slug: doc.slug, - tenant: doc.tenant, - })) - - results.push(...eventsWithBlocks) - } catch (error) { - const cause = error instanceof Error && error.cause ? ` | Cause: ${error.cause}` : '' - payload.logger.warn( - `Error querying events for ${reference.collection} reference ${reference.id}: ${error}${cause}`, - ) - } - } - - return results -} diff --git a/src/utilities/findDocumentsWithReferences.ts b/src/utilities/findDocumentsWithReferences.ts new file mode 100644 index 000000000..aa510d042 --- /dev/null +++ b/src/utilities/findDocumentsWithReferences.ts @@ -0,0 +1,71 @@ +import configPromise from '@payload-config' +import type { CollectionSlug } from 'payload' +import { getPayload } from 'payload' +import { isTenantValue } from './isTenantValue' +import { DocumentForRevalidation } from './revalidateDocument' + +export interface ReferenceQuery { + collection: string + id: number +} + +// SanitizedCollectionConfig.slug is string but payload.find() requires CollectionSlug +function isCollectionSlug(slug: string, validSlugs: Set): slug is CollectionSlug { + return validSlugs.has(slug) +} + +/** Find all documents whose `documentReferences` field contains a reference to the given document. */ +export async function findDocumentsWithReferences( + reference: ReferenceQuery, +): Promise { + const payload = await getPayload({ config: configPromise }) + const results: DocumentForRevalidation[] = [] + + const allSlugs = new Set(payload.config.collections.map((c) => c.slug)) + + const collectionsWithReferences = payload.config.collections + .filter((c) => c.fields.some((f) => 'name' in f && f.name === 'documentReferences')) + .map((c) => c.slug) + + for (const collectionSlug of collectionsWithReferences) { + if (!isCollectionSlug(collectionSlug, allSlugs)) continue + + try { + const res = await payload.find({ + collection: collectionSlug, + where: { + and: [ + { _status: { equals: 'published' } }, + { 'documentReferences.collection': { equals: reference.collection } }, + { 'documentReferences.docId': { equals: reference.id } }, + ], + }, + select: { id: true, slug: true, tenant: true }, + depth: 1, + limit: 0, + }) + + for (const doc of res.docs) { + // Payload's generated types don't have index signatures + const record: Record = { ...doc } + + const tenant = record['tenant'] + if (!isTenantValue(tenant)) continue + + results.push({ + collection: collectionSlug, + id: doc.id, + slug: typeof record['slug'] === 'string' ? record['slug'] : '', + tenant, + }) + } + } catch (error) { + const message = error instanceof Error ? error.message : String(error) + payload.logger.warn( + `Error querying ${collectionSlug} for ${reference.collection} reference ${reference.id}: ${message}`, + ) + } + } + + return results +} diff --git a/src/utilities/findDocumentsWithRelationshipReferences.ts b/src/utilities/findDocumentsWithRelationshipReferences.ts deleted file mode 100644 index 580e6b050..000000000 --- a/src/utilities/findDocumentsWithRelationshipReferences.ts +++ /dev/null @@ -1,168 +0,0 @@ -import configPromise from '@payload-config' -import { getPayload } from 'payload' -import { getRelationshipsFromConfig } from './getRelationshipsFromConfig' -import { DocumentForRevalidation, RevalidationReference } from './revalidateDocument' - -/** - * Find all pages, posts, and homePages that contain relationship fields referencing a specific document - * This is used for revalidation when reference collections change - */ -export async function findDocumentsWithRelationshipReferences( - reference: RevalidationReference, -): Promise { - const payload = await getPayload({ config: configPromise }) - const results: DocumentForRevalidation[] = [] - - const { - pagesRelationshipMappings, - postsRelationshipMappings, - homePagesRelationshipMappings, - eventsRelationshipMappings, - } = await getRelationshipsFromConfig() - - const pagesMappings = pagesRelationshipMappings[reference.collection] - - if (pagesMappings) { - for (const mapping of pagesMappings) { - try { - const pagesWithRelationsRes = await payload.find({ - collection: 'pages', - where: { - and: [ - { - _status: { equals: 'published' }, - }, - { - [mapping.fieldPath]: { equals: reference.id }, - }, - ], - }, - depth: 1, - }) - - const pagesWithRelations: DocumentForRevalidation[] = pagesWithRelationsRes.docs.map( - (doc) => ({ - collection: 'pages', - id: doc.id, - slug: doc.slug, - tenant: doc.tenant, - }), - ) - - results.push(...pagesWithRelations) - } catch (error) { - payload.logger.warn( - `Error querying pages for ${reference.collection} reference ${reference.id} at ${mapping.fieldPath}: ${error}`, - ) - } - } - } - - const postsMappings = postsRelationshipMappings[reference.collection] - - if (postsMappings) { - for (const mapping of postsMappings) { - try { - const postsWithRelationsRes = await payload.find({ - collection: 'posts', - where: { - and: [ - { - _status: { equals: 'published' }, - }, - { - [mapping.fieldPath]: { equals: reference.id }, - }, - ], - }, - depth: 1, - }) - - const postsWithRelations: DocumentForRevalidation[] = postsWithRelationsRes.docs.map( - (doc) => ({ - collection: 'posts', - id: doc.id, - slug: doc.slug, - tenant: doc.tenant, - }), - ) - - results.push(...postsWithRelations) - } catch (error) { - payload.logger.warn( - `Error querying posts for ${reference.collection} reference ${reference.id} at ${mapping.fieldPath}: ${error}`, - ) - } - } - } - - const homePagesMappings = homePagesRelationshipMappings[reference.collection] - - if (homePagesMappings) { - for (const mapping of homePagesMappings) { - try { - const homePagesWithRelationsRes = await payload.find({ - collection: 'homePages', - where: { - [mapping.fieldPath]: { equals: reference.id }, - }, - depth: 1, - }) - - const homePagesWithRelations: DocumentForRevalidation[] = - homePagesWithRelationsRes.docs.map((doc) => ({ - collection: 'homePages', - id: doc.id, - slug: '', - tenant: doc.tenant, - })) - - results.push(...homePagesWithRelations) - } catch (error) { - payload.logger.warn( - `Error querying homePages for ${reference.collection} reference ${reference.id} at ${mapping.fieldPath}: ${error}`, - ) - } - } - } - - const eventsMappings = eventsRelationshipMappings[reference.collection] - - if (eventsMappings) { - for (const mapping of eventsMappings) { - try { - const eventsWithRelationsRes = await payload.find({ - collection: 'events', - where: { - and: [ - { - _status: { equals: 'published' }, - }, - { - [mapping.fieldPath]: { equals: reference.id }, - }, - ], - }, - depth: 1, - }) - - const eventsWithRelations: DocumentForRevalidation[] = eventsWithRelationsRes.docs.map( - (doc) => ({ - collection: 'events', - id: doc.id, - slug: doc.slug, - tenant: doc.tenant, - }), - ) - - results.push(...eventsWithRelations) - } catch (error) { - payload.logger.warn( - `Error querying events for ${reference.collection} reference ${reference.id} at ${mapping.fieldPath}: ${error}`, - ) - } - } - } - - return results -} diff --git a/src/utilities/getBlocksFromConfig.ts b/src/utilities/getBlocksFromConfig.ts deleted file mode 100644 index 3abcc3f02..000000000 --- a/src/utilities/getBlocksFromConfig.ts +++ /dev/null @@ -1,186 +0,0 @@ -import configPromise from '@payload-config' -import type { Block, Field } from 'payload' - -/** - * Dynamically extract block configurations from Payload collections - */ -export async function getBlocksFromConfig() { - const config = await configPromise - - // Find blocks used in Pages collection - const pagesCollection = config.collections?.find((collection) => collection.slug === 'pages') - const pagesBlocks = extractBlocksFromFields(pagesCollection?.fields || []) - const pagesBlockMappings = extractBlockMappings(pagesBlocks) - - // Find blocks used in Posts collection (in richText lexical editor) - const postsCollection = config.collections?.find((collection) => collection.slug === 'posts') - const postsBlocks = extractBlocksFromRichTextBlocksFeature(postsCollection?.fields || []) - const postsBlockMappings = extractBlockMappings(postsBlocks) - - // Find blocks used in HomePages collection - const homePagesCollection = config.collections?.find( - (collection) => collection.slug === 'homePages', - ) - const homePagesBlocks = extractBlocksFromFields(homePagesCollection?.fields || []) - const homePagesBlockMappings = extractBlockMappings(homePagesBlocks) - - // Find blocks used in HomePages highlightedContent richText fields - const homePagesHighlightedContentBlocks = extractBlocksFromRichTextBlocksFeature( - homePagesCollection?.fields || [], - ) - const homePagesHighlightedContentBlockMappings = extractBlockMappings( - homePagesHighlightedContentBlocks, - ) - - // Find blocks used in Events collection (in richText lexical editor) - const eventsCollection = config.collections?.find((collection) => collection.slug === 'events') - const eventsBlocks = extractBlocksFromRichTextBlocksFeature(eventsCollection?.fields || []) - const eventsBlockMappings = extractBlockMappings(eventsBlocks) - - return { - pagesBlocks, - pagesBlockMappings, - postsBlocks, - postsBlockMappings, - homePagesBlocks, - homePagesBlockMappings, - homePagesHighlightedContentBlocks, - homePagesHighlightedContentBlockMappings, - eventsBlocks, - eventsBlockMappings, - } -} - -/** - * Extract blocks from field configurations (for Pages-style blocks fields) - */ -function extractBlocksFromFields(fields: Field[]): Block[] { - const blocks: Block[] = [] - - function searchFields(fieldArray: Field[]) { - for (const field of fieldArray) { - if (field.type === 'blocks' && field.blocks) { - blocks.push(...field.blocks) - } - - // Recursively search nested fields (tabs, groups, arrays) - if ((field.type === 'array' || field.type === 'group') && field.fields) { - searchFields(field.fields) - } - if (field.type === 'tabs' && field.tabs) { - for (const tab of field.tabs) { - if (tab.fields) { - searchFields(tab.fields) - } - } - } - } - } - - searchFields(fields) - return blocks -} - -/** - * Extract blocks from lexical editor features (for Posts-style rich text blocks) - */ -function extractBlocksFromRichTextBlocksFeature(fields: Field[]): Block[] { - const blocks: Block[] = [] - - function searchForRichTextBlocks(fieldArray: Field[]) { - for (const field of fieldArray) { - if (field.type === 'richText' && field.editor) { - if ('features' in field.editor && Array.isArray(field.editor.features)) { - for (const feature of field.editor.features) { - if (feature.key === 'blocks' && feature.serverFeatureProps?.blocks) { - blocks.push(...feature.serverFeatureProps.blocks) - } - } - } - } - - // Recursively search nested fields (tabs, groups, arrays) - if ((field.type === 'array' || field.type === 'group') && field.fields) { - searchForRichTextBlocks(field.fields) - } - if (field.type === 'tabs' && field.tabs) { - for (const tab of field.tabs) { - if (tab.fields) { - searchForRichTextBlocks(tab.fields) - } - } - } - } - } - - searchForRichTextBlocks(fields) - return blocks -} - -type BlockMapping = Record< - string, - Array<{ blockType: string; fieldName: string; isHasMany: boolean }> -> - -/** - * Extract block mappings for reference collections by analyzing block configs - */ -function extractBlockMappings(blocks: Block[]) { - const mappings: BlockMapping = {} - - for (const block of blocks) { - const relationshipFields = extractRelationshipFields(block.fields || []) - - for (const field of relationshipFields) { - if (typeof field.relationTo === 'string') { - if (!mappings[field.relationTo]) { - mappings[field.relationTo] = [] - } - - if ( - !mappings[field.relationTo].find( - ({ blockType, fieldName }) => blockType === block.slug && fieldName === field.name, - ) - ) { - mappings[field.relationTo].push({ - blockType: block.slug, - fieldName: field.name, - isHasMany: field.hasMany ?? false, - }) - } - } - } - } - - return mappings -} - -/** - * Extract relationship fields from a field array - */ -function extractRelationshipFields(fields: Field[]) { - const relationshipFields: Extract[] = [] - - function searchFields(fieldArray: Field[]) { - for (const field of fieldArray) { - if (field.type === 'relationship' || field.type === 'upload') { - relationshipFields.push(field) - } - - // Recursively search nested fields (tabs, groups, arrays) - if ((field.type === 'array' || field.type === 'group') && field.fields) { - searchFields(field.fields) - } - if (field.type === 'tabs' && field.tabs) { - for (const tab of field.tabs) { - if (tab.fields) { - searchFields(tab.fields) - } - } - } - } - } - - searchFields(fields) - return relationshipFields -} diff --git a/src/utilities/getRelationshipsFromConfig.ts b/src/utilities/getRelationshipsFromConfig.ts deleted file mode 100644 index ee24ef714..000000000 --- a/src/utilities/getRelationshipsFromConfig.ts +++ /dev/null @@ -1,92 +0,0 @@ -import configPromise from '@payload-config' -import type { Field } from 'payload' - -type RelationshipMapping = Record - -/** - * Dynamically extract relationship field configurations from Payload collections - */ -export async function getRelationshipsFromConfig() { - const config = await configPromise - - // Find relationship fields used in Pages collection - const pagesCollection = config.collections?.find((collection) => collection.slug === 'pages') - const pagesRelationshipMappings = extractRelationshipMappings(pagesCollection?.fields || []) - - // Find relationship fields used in Posts collection - const postsCollection = config.collections?.find((collection) => collection.slug === 'posts') - const postsRelationshipMappings = extractRelationshipMappings(postsCollection?.fields || []) - - // Find relationship fields used in HomePages collection - const homePagesCollection = config.collections?.find( - (collection) => collection.slug === 'homePages', - ) - const homePagesRelationshipMappings = extractRelationshipMappings( - homePagesCollection?.fields || [], - ) - - // Find relationship fields used in Events collection - const eventsCollection = config.collections?.find((collection) => collection.slug === 'events') - const eventsRelationshipMappings = extractRelationshipMappings(eventsCollection?.fields || []) - - return { - pagesRelationshipMappings, - postsRelationshipMappings, - homePagesRelationshipMappings, - eventsRelationshipMappings, - } -} - -/** - * Extract relationship mappings for reference collections by analyzing field configs - */ -function extractRelationshipMappings(fields: Field[], basePath: string = ''): RelationshipMapping { - const mappings: RelationshipMapping = {} - - function searchFields(fieldArray: Field[], currentPath: string) { - for (const field of fieldArray) { - // Calculate fieldPath only for fields that have names - const fieldPath = - 'name' in field && field.name - ? currentPath !== '' - ? `${currentPath}.${field.name}` - : field.name - : currentPath - - if (field.type === 'relationship' || field.type === 'upload') { - const relationTo = - typeof field.relationTo === 'string' ? field.relationTo : field.relationTo?.[0] - if (relationTo && relationTo !== 'tenants') { - if (!mappings[relationTo]) { - mappings[relationTo] = [] - } - mappings[relationTo].push({ - fieldPath, - }) - } - } - - // Recursively search nested fields (tabs, groups, arrays) - if ((field.type === 'array' || field.type === 'group') && field.fields) { - searchFields(field.fields, fieldPath) - } - if (field.type === 'tabs' && field.tabs) { - for (const tab of field.tabs) { - if (tab.fields) { - searchFields( - tab.fields, - 'name' in tab - ? currentPath !== '' - ? `${currentPath}.${tab.name}` - : tab.name - : currentPath, - ) - } - } - } - } - } - - searchFields(fields, basePath) - return mappings -} diff --git a/src/utilities/revalidateBlockReferences.ts b/src/utilities/revalidateBlockReferences.ts deleted file mode 100644 index 547c095af..000000000 --- a/src/utilities/revalidateBlockReferences.ts +++ /dev/null @@ -1,30 +0,0 @@ -import configPromise from '@payload-config' -import { getPayload } from 'payload' -import { findDocumentsWithBlockReferences } from './findDocumentsWithBlockReferences' -import { revalidateDocument, RevalidationReference } from './revalidateDocument' - -/** - * Revalidate all pages and posts that reference a specific document through blocks - */ -export async function revalidateBlockReferences(reference: RevalidationReference): Promise { - const payload = await getPayload({ config: configPromise }) - payload.logger.info(`Starting revalidation for ${reference.collection} ID ${reference.id}`) - - try { - const documentsToRevalidate = await findDocumentsWithBlockReferences(reference) - - payload.logger.info( - `Found ${documentsToRevalidate.length} documents with block references to ${reference.collection} ID ${reference.id}`, - ) - - for (const doc of documentsToRevalidate) { - await revalidateDocument(doc) - } - - payload.logger.info(`Completed revalidation for ${reference.collection} ID ${reference.id}`) - } catch (error) { - payload.logger.error( - `Error during revalidation for ${reference.collection} ID ${reference.id}: ${error}`, - ) - } -} diff --git a/src/utilities/revalidateDocument.ts b/src/utilities/revalidateDocument.ts index 063826aeb..465d3c195 100644 --- a/src/utilities/revalidateDocument.ts +++ b/src/utilities/revalidateDocument.ts @@ -3,45 +3,41 @@ import configPromise from '@payload-config' import { revalidatePath } from 'next/cache' import { getPayload } from 'payload' +import type { Tenant } from '@/payload-types' +import { resolveTenant } from './tenancy/resolveTenant' + export interface RevalidationReference { collection: | 'biographies' | 'documents' - | 'teams' - | 'media' + | 'events' | 'forms' - | 'tags' - | 'posts' | 'homePages' + | 'media' + | 'pages' + | 'posts' | 'sponsors' - | 'events' + | 'tags' + | 'teams' id: number } export interface DocumentForRevalidation { - collection: 'pages' | 'posts' | 'homePages' | 'events' + collection: string id: number slug: string - tenant: number | { id: number; slug: string } + tenant: number | Tenant } export async function revalidateDocument(doc: DocumentForRevalidation): Promise { const payload = await getPayload({ config: configPromise }) - let tenant = doc.tenant - if (typeof tenant === 'number') { - try { - tenant = await payload.findByID({ - collection: 'tenants', - id: tenant, - depth: 0, - }) - } catch (error) { - payload.logger.warn( - `Failed to resolve tenant ${tenant} for ${doc.collection} ${doc.id}: ${error}`, - ) - return - } + let tenant: Tenant + try { + tenant = await resolveTenant(doc.tenant) + } catch (error) { + payload.logger.warn(`Failed to resolve tenant for ${doc.collection} ${doc.id}: ${error}`) + return } if (doc.collection === 'pages') { @@ -68,6 +64,7 @@ export async function revalidateDocument(doc: DocumentForRevalidation): Promise< basePaths.forEach((path) => revalidatePath(path)) } + return } if (doc.collection === 'posts') { @@ -78,6 +75,7 @@ export async function revalidateDocument(doc: DocumentForRevalidation): Promise< ) basePaths.forEach((path) => revalidatePath(path)) + return } if (doc.collection === 'homePages') { @@ -88,6 +86,7 @@ export async function revalidateDocument(doc: DocumentForRevalidation): Promise< ) basePaths.forEach((path) => revalidatePath(path)) + return } if (doc.collection === 'events') { @@ -98,5 +97,10 @@ export async function revalidateDocument(doc: DocumentForRevalidation): Promise< ) basePaths.forEach((path) => revalidatePath(path)) + return } + + payload.logger.warn( + `revalidateDocument: no path mapping for collection '${doc.collection}' (doc ID ${doc.id}). Add a handler or check if documentReferencesField() should be removed from this collection.`, + ) } diff --git a/src/utilities/revalidateDocumentReferences.ts b/src/utilities/revalidateDocumentReferences.ts new file mode 100644 index 000000000..2fab86774 --- /dev/null +++ b/src/utilities/revalidateDocumentReferences.ts @@ -0,0 +1,34 @@ +import configPromise from '@payload-config' +import { getPayload } from 'payload' +import { findDocumentsWithReferences } from './findDocumentsWithReferences' +import { revalidateDocument, RevalidationReference } from './revalidateDocument' + +/** Revalidate all routable documents that reference a specific document. */ +export async function revalidateDocumentReferences( + reference: RevalidationReference, +): Promise { + const payload = await getPayload({ config: configPromise }) + payload.logger.info( + `Starting document reference revalidation for ${reference.collection} ID ${reference.id}`, + ) + + try { + const documentsToRevalidate = await findDocumentsWithReferences(reference) + + payload.logger.info( + `Found ${documentsToRevalidate.length} documents referencing ${reference.collection} ID ${reference.id}`, + ) + + for (const doc of documentsToRevalidate) { + await revalidateDocument(doc) + } + + payload.logger.info( + `Completed document reference revalidation for ${reference.collection} ID ${reference.id}`, + ) + } catch (error) { + payload.logger.error( + `Error during document reference revalidation for ${reference.collection} ID ${reference.id}: ${error}`, + ) + } +} diff --git a/src/utilities/revalidateRelationshipReferences.ts b/src/utilities/revalidateRelationshipReferences.ts deleted file mode 100644 index b789d853a..000000000 --- a/src/utilities/revalidateRelationshipReferences.ts +++ /dev/null @@ -1,36 +0,0 @@ -import configPromise from '@payload-config' -import { getPayload } from 'payload' -import { findDocumentsWithRelationshipReferences } from './findDocumentsWithRelationshipReferences' -import { revalidateDocument, RevalidationReference } from './revalidateDocument' - -/** - * Revalidate all pages and posts that reference a specific document through relationship fields - */ -export async function revalidateRelationshipReferences( - reference: RevalidationReference, -): Promise { - const payload = await getPayload({ config: configPromise }) - payload.logger.info( - `Starting relationship revalidation for ${reference.collection} ID ${reference.id}`, - ) - - try { - const documentsToRevalidate = await findDocumentsWithRelationshipReferences(reference) - - payload.logger.info( - `Found ${documentsToRevalidate.length} documents with relationship references to ${reference.collection} ID ${reference.id}`, - ) - - for (const doc of documentsToRevalidate) { - await revalidateDocument(doc) - } - - payload.logger.info( - `Completed relationship revalidation for ${reference.collection} ID ${reference.id}`, - ) - } catch (error) { - payload.logger.error( - `Error during relationship revalidation for ${reference.collection} ID ${reference.id}: ${error}`, - ) - } -}