{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://gmr.github.io/pglifecycle/schemata/table.json",
  "title": "Table",
  "description": "Defines a table",
  "type": "object",
  "properties": {
    "name": {
      "title": "Name",
      "description": "The table name",
      "type": "string"
    },
    "schema": {
      "title": "Schema",
      "description": "The schema to create the table in",
      "type": "string"
    },
    "owner": {
      "title": "Owner",
      "description": "The role name that owns the table",
      "type": "string"
    },
    "sql": {
      "title": "SQL Statement",
      "description": "User-provided raw SQL snippet",
      "type": "string"
    },
    "unlogged": {
      "title": "Unlogged",
      "description": "If specified, the table is created as an unlogged table. Data written to unlogged tables is not written to the write-ahead log, which makes them considerably faster than ordinary tables. However, they are not crash-safe: an unlogged table is automatically truncated after a crash or unclean shutdown.\n",
      "type": "boolean"
    },
    "from_type": {
      "title": "From Type (OF)",
      "description": "Creates a typed table, which takes its structure from the specified composite type (name optionally schema-qualified).\n",
      "type": "string"
    },
    "parents": {
      "title": "Parent Tables (INHERITS)",
      "description": "A list of tables from which the new table automatically inherits all columns. Parent tables can be plain tables or foreign tables.\n",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "like_table": {
      "title": "Like Table",
      "description": "Specifies a table from which the new table automatically copies all column names, their data types, and their not-null constraints.\n",
      "type": "object",
      "properties": {
        "name": {
          "title": "Table Name",
          "description": "The table to copy",
          "type": "string"
        },
        "include_comments": {
          "title": "Include comments when creating the new table.",
          "type": "boolean"
        },
        "include_constraints": {
          "title": "Include constraints",
          "type": "boolean"
        },
        "include_defaults": {
          "title": "Include defaults",
          "type": "boolean"
        },
        "include_generated": {
          "title": "Include generated expressions",
          "type": "boolean"
        },
        "include_identity": {
          "title": "Include identity specifications",
          "type": "boolean"
        },
        "include_indexes": {
          "title": "Include indexes",
          "type": "boolean"
        },
        "include_statistics": {
          "title": "Include extended statistics",
          "type": "boolean"
        },
        "include_storage": {
          "title": "Include storage settings",
          "type": "boolean"
        },
        "include_all": {
          "title": "Include all",
          "description": "Include all options (comments, constraints, defaults, generated, identity, indexes, statistics, and storage).\n",
          "type": "boolean"
        }
      },
      "required": [
        "name"
      ],
      "additionalProperties": false,
      "oneOf": [
        {
          "required": [
            "include_comments"
          ],
          "not": {
            "required": [
              "include_all"
            ]
          }
        },
        {
          "required": [
            "include_constraints"
          ],
          "not": {
            "required": [
              "include_all"
            ]
          }
        },
        {
          "required": [
            "include_defaults"
          ],
          "not": {
            "required": [
              "include_all"
            ]
          }
        },
        {
          "required": [
            "include_generated"
          ],
          "not": {
            "required": [
              "include_all"
            ]
          }
        },
        {
          "required": [
            "include_identity"
          ],
          "not": {
            "required": [
              "include_all"
            ]
          }
        },
        {
          "required": [
            "include_indexes"
          ],
          "not": {
            "required": [
              "include_all"
            ]
          }
        },
        {
          "required": [
            "include_statistics"
          ],
          "not": {
            "required": [
              "include_all"
            ]
          }
        },
        {
          "required": [
            "include_storage"
          ],
          "not": {
            "required": [
              "include_all"
            ]
          }
        },
        {
          "required": [
            "include_all"
          ],
          "not": {
            "required": [
              "include_comments",
              "include_constraints",
              "include_defaults",
              "include_generated",
              "include_identity",
              "include_indexes",
              "include_statistics",
              "include_storage"
            ]
          }
        }
      ]
    },
    "columns": {
      "title": "Columns",
      "description": "Defines the columns in the table",
      "type": "array",
      "items": {
        "title": "Column",
        "description": "Defines a column in a table",
        "type": "object",
        "properties": {
          "name": {
            "title": "Name",
            "description": "The column name",
            "type": "string"
          },
          "data_type": {
            "title": "Data Type",
            "description": "The column data type",
            "type": "string"
          },
          "nullable": {
            "title": "Nullable",
            "description": "Column is NULLABLE when True. Defaults to True.",
            "type": "boolean",
            "default": true
          },
          "not_null_constraint": {
            "title": "NOT NULL Constraint",
            "description": "The parts of the column's NOT NULL constraint that `nullable` cannot express (PostgreSQL 18 and later, where NOT NULL is a named constraint). Present only when the name is not the one PostgreSQL generates, `<table>_<column>_not_null`, or when the constraint is NO INHERIT. `nullable` stays authoritative for whether the constraint exists at all.\n",
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "no_inherit": {
                "title": "NO INHERIT",
                "description": "Whether the constraint is not inherited by this table's descendants.\n",
                "type": "boolean"
              }
            },
            "additionalProperties": false
          },
          "default": {
            "title": "Default Value",
            "description": "Default value for the column.",
            "oneOf": [
              {
                "type": "boolean"
              },
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "string"
              }
            ]
          },
          "collation": {
            "title": "Column Collation",
            "description": "Assigns a collation to the column (which must be of a collatable data type). If not specified, the column data type's default collation is used.\n",
            "type": "string"
          },
          "check_constraint": {
            "title": "Check Constraint",
            "description": "Specifies an expression producing a Boolean result which new or updated rows must satisfy for an insert or update operation to succeed.\n",
            "type": "string"
          },
          "generated": {
            "title": "Generated Column",
            "description": "Options for specifying a generated column",
            "type": "object",
            "properties": {
              "expression": {
                "title": "Expression",
                "description": "The expression used to generate the column. Mutually exclusive with the sequence column.\n",
                "type": "string"
              },
              "kind": {
                "title": "Generated Column Kind",
                "description": "Whether the expression is materialized on write (stored) or evaluated on read (virtual). PostgreSQL 18 makes virtual the default and pg_dump omits the keyword for a virtual column, so the kind is recorded rather than assumed. An absent value means stored, which is what project files written before this attribute existed have always built.\n",
                "enum": [
                  "stored",
                  "virtual"
                ]
              },
              "sequence": {
                "title": "Sequence Name",
                "description": "Specifies that the generated column value is provided by a sequence. Mutually exclusive with the expression attribute.\n"
              },
              "sequence_behavior": {
                "title": "Sequence Behavior",
                "description": "The clauses ALWAYS and BY DEFAULT determine how the sequence value is given precedence over a user-specified value in an INSERT statement. If ALWAYS is specified, a user-specified value is only accepted if the INSERT statement specifies OVERRIDING SYSTEM VALUE. If BY DEFAULT is specified, then the user-specified value takes precedence.\n",
                "enum": [
                  "ALWAYS",
                  "BY DEFAULT"
                ]
              },
              "sequence_options": {
                "title": "Identity Sequence Options",
                "description": "The options of an identity column's own sequence. Each is omitted when it holds PostgreSQL's default, so an identity that states none is an ordinary one starting at 1. Distinct from sequence, which names a sequence managed as its own object and is not rendered.\n",
                "type": "object",
                "properties": {
                  "name": {
                    "title": "Sequence Name",
                    "description": "The sequence's schema-qualified name, present only when it is not the <table>_<column>_seq PostgreSQL generates.\n",
                    "type": "string"
                  },
                  "start_with": {
                    "title": "Start With",
                    "type": "integer"
                  },
                  "increment_by": {
                    "title": "Increment By",
                    "type": "integer"
                  },
                  "min_value": {
                    "title": "Minimum Value",
                    "type": "integer"
                  },
                  "max_value": {
                    "title": "Maximum Value",
                    "type": "integer"
                  },
                  "cache": {
                    "title": "Cache",
                    "type": "integer"
                  },
                  "cycle": {
                    "title": "Cycle",
                    "description": "Wrap around at the limit instead of raising an error.",
                    "type": "boolean"
                  }
                },
                "additionalProperties": false
              }
            },
            "oneOf": [
              {
                "required": [
                  "expression"
                ],
                "not": {
                  "anyOf": [
                    {
                      "required": [
                        "sequence"
                      ]
                    },
                    {
                      "required": [
                        "sequence_behavior"
                      ]
                    },
                    {
                      "required": [
                        "sequence_options"
                      ]
                    }
                  ]
                }
              },
              {
                "anyOf": [
                  {
                    "required": [
                      "sequence"
                    ]
                  },
                  {
                    "required": [
                      "sequence_behavior"
                    ]
                  }
                ],
                "not": {
                  "anyOf": [
                    {
                      "required": [
                        "expression"
                      ]
                    },
                    {
                      "required": [
                        "kind"
                      ]
                    }
                  ]
                }
              }
            ],
            "additionalProperties": false
          },
          "storage": {
            "title": "Storage",
            "description": "How the column's values are stored (SET STORAGE), when it differs from the type's default\n",
            "enum": [
              "PLAIN",
              "EXTERNAL",
              "EXTENDED",
              "MAIN",
              "DEFAULT"
            ]
          },
          "compression": {
            "title": "Compression",
            "description": "The compression method for the column's values (SET COMPRESSION)",
            "type": "string"
          },
          "statistics": {
            "title": "Statistics Target",
            "description": "The column's statistics target (SET STATISTICS)",
            "type": "integer"
          },
          "options": {
            "title": "Attribute Options",
            "description": "Per-column options such as n_distinct (ALTER COLUMN ... SET (...))\n",
            "type": "object"
          },
          "comment": {
            "title": "Comment",
            "description": "An optional comment about the column",
            "type": "string"
          }
        },
        "required": [
          "name",
          "data_type"
        ],
        "additionalProperties": false
      }
    },
    "column_defaults": {
      "title": "Column Defaults",
      "description": "Defaults on columns the table does not declare itself. An inheritance child inherits its parent's columns, so it has no column entry to carry a default; pg_dump writes those as a separate `ALTER TABLE ONLY <child> ALTER COLUMN <column> SET DEFAULT ...`.\nA default on a column the table does declare belongs on the column instead.\n",
      "type": "array",
      "items": {
        "title": "Column Default",
        "type": "object",
        "properties": {
          "column": {
            "title": "Column Name",
            "type": "string"
          },
          "default": {
            "title": "Default Value",
            "oneOf": [
              {
                "type": "boolean"
              },
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "string"
              }
            ]
          }
        },
        "required": [
          "column",
          "default"
        ],
        "additionalProperties": false
      }
    },
    "primary_key": {
      "title": "Primary Key",
      "description": "The PRIMARY KEY constraint specifies that a column or columns of a table can contain only unique (non-duplicate), non-null values. Only one primary key can be specified for a table.\nFor primary keys without included columns, this value can be a list of column names. Otherwise it's an object with a columns and an include attribute.\n",
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        {
          "type": "object",
          "properties": {
            "name": {
              "title": "Name",
              "description": "The constraint name, kept only when it is not the one PostgreSQL generates.\n",
              "type": "string"
            },
            "columns": {
              "title": "Columns",
              "description": "The list of columns that provide the uniqueness",
              "type": "array",
              "minItems": 1
            },
            "include": {
              "title": "Include Columns",
              "description": "Use to provide a list of non-key columns to provide in the primary key index.\n",
              "type": "array",
              "items": {
                "title": "Column Name",
                "type": "string"
              }
            },
            "without_overlaps": {
              "title": "Without Overlaps",
              "description": "Makes the constraint temporal (PostgreSQL 18+). WITHOUT OVERLAPS applies to the last column, which must be a range or multirange: rows may share the other column values as long as their ranges do not overlap.\n",
              "type": "boolean"
            }
          },
          "required": [
            "columns"
          ],
          "additionalProperties": false
        }
      ]
    },
    "indexes": {
      "title": "Indexes",
      "description": "An array of indexes on the table",
      "type": "array",
      "items": {
        "title": "Index",
        "description": "Defines an index on a table",
        "type": "object",
        "properties": {
          "name": {
            "title": "Name",
            "description": "The index name",
            "type": "string"
          },
          "sql": {
            "title": "SQL Statement",
            "description": "User-provided raw SQL snippet",
            "type": "string"
          },
          "unique": {
            "title": "Unique",
            "description": "Specifies that the index is a unique index",
            "type": "boolean",
            "default": false
          },
          "recurse": {
            "title": "Recurse to Partitions",
            "description": "Used to specify that the index should be created on partitions of the table.\n",
            "type": "boolean"
          },
          "method": {
            "title": "Index Method",
            "description": "The name of the index method to be used",
            "enum": [
              "brin",
              "btree",
              "gin",
              "gist",
              "hash",
              "spgist"
            ],
            "default": "btree"
          },
          "columns": {
            "title": "Columns",
            "description": "Defines the columns that are indexed",
            "type": "array",
            "items": {
              "title": "Column",
              "type": "object",
              "properties": {
                "name": {
                  "title": "Column Name",
                  "description": "Specify either the column name, mutally exclusive from expression.",
                  "type": "string"
                },
                "expression": {
                  "title": "Expression",
                  "type": "string",
                  "description": "Specify an expression for the column, mutally exclusive from name."
                },
                "collation": {
                  "title": "Column Collation",
                  "description": "Assigns a collation to the column (which must be of a collatable data type). If not specified, the column data type's default collation is used.\n",
                  "type": "string"
                },
                "opclass": {
                  "title": "Operator Class",
                  "description": "The name of an operator class",
                  "type": "string"
                },
                "direction": {
                  "title": "Sort Direction",
                  "description": "Specifies the sort direction in the index for the column",
                  "enum": [
                    "ASC",
                    "DESC"
                  ],
                  "default": "ASC"
                },
                "null_placement": {
                  "title": "NULL value placement",
                  "description": "Specifies the placement of null values in the index.",
                  "enum": [
                    "FIRST",
                    "LAST"
                  ]
                }
              },
              "additionalProperties": false,
              "oneOf": [
                {
                  "required": [
                    "name"
                  ],
                  "not": {
                    "required": [
                      "expression"
                    ]
                  }
                },
                {
                  "required": [
                    "expression"
                  ],
                  "not": {
                    "required": [
                      "name"
                    ]
                  }
                }
              ]
            }
          },
          "include": {
            "title": "Include Columns",
            "description": "Use to provide a list of non-key columns to provide in the index.",
            "type": "array",
            "items": {
              "title": "Column Name",
              "type": "string"
            }
          },
          "storage_parameters": {
            "title": "Storage Parameters",
            "description": "Storage parameter settings for the index",
            "type": "object",
            "propertyNames": {
              "pattern": "^[A-Za-z0-9_]*$"
            }
          },
          "tablespace": {
            "title": "Tablespace",
            "description": "Specifies the tablespace to use when creating the index",
            "type": "string"
          },
          "nulls_not_distinct": {
            "title": "Nulls Not Distinct",
            "description": "Renders NULLS NOT DISTINCT on a unique index (PostgreSQL 15+), where one null equals another. Absent means nulls are distinct, the default.\n",
            "type": "boolean"
          },
          "where": {
            "title": "Where",
            "description": "Use to provide an expression for creating a partial index",
            "type": "string"
          },
          "comment": {
            "title": "Comment",
            "description": "An optional comment about the table",
            "type": "string"
          },
          "dependencies": {
            "title": "Dependencies",
            "description": "Objects this object depends on, for the cases the dependency graph cannot infer: an ordering the topological sort would otherwise get wrong, such as a foreign key between tables or an inheritance parent.\nEach entry names an object as `schema.name`, or unqualified for a schemaless type. A function or aggregate carries its argument signature (`test.f(integer)`) and a cast its types (`(int4 AS timestamp)`), since the name alone is ambiguous.\n",
            "type": "object",
            "properties": {
              "aggregates": {
                "description": "The aggregates this object depends on.",
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "collations": {
                "description": "The collations this object depends on.",
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "domains": {
                "description": "The domains this object depends on.",
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "event_triggers": {
                "description": "The event triggers this object depends on.",
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "extensions": {
                "description": "The extensions this object depends on.",
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "foreign_data_wrappers": {
                "description": "The foreign data wrappers this object depends on.",
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "functions": {
                "description": "The functions this object depends on.",
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "languages": {
                "description": "The languages this object depends on.",
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "materialized_views": {
                "description": "The materialized views this object depends on.",
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "publications": {
                "description": "The publications this object depends on.",
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "sequences": {
                "description": "The sequences this object depends on.",
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "servers": {
                "description": "The servers this object depends on.",
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "subscriptions": {
                "description": "The subscriptions this object depends on.",
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "tables": {
                "description": "The tables this object depends on.",
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "types": {
                "description": "The types this object depends on.",
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "user_mappings": {
                "description": "The user mappings this object depends on.",
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "users": {
                "description": "The users this object depends on.",
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "views": {
                "description": "The views this object depends on.",
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "additionalProperties": false
          }
        },
        "additionalProperties": false,
        "oneOf": [
          {
            "required": [
              "sql"
            ],
            "not": {
              "required": [
                "name",
                "method",
                "columns",
                "storage_parameters",
                "unique",
                "recurse",
                "include",
                "where"
              ]
            }
          },
          {
            "required": [
              "name",
              "columns"
            ],
            "not": {
              "required": [
                "sql"
              ]
            }
          }
        ]
      }
    },
    "check_constraints": {
      "title": "Table Check Constraints",
      "type": "array",
      "items": {
        "title": "Check Constraint Expression",
        "description": "Specifies an expression producing a Boolean result which new or updated rows must satisfy for an insert or update operation to succeed.\n",
        "type": "object",
        "properties": {
          "name": {
            "title": "Constraint Name",
            "description": "The name PostgreSQL knows the constraint by.",
            "type": "string"
          },
          "expression": {
            "title": "Expression",
            "description": "The boolean expression rows must satisfy, as it appears inside `CHECK (...)`.\n",
            "type": "string"
          },
          "enforced": {
            "title": "Enforced",
            "description": "false renders NOT ENFORCED (PostgreSQL 18+), which stops the constraint being checked. PostgreSQL records a not-enforced constraint as not validated as well. Absent means enforced, the default.\n",
            "type": "boolean"
          },
          "not_valid": {
            "title": "Not Valid",
            "description": "true renders NOT VALID: rows already in the table were never checked, only new ones are. The state holds only when the constraint is added with ALTER TABLE, so the build writes it that way. Absent means valid, the default.\n",
            "type": "boolean"
          }
        }
      }
    },
    "not_null_constraints": {
      "title": "Table NOT NULL Constraints",
      "description": "A NOT NULL constraint written at the table level rather than on the column (PostgreSQL 18 and later). pg_dump emits this form only for a column the table inherits rather than declares, since such a table has no column entry to carry `nullable: false`.\nOmit `name` when the constraint carries the name PostgreSQL generates by default, `<table>_<column>_not_null`.\n",
      "type": "array",
      "items": {
        "title": "NOT NULL Constraint",
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "column": {
            "type": "string"
          },
          "no_inherit": {
            "title": "NO INHERIT",
            "description": "Whether the constraint is not inherited by this table's own descendants.\n",
            "type": "boolean"
          },
          "not_valid": {
            "title": "Not Valid",
            "description": "true renders NOT VALID: rows already in the table were never checked, only new ones are. The state holds only when the constraint is added with ALTER TABLE, so the build writes it that way. Absent means valid, the default.\n",
            "type": "boolean"
          }
        },
        "required": [
          "column"
        ],
        "additionalProperties": false
      }
    },
    "unique_constraints": {
      "title": "Unique Constraints",
      "description": "The UNIQUE constraint specifies that a group of one or more columns of a table can contain only unique values. The behavior of the unique table constraint is the same as that for column constraints, with the additional capability to span multiple columns.\nFor the purpose of a unique constraint, null values are not considered equal.\nEach unique table constraint must name a set of columns that is different from the set of columns named by any other unique or primary key constraint defined for the table. (Otherwise it would just be the same constraint listed twice.)\nWhen establishing a unique constraint for a multi-level partition hierarchy, all the columns in the partition key of the target partitioned table, as well as those of all its descendant partitioned tables, must be included in the constraint definition.\nAdding a unique constraint will automatically create a unique btree index on the column or group of columns used in the constraint. The optional clause INCLUDE adds to that index one or more columns on which the uniqueness is not enforced. Note that although the constraint is not enforced on the included columns, it still depends on them. Consequently, some operations on these columns (e.g. DROP COLUMN) can cause cascaded constraint and index deletion.\nFor unique constraints without included columns, this value can be a list of column names. Otherwise it's an object with a columns and an include attribute.\n",
      "type": "array",
      "items": {
        "anyOf": [
          {
            "type": "array",
            "items": {
              "title": "Column Name",
              "type": "string"
            }
          },
          {
            "title": "Column Name",
            "type": "string"
          },
          {
            "title": "Unique Constraint",
            "type": "object",
            "properties": {
              "name": {
                "title": "Name",
                "description": "The constraint name, kept only when it is not the one PostgreSQL generates.\n",
                "type": "string"
              },
              "columns": {
                "title": "Columns",
                "description": "The list of columns that provide the uniqueness",
                "type": "array",
                "minItems": 1
              },
              "include": {
                "title": "Include Columns",
                "description": "Use to provide a list of non-key columns to provide in the index.",
                "type": "array",
                "items": {
                  "title": "Column Name",
                  "type": "string"
                }
              },
              "nulls_not_distinct": {
                "title": "Nulls Not Distinct",
                "description": "Renders UNIQUE NULLS NOT DISTINCT (PostgreSQL 15+), where one null equals another, so at most one null row is allowed. Absent means nulls are distinct, the default. PostgreSQL rejects the clause on a primary key, whose columns cannot be null.\n",
                "type": "boolean"
              },
              "without_overlaps": {
                "title": "Without Overlaps",
                "description": "Makes the constraint temporal (PostgreSQL 18+). WITHOUT OVERLAPS applies to the last column, which must be a range or multirange.\n",
                "type": "boolean"
              }
            },
            "required": [
              "columns"
            ],
            "additionalProperties": false
          }
        ]
      }
    },
    "foreign_keys": {
      "title": "Foreign Keys",
      "description": "An array of foreign keys on the table",
      "type": "array",
      "items": {
        "title": "Foreign Key",
        "description": "Defines a foreign key on a table",
        "type": "object",
        "properties": {
          "name": {
            "title": "Name",
            "description": "The foreign key name",
            "type": "string"
          },
          "sql": {
            "title": "SQL Statement",
            "description": "User-provided raw SQL snippet",
            "type": "string"
          },
          "columns": {
            "title": "Columns",
            "description": "The columns in the table that the foreign key enforces the value of",
            "type": "array",
            "items": {
              "title": "Column Name",
              "type": "string"
            },
            "minItems": 1
          },
          "references": {
            "title": "Referenced Table",
            "description": "Defines the information about the foreign key table and columns",
            "type": "object",
            "properties": {
              "name": {
                "title": "Name",
                "description": "The name of the foreign key table",
                "type": "string"
              },
              "columns": {
                "title": "Columns",
                "description": "The columns in the table in the foreign key table",
                "type": "array",
                "items": {
                  "title": "Column Name",
                  "type": "string"
                },
                "minItems": 1
              },
              "period": {
                "title": "Period Column",
                "description": "The range column named after PERIOD in a temporal foreign key (PostgreSQL 18+), on the referenced side.\n",
                "type": "string"
              }
            },
            "additionalProperties": false,
            "required": [
              "name",
              "columns"
            ]
          },
          "match_type": {
            "title": "Match Type",
            "description": "A value inserted into the referencing column(s) is matched against the values of the referenced table and referenced columns using the given match type. There are three match types: FULL, PARTIAL, and SIMPLE (which is the default). FULL will not allow one column of a multicolumn foreign key to be null unless all foreign key columns are null; if they are all null, the row is not required to have a match in the referenced table. SIMPLE allows any of the foreign key columns to be null; if any of them are null, the row is not required to have a match in the referenced table. PARTIAL is not yet implemented.\n",
            "enum": [
              "FULL",
              "PARTIAL",
              "SIMPLE"
            ]
          },
          "on_delete": {
            "title": "On Delete",
            "description": "Action to take on delete of the column value in the referenced table",
            "enum": [
              "NO ACTION",
              "RESTRICT",
              "CASCADE",
              "SET NULL",
              "SET DEFAULT"
            ]
          },
          "on_update": {
            "title": "On Update",
            "description": "Action to take on update of the column value in the referenced table",
            "enum": [
              "NO ACTION",
              "RESTRICT",
              "CASCADE",
              "SET NULL",
              "SET DEFAULT"
            ]
          },
          "deferrable": {
            "title": "Deferrable",
            "description": "This controls whether the constraint can be deferred. A constraint that is not deferrable will be checked immediately after every command.\n",
            "type": "boolean"
          },
          "initially_deferred": {
            "title": "Initial Constraint Check Behavior",
            "type": "boolean"
          },
          "period": {
            "title": "Period Column",
            "description": "The range column named after PERIOD in a temporal foreign key (PostgreSQL 18+), on the referencing side. Both sides must name one.\n",
            "type": "string"
          },
          "enforced": {
            "title": "Enforced",
            "description": "false renders NOT ENFORCED (PostgreSQL 18+), which stops the constraint being checked. PostgreSQL records a not-enforced constraint as not validated as well. Absent means enforced, the default.\n",
            "type": "boolean"
          },
          "not_valid": {
            "title": "Not Valid",
            "description": "true renders NOT VALID: rows already in the table were never checked, only new ones are. The state holds only when the constraint is added with ALTER TABLE, so the build writes it that way. Absent means valid, the default.\n",
            "type": "boolean"
          }
        },
        "additionalProperties": false,
        "dependentSchemas": {
          "period": {
            "required": [
              "references"
            ],
            "properties": {
              "references": {
                "required": [
                  "period"
                ]
              }
            }
          }
        },
        "if": {
          "required": [
            "references"
          ],
          "properties": {
            "references": {
              "required": [
                "period"
              ]
            }
          }
        },
        "then": {
          "required": [
            "period"
          ]
        },
        "oneOf": [
          {
            "required": [
              "sql"
            ],
            "not": {
              "required": [
                "columns",
                "references",
                "on_delete",
                "on_update",
                "deferrable",
                "initially_deferred"
              ]
            }
          },
          {
            "required": [
              "columns"
            ],
            "not": {
              "required": [
                "sql"
              ]
            }
          }
        ]
      }
    },
    "constraint_comments": {
      "title": "Constraint Comments",
      "description": "Comments on the table's primary key, unique, check, foreign key and NOT NULL constraints, by constraint name. An exclusion constraint keeps its comment on itself.\n",
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    },
    "exclude_constraints": {
      "title": "Exclusion Constraints",
      "description": "An array of exclusion constraints (EXCLUDE): no two rows may have every element compare true under its operator\n",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "title": "Name",
            "type": "string"
          },
          "method": {
            "title": "Index Method",
            "description": "The index access method, such as gist or btree",
            "type": "string"
          },
          "elements": {
            "title": "Elements",
            "description": "Each column or expression, with the operator it is compared with\n",
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "title": "Column",
                  "type": "string"
                },
                "expression": {
                  "title": "Expression",
                  "type": "string"
                },
                "collation": {
                  "title": "Collation",
                  "type": "string"
                },
                "opclass": {
                  "title": "Operator Class",
                  "type": "string"
                },
                "direction": {
                  "title": "Sort Direction",
                  "enum": [
                    "ASC",
                    "DESC"
                  ]
                },
                "null_placement": {
                  "title": "Null Placement",
                  "enum": [
                    "FIRST",
                    "LAST"
                  ]
                },
                "operator": {
                  "title": "Operator",
                  "description": "The operator two rows are compared with",
                  "type": "string"
                }
              },
              "required": [
                "operator"
              ],
              "oneOf": [
                {
                  "required": [
                    "name"
                  ]
                },
                {
                  "required": [
                    "expression"
                  ]
                }
              ],
              "additionalProperties": false
            }
          },
          "include": {
            "title": "Included Columns",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "where": {
            "title": "Predicate",
            "description": "Only rows that satisfy this expression are compared",
            "type": "string"
          },
          "deferrable": {
            "title": "Deferrable",
            "type": "boolean"
          },
          "initially_deferred": {
            "title": "Initially Deferred",
            "type": "boolean"
          },
          "comment": {
            "title": "Comment",
            "type": "string"
          }
        },
        "required": [
          "name",
          "elements"
        ],
        "additionalProperties": false
      }
    },
    "triggers": {
      "title": "Triggers",
      "description": "An array of triggers on the table",
      "type": "array",
      "items": {
        "title": "Trigger",
        "description": "Defines a trigger on a table",
        "type": "object",
        "properties": {
          "name": {
            "title": "Name",
            "description": "The index name",
            "type": "string"
          },
          "sql": {
            "title": "SQL Statement",
            "description": "User-provided raw SQL snippet",
            "type": "string"
          },
          "when": {
            "title": "When to fire the trigger",
            "enum": [
              "BEFORE",
              "AFTER",
              "INSTEAD OF"
            ]
          },
          "events": {
            "title": "The events that cause the fire to trigger",
            "type": "array",
            "items": {
              "enum": [
                "INSERT",
                "UPDATE",
                "DELETE",
                "TRUNCATE"
              ]
            }
          },
          "for_each": {
            "title": "For Each Row or Statement",
            "enum": [
              "ROW",
              "STATEMENT"
            ],
            "default": "STATEMENT"
          },
          "constraint": {
            "title": "Constraint Trigger",
            "description": "Create the trigger as a CONSTRAINT TRIGGER (always AFTER and FOR EACH ROW); it may be deferred to the end of the transaction.\n",
            "type": "boolean"
          },
          "deferrable": {
            "title": "Deferrable",
            "description": "Whether a constraint trigger's firing can be deferred.",
            "type": "boolean"
          },
          "initially_deferred": {
            "title": "Initially Deferred",
            "description": "Whether a deferrable constraint trigger defers by default.",
            "type": "boolean"
          },
          "condition": {
            "title": "Trigger Condition",
            "description": "A Boolean expression that determines whether the trigger function will actually be executed. If WHEN is specified, the function will only be called if the condition returns true.\n",
            "type": "string"
          },
          "function": {
            "title": "Trigger Function",
            "description": "The trigger function to execute",
            "type": "string"
          },
          "arguments": {
            "title": "Funciton Arguments",
            "description": "An optional comma-separated list of arguments to be provided to the function when the trigger is executed.\n",
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "string"
                }
              ]
            }
          },
          "comment": {
            "title": "Comment",
            "description": "An optional comment about the table",
            "type": "string"
          },
          "dependencies": {
            "title": "Dependencies",
            "description": "Objects this object depends on, for the cases the dependency graph cannot infer: an ordering the topological sort would otherwise get wrong, such as a foreign key between tables or an inheritance parent.\nEach entry names an object as `schema.name`, or unqualified for a schemaless type. A function or aggregate carries its argument signature (`test.f(integer)`) and a cast its types (`(int4 AS timestamp)`), since the name alone is ambiguous.\n",
            "type": "object",
            "properties": {
              "aggregates": {
                "description": "The aggregates this object depends on.",
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "collations": {
                "description": "The collations this object depends on.",
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "domains": {
                "description": "The domains this object depends on.",
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "event_triggers": {
                "description": "The event triggers this object depends on.",
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "extensions": {
                "description": "The extensions this object depends on.",
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "foreign_data_wrappers": {
                "description": "The foreign data wrappers this object depends on.",
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "functions": {
                "description": "The functions this object depends on.",
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "languages": {
                "description": "The languages this object depends on.",
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "materialized_views": {
                "description": "The materialized views this object depends on.",
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "publications": {
                "description": "The publications this object depends on.",
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "sequences": {
                "description": "The sequences this object depends on.",
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "servers": {
                "description": "The servers this object depends on.",
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "subscriptions": {
                "description": "The subscriptions this object depends on.",
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "tables": {
                "description": "The tables this object depends on.",
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "types": {
                "description": "The types this object depends on.",
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "user_mappings": {
                "description": "The user mappings this object depends on.",
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "users": {
                "description": "The users this object depends on.",
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "views": {
                "description": "The views this object depends on.",
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "additionalProperties": false
          }
        },
        "additionalProperties": false,
        "oneOf": [
          {
            "required": [
              "sql"
            ],
            "not": {
              "anyOf": [
                {
                  "required": [
                    "name"
                  ]
                },
                {
                  "required": [
                    "when"
                  ]
                },
                {
                  "required": [
                    "events"
                  ]
                },
                {
                  "required": [
                    "for_each"
                  ]
                },
                {
                  "required": [
                    "constraint"
                  ]
                },
                {
                  "required": [
                    "deferrable"
                  ]
                },
                {
                  "required": [
                    "initially_deferred"
                  ]
                },
                {
                  "required": [
                    "condition"
                  ]
                },
                {
                  "required": [
                    "function"
                  ]
                },
                {
                  "required": [
                    "arguments"
                  ]
                }
              ]
            }
          },
          {
            "required": [
              "name",
              "when",
              "events",
              "function"
            ],
            "not": {
              "required": [
                "sql"
              ]
            }
          }
        ],
        "allOf": [
          {
            "if": {
              "properties": {
                "deferrable": {
                  "const": true
                }
              },
              "required": [
                "deferrable"
              ]
            },
            "then": {
              "properties": {
                "constraint": {
                  "const": true
                }
              },
              "required": [
                "constraint"
              ]
            }
          },
          {
            "if": {
              "properties": {
                "initially_deferred": {
                  "const": true
                }
              },
              "required": [
                "initially_deferred"
              ]
            },
            "then": {
              "properties": {
                "constraint": {
                  "const": true
                },
                "deferrable": {
                  "const": true
                }
              },
              "required": [
                "constraint",
                "deferrable"
              ]
            }
          },
          {
            "if": {
              "properties": {
                "constraint": {
                  "const": true
                }
              },
              "required": [
                "constraint"
              ]
            },
            "then": {
              "properties": {
                "when": {
                  "const": "AFTER"
                },
                "for_each": {
                  "const": "ROW"
                }
              }
            }
          }
        ]
      }
    },
    "rules": {
      "title": "Rules",
      "description": "An array of rewrite rules on the table",
      "type": "array",
      "items": {
        "title": "Rule",
        "description": "Defines a rewrite rule on a table or view (CREATE RULE)",
        "type": "object",
        "properties": {
          "name": {
            "title": "Name",
            "description": "The rule name, unique within its table or view",
            "type": "string"
          },
          "event": {
            "title": "Event",
            "enum": [
              "SELECT",
              "INSERT",
              "UPDATE",
              "DELETE"
            ]
          },
          "condition": {
            "title": "Condition",
            "description": "The WHERE expression that decides whether the rule applies",
            "type": "string"
          },
          "instead": {
            "title": "Instead",
            "description": "Run the commands instead of the original one (DO INSTEAD); the default is DO ALSO",
            "type": "boolean"
          },
          "commands": {
            "title": "Commands",
            "description": "The commands the rule runs; absent for NOTHING",
            "type": "array",
            "items": {
              "type": "string"
            },
            "minItems": 1
          },
          "enabled": {
            "title": "Enabled",
            "description": "When the rule fires (ALTER TABLE ... RULE). ORIGIN, the default, fires it in a normal session; REPLICA only when session_replication_role is replica; ALWAYS in both; DISABLED never.\n",
            "enum": [
              "ORIGIN",
              "REPLICA",
              "ALWAYS",
              "DISABLED"
            ]
          },
          "comment": {
            "title": "Comment",
            "type": "string"
          }
        },
        "required": [
          "name",
          "event"
        ],
        "additionalProperties": false
      }
    },
    "row_level_security": {
      "title": "Row-Level Security",
      "description": "Whether row-level security is enabled and forced on the table. When absent, deploy does not manage the table's row security, and does not manage its policies unless `policies` is given. When present, `policies` is the complete list: an absent list means the table has no policies.\n",
      "type": "object",
      "properties": {
        "enabled": {
          "title": "Enabled",
          "description": "ENABLE ROW LEVEL SECURITY",
          "type": "boolean"
        },
        "forced": {
          "title": "Forced",
          "description": "FORCE ROW LEVEL SECURITY: the policies apply to the table owner too\n",
          "type": "boolean"
        }
      },
      "additionalProperties": false,
      "required": [
        "enabled"
      ]
    },
    "replica_identity": {
      "title": "Replica Identity",
      "description": "What logical replication records to identify an updated or deleted row: FULL (the whole row), NOTHING, or a unique index given as `{index: name}`. Absent is DEFAULT, the primary key.\n",
      "oneOf": [
        {
          "enum": [
            "DEFAULT",
            "FULL",
            "NOTHING"
          ]
        },
        {
          "type": "object",
          "properties": {
            "index": {
              "title": "Index",
              "type": "string"
            }
          },
          "required": [
            "index"
          ],
          "additionalProperties": false
        }
      ]
    },
    "policies": {
      "title": "Policies",
      "description": "An array of row-level security policies on the table",
      "type": "array",
      "items": {
        "title": "Policy",
        "description": "Defines a row-level security policy on a table",
        "type": "object",
        "properties": {
          "name": {
            "title": "Name",
            "description": "The policy name, unique within its table",
            "type": "string"
          },
          "restrictive": {
            "title": "Restrictive",
            "description": "Create the policy AS RESTRICTIVE. A row must pass every restrictive policy, in addition to at least one permissive policy. The default is PERMISSIVE.\n",
            "type": "boolean"
          },
          "command": {
            "title": "Command",
            "description": "The command the policy applies to. The default is ALL.",
            "enum": [
              "ALL",
              "SELECT",
              "INSERT",
              "UPDATE",
              "DELETE"
            ]
          },
          "roles": {
            "title": "Roles",
            "description": "The roles the policy applies to. The default is PUBLIC.",
            "type": "array",
            "items": {
              "type": "string"
            },
            "minItems": 1
          },
          "using": {
            "title": "USING Expression",
            "description": "The expression that selects the existing rows the policy makes visible or lets a command change\n",
            "type": "string"
          },
          "with_check": {
            "title": "WITH CHECK Expression",
            "description": "The expression that new or updated rows must satisfy\n",
            "type": "string"
          },
          "comment": {
            "title": "Comment",
            "description": "An optional comment about the policy",
            "type": "string"
          }
        },
        "additionalProperties": false,
        "required": [
          "name"
        ]
      }
    },
    "partition": {
      "title": "Partition Table",
      "description": "Defines table partitioning behavior",
      "type": "object",
      "properties": {
        "type": {
          "title": "Partition Type",
          "enum": [
            "HASH",
            "LIST",
            "RANGE"
          ]
        },
        "columns": {
          "title": "Columns",
          "description": "Defines the columns that are indexed",
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            {
              "title": "Column",
              "type": "object",
              "properties": {
                "name": {
                  "title": "Column Name",
                  "description": "Specify either the column name, mutally exclusive from expression.",
                  "type": "string"
                },
                "expression": {
                  "title": "Expression",
                  "type": "string",
                  "description": "Specify an expression for the column, mutally exclusive from name."
                },
                "collation": {
                  "title": "Column Collation",
                  "description": "Assigns a collation to the column (which must be of a collatable data type).\n",
                  "type": "string"
                },
                "opclass": {
                  "title": "Operator Class",
                  "description": "The name of an operator class",
                  "type": "string"
                }
              },
              "additionalProperties": false
            }
          ]
        }
      },
      "additionalProperties": false,
      "required": [
        "type",
        "columns"
      ]
    },
    "partitions": {
      "title": "Partitions",
      "description": "Define partitions of the table",
      "type": "array",
      "items": {
        "title": "Partition",
        "description": "Defines a partition of the table",
        "type": "object",
        "properties": {
          "schema": {
            "title": "Schema",
            "description": "The schema to create the table in",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "description": "The table name",
            "type": "string"
          },
          "default": {
            "title": "Default Partition",
            "description": "Indicates that the partition is the default partition",
            "type": "boolean"
          },
          "for_values_in": {
            "title": "Partition Values IN",
            "description": "Used in LIST partitioning",
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "string"
                }
              ]
            }
          },
          "for_values_from": {
            "title": "Partition Values From",
            "description": "Used in RANGE partitioning",
            "oneOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "string"
              }
            ]
          },
          "for_values_to": {
            "title": "Partition Values To",
            "description": "Used in RANGE partitioning",
            "oneOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "string"
              }
            ]
          },
          "for_values_with": {
            "title": "Partition Values With Expression",
            "description": "Used in HASH partitioning",
            "type": "string"
          },
          "comment": {
            "title": "Comment",
            "description": "An optional comment about the partition",
            "type": "string"
          }
        },
        "required": [
          "schema",
          "name"
        ],
        "oneOf": [
          {
            "required": [
              "default"
            ],
            "not": {
              "required": [
                "for_values_in",
                "for_values_from",
                "for_values_to",
                "for_values_with"
              ]
            }
          },
          {
            "required": [
              "for_values_in"
            ],
            "not": {
              "required": [
                "default",
                "for_values_from",
                "for_values_to",
                "for_values_with"
              ]
            }
          },
          {
            "required": [
              "for_values_from",
              "for_values_to"
            ],
            "not": {
              "required": [
                "default",
                "for_values_in",
                "for_values_with"
              ]
            }
          },
          {
            "required": [
              "for_values_with"
            ],
            "not": {
              "required": [
                "default",
                "for_values_in",
                "for_values_from",
                "for_values_to"
              ]
            }
          }
        ]
      }
    },
    "access_method": {
      "title": "Storage Access Method",
      "description": "Specifies the table access method to use to store the contents for the new table; the method needs be an access method of type TABLE.\n",
      "type": "string"
    },
    "storage_parameters": {
      "title": "Storage Parameters",
      "description": "Storage parameter settings for the table. A `toast.` prefix targets the table's TOAST table instead of the table itself.\n",
      "type": "object",
      "propertyNames": {
        "pattern": "^(toast\\.)?[A-Za-z0-9_]+$"
      }
    },
    "tablespace": {
      "title": "Tablespace",
      "description": "Specifies the name of the tablespace in which the new table is to be created.\n",
      "type": "string"
    },
    "index_tablespace": {
      "title": "Tablespace",
      "description": "This clause allows selection of the tablespace in which the index associated with a UNIQUE, PRIMARY KEY, or EXCLUDE constraint will be created. If not specified, default_tablespace is consulted.\n",
      "type": "string"
    },
    "server": {
      "title": "Foreign Server",
      "description": "Used to specify the server if this is a foreign table",
      "type": "string"
    },
    "options": {
      "title": "Foreign Table Options",
      "description": "Foreign table OPTIONS as an open key/value map; the available keys depend on the foreign data wrapper (e.g. postgres_fdw uses schema_name and table_name, file_fdw uses filename and format).\n",
      "type": "object",
      "propertyNames": {
        "pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
      },
      "additionalProperties": true
    },
    "comment": {
      "title": "Comment",
      "description": "An optional comment about the table",
      "type": "string"
    },
    "dependencies": {
      "title": "Dependencies",
      "description": "Objects this object depends on, for the cases the dependency graph cannot infer: an ordering the topological sort would otherwise get wrong, such as a foreign key between tables or an inheritance parent.\nEach entry names an object as `schema.name`, or unqualified for a schemaless type. A function or aggregate carries its argument signature (`test.f(integer)`) and a cast its types (`(int4 AS timestamp)`), since the name alone is ambiguous.\n",
      "type": "object",
      "properties": {
        "aggregates": {
          "description": "The aggregates this object depends on.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "collations": {
          "description": "The collations this object depends on.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "domains": {
          "description": "The domains this object depends on.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "event_triggers": {
          "description": "The event triggers this object depends on.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "extensions": {
          "description": "The extensions this object depends on.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "foreign_data_wrappers": {
          "description": "The foreign data wrappers this object depends on.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "functions": {
          "description": "The functions this object depends on.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "languages": {
          "description": "The languages this object depends on.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "materialized_views": {
          "description": "The materialized views this object depends on.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "publications": {
          "description": "The publications this object depends on.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "sequences": {
          "description": "The sequences this object depends on.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "servers": {
          "description": "The servers this object depends on.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "subscriptions": {
          "description": "The subscriptions this object depends on.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "tables": {
          "description": "The tables this object depends on.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "types": {
          "description": "The types this object depends on.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "user_mappings": {
          "description": "The user mappings this object depends on.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "users": {
          "description": "The users this object depends on.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "views": {
          "description": "The views this object depends on.",
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false,
  "required": [
    "schema",
    "name"
  ],
  "oneOf": [
    {
      "required": [
        "sql"
      ],
      "not": {
        "anyOf": [
          {
            "required": [
              "columns"
            ]
          },
          {
            "required": [
              "parents"
            ]
          },
          {
            "required": [
              "like_table"
            ]
          },
          {
            "required": [
              "server"
            ]
          },
          {
            "required": [
              "options"
            ]
          }
        ]
      }
    },
    {
      "required": [
        "server"
      ],
      "anyOf": [
        {
          "required": [
            "columns"
          ]
        },
        {
          "required": [
            "parents"
          ]
        }
      ],
      "not": {
        "anyOf": [
          {
            "required": [
              "sql"
            ]
          },
          {
            "required": [
              "like_table"
            ]
          }
        ]
      }
    },
    {
      "not": {
        "anyOf": [
          {
            "required": [
              "sql"
            ]
          },
          {
            "required": [
              "server"
            ]
          },
          {
            "required": [
              "options"
            ]
          }
        ]
      },
      "anyOf": [
        {
          "required": [
            "columns"
          ]
        },
        {
          "required": [
            "parents"
          ]
        },
        {
          "required": [
            "from_type"
          ]
        },
        {
          "required": [
            "like_table"
          ]
        }
      ]
    }
  ]
}