[
  {
    "name": "accounts",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": true,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Account ID"
      },
      {
        "name": "fork",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_accounts_fork",
            "table": "forks",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Fork ID (`null` for base module)"
      },
      {
        "name": "ownergroup",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_accounts_ownergroup",
            "table": "groups",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Owner group ID (`null`=PUBLIC)"
      },
      {
        "name": "creator",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creator user ID (defaults to authenticated user on creation)"
      },
      {
        "name": "assigneduser",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_accounts_assigneduser",
            "table": "users",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Assigned user ID"
      },
      {
        "name": "creationdate",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creation date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (defaults to current date and time on creation)"
      },
      {
        "name": "lastmodified",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Last modification date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (auto-reset on modification)"
      },
      {
        "name": "contact",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_accounts_contact",
            "table": "contacts",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Contact ID"
      },
      {
        "name": "visibility",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Visibility (`0`=REGULAR, `1`=ARCHIVED, `2`=DELETED)"
      },
      {
        "name": "lastname",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Last name (surname or company name); is required if `firstname` is empty"
      },
      {
        "name": "firstname",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "First name (given name); is required if `lastname` is empty"
      },
      {
        "name": "type",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Account type (`0`=PROSPECT, `1`=CUSTOMER, `2`=SUPPLIER, `3`=CUSTOMERANDSUPPLIER, `4`=COMPETITOR, `5`=EMPLOYEE)"
      },
      {
        "name": "customernum",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Customer number; only for PROSPECT, CUSTOMERANDSUPPLIER, CUSTOMER or EMPLOYEE"
      },
      {
        "name": "suppliernum",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Supplier number; only for SUPPLIER or CUSTOMERANDSUPPLIER"
      },
      {
        "name": "taxid",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Tax ID (e.g. VATIN or SSN)"
      },
      {
        "name": "currency",
        "type": "character varying(3)",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": "^[A-Z]{3}$",
        "description": "Currency code ([ISO 4217](https://en.wikipedia.org/wiki/ISO_4217))"
      },
      {
        "name": "locked",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Deny booking of billing or procurement transactions"
      },
      {
        "name": "excludetax",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Exclude from taxation"
      },
      {
        "name": "description",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Detailed general description"
      }
    ],
    "indexes": [
      {
        "name": "fk_accounts_assigneduser",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "assigneduser"
        ],
        "def": "CREATE INDEX fk_accounts_assigneduser ON accounts USING gin (assigneduser) WHERE assigneduser IS NOT NULL"
      },
      {
        "name": "fk_accounts_contact",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "contact"
        ],
        "def": "CREATE INDEX fk_accounts_contact ON accounts USING btree (contact) WHERE contact IS NOT NULL"
      },
      {
        "name": "fk_accounts_fork",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "fork"
        ],
        "def": "CREATE INDEX fk_accounts_fork ON accounts USING gin (fork) WHERE fork IS NOT NULL"
      },
      {
        "name": "fk_accounts_ownergroup",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "ownergroup"
        ],
        "def": "CREATE INDEX fk_accounts_ownergroup ON accounts USING gin (ownergroup)"
      },
      {
        "name": "i_accounts_lastname_firstname",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "lastname",
          "firstname"
        ],
        "def": "CREATE INDEX i_accounts_lastname_firstname ON accounts USING btree (lastname, firstname)"
      },
      {
        "name": "i_accounts_nofork",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "fork"
        ],
        "def": "CREATE INDEX i_accounts_nofork ON accounts USING gin (fork) WHERE fork IS NULL"
      },
      {
        "name": "i_accounts_noowner",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "ownergroup"
        ],
        "def": "CREATE INDEX i_accounts_noowner ON accounts USING gin (ownergroup) WHERE ownergroup IS NULL"
      },
      {
        "name": "pk_accounts",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_accounts ON accounts USING btree (\"ID\")"
      },
      {
        "name": "s_accounts_customernum",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "customernum"
        ],
        "def": "CREATE INDEX s_accounts_customernum ON accounts USING gin (customernum gin_trgm_ops) WHERE customernum::text <> ''::text"
      },
      {
        "name": "s_accounts_firstname",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "firstname"
        ],
        "def": "CREATE INDEX s_accounts_firstname ON accounts USING gin (firstname gin_trgm_ops) WHERE firstname::text <> ''::text"
      },
      {
        "name": "s_accounts_lastname",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "lastname"
        ],
        "def": "CREATE INDEX s_accounts_lastname ON accounts USING gin (lastname gin_trgm_ops) WHERE lastname::text <> ''::text"
      },
      {
        "name": "s_accounts_suppliernum",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "suppliernum"
        ],
        "def": "CREATE INDEX s_accounts_suppliernum ON accounts USING gin (suppliernum gin_trgm_ops) WHERE suppliernum::text <> ''::text"
      }
    ],
    "constraints": [
      {
        "name": "c_accounts_name",
        "type": "check",
        "domain": false,
        "def": "CHECK (lastname::text <> ''::text OR firstname::text <> ''::text)"
      },
      {
        "name": "c_accounts_type",
        "type": "check",
        "domain": false,
        "def": "CHECK ((customernum::text = ''::text OR (type::smallint = ANY (ARRAY[0, 1, 3, 5]))) AND (suppliernum::text = ''::text OR (type::smallint = ANY (ARRAY[2, 3, 5]))))"
      },
      {
        "name": "dc_accounts_currency",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE::text ~ '^[A-Z]{3}$'::text)"
      },
      {
        "name": "dc_accounts_customernum",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_accounts_description",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v\\r\\n]|[ \\t\\v\\r\\n]$'::text)"
      },
      {
        "name": "dc_accounts_firstname",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_accounts_lastname",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_accounts_suppliernum",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_accounts_taxid",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_accounts_type",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0 AND VALUE <= 5)"
      },
      {
        "name": "dc_accounts_visibility",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0 AND VALUE <= 2)"
      },
      {
        "name": "fk_accounts_assigneduser",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (assigneduser) REFERENCES users(\"ID\") ON DELETE SET NULL DEFERRABLE"
      },
      {
        "name": "fk_accounts_contact",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (contact) REFERENCES contacts(\"ID\") ON DELETE SET NULL DEFERRABLE"
      },
      {
        "name": "fk_accounts_fork",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (fork) REFERENCES forks(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_accounts_ownergroup",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (ownergroup) REFERENCES groups(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "pk_accounts",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "actionsteps",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": true,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Action step ID"
      },
      {
        "name": "fork",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_actionsteps_fork",
            "table": "forks",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Fork ID (`null` for base module)"
      },
      {
        "name": "owneruser",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_actionsteps_owneruser",
            "table": "users",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Owner user ID (PUBLIC if `owneruser`=`null` and `ownergroup`=`null`)"
      },
      {
        "name": "ownergroup",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_actionsteps_ownergroup",
            "table": "groups",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Owner group ID (PUBLIC if `owneruser`=`null` and `ownergroup`=`null`)"
      },
      {
        "name": "creator",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creator user ID (defaults to authenticated user on creation)"
      },
      {
        "name": "assigneduser",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_actionsteps_assigneduser",
            "table": "users",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Assigned user ID"
      },
      {
        "name": "creationdate",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creation date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (defaults to current date and time on creation)"
      },
      {
        "name": "lastmodified",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Last modification date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (auto-reset on modification)"
      },
      {
        "name": "task",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_actionsteps_task",
            "table": "tasks",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Task ID; is mutually exclusive to `ticket` and `account`"
      },
      {
        "name": "ticket",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_actionsteps_ticket",
            "table": "tickets",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Ticket ID; is mutually exclusive to `task` and `account`"
      },
      {
        "name": "account",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_actionsteps_account",
            "table": "accounts",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Account ID; is mutually exclusive to `task` and `ticket`"
      },
      {
        "name": "transaction",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_actionsteps_transaction",
            "table": "transactions",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Transaction ID"
      },
      {
        "name": "name",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Name"
      },
      {
        "name": "actionnum",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Action number"
      },
      {
        "name": "date",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Designated date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (defaults to current date and time on creation)"
      },
      {
        "name": "duedate",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Due date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time)"
      },
      {
        "name": "status",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Status (`0`=DRAFT, `1`=COMPLETED, `2`=CANCELLED, `3`=BOOKED)"
      },
      {
        "name": "effort",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Effort in minutes"
      },
      {
        "name": "description",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Detailed general description"
      }
    ],
    "indexes": [
      {
        "name": "fk_actionsteps_account",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "account"
        ],
        "def": "CREATE INDEX fk_actionsteps_account ON actionsteps USING btree (account) WHERE account IS NOT NULL"
      },
      {
        "name": "fk_actionsteps_assigneduser",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "assigneduser"
        ],
        "def": "CREATE INDEX fk_actionsteps_assigneduser ON actionsteps USING gin (assigneduser) WHERE assigneduser IS NOT NULL"
      },
      {
        "name": "fk_actionsteps_fork",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "fork"
        ],
        "def": "CREATE INDEX fk_actionsteps_fork ON actionsteps USING gin (fork) WHERE fork IS NOT NULL"
      },
      {
        "name": "fk_actionsteps_ownergroup",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "ownergroup"
        ],
        "def": "CREATE INDEX fk_actionsteps_ownergroup ON actionsteps USING gin (ownergroup) WHERE ownergroup IS NOT NULL"
      },
      {
        "name": "fk_actionsteps_owneruser",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "owneruser"
        ],
        "def": "CREATE INDEX fk_actionsteps_owneruser ON actionsteps USING gin (owneruser) WHERE owneruser IS NOT NULL"
      },
      {
        "name": "fk_actionsteps_task",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "task"
        ],
        "def": "CREATE INDEX fk_actionsteps_task ON actionsteps USING btree (task) WHERE task IS NOT NULL"
      },
      {
        "name": "fk_actionsteps_ticket",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "ticket"
        ],
        "def": "CREATE INDEX fk_actionsteps_ticket ON actionsteps USING btree (ticket) WHERE ticket IS NOT NULL"
      },
      {
        "name": "fk_actionsteps_transaction",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "transaction"
        ],
        "def": "CREATE INDEX fk_actionsteps_transaction ON actionsteps USING btree (transaction) WHERE transaction IS NOT NULL"
      },
      {
        "name": "i_actionsteps_date",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "date"
        ],
        "def": "CREATE INDEX i_actionsteps_date ON actionsteps USING btree (date DESC)"
      },
      {
        "name": "i_actionsteps_nofork",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "fork"
        ],
        "def": "CREATE INDEX i_actionsteps_nofork ON actionsteps USING gin (fork) WHERE fork IS NULL"
      },
      {
        "name": "i_actionsteps_noowner",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "ownergroup"
        ],
        "def": "CREATE INDEX i_actionsteps_noowner ON actionsteps USING gin (ownergroup) WHERE owneruser IS NULL AND ownergroup IS NULL"
      },
      {
        "name": "pk_actionsteps",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_actionsteps ON actionsteps USING btree (\"ID\")"
      },
      {
        "name": "s_actionsteps_actionnum",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "actionnum"
        ],
        "def": "CREATE INDEX s_actionsteps_actionnum ON actionsteps USING gin (actionnum gin_trgm_ops) WHERE actionnum::text <> ''::text"
      },
      {
        "name": "s_actionsteps_name",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "name"
        ],
        "def": "CREATE INDEX s_actionsteps_name ON actionsteps USING gin (name gin_trgm_ops)"
      }
    ],
    "constraints": [
      {
        "name": "c_actionsteps_association",
        "type": "check",
        "domain": false,
        "def": "CHECK (num_nonnulls(task, ticket, account) <= 1)"
      },
      {
        "name": "c_actionsteps_owner",
        "type": "check",
        "domain": false,
        "def": "CHECK (owneruser IS NULL OR ownergroup IS NULL)"
      },
      {
        "name": "dc_actionsteps_actionnum",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_actionsteps_description",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v\\r\\n]|[ \\t\\v\\r\\n]$'::text)"
      },
      {
        "name": "dc_actionsteps_effort",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0)"
      },
      {
        "name": "dc_actionsteps_name",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^$|^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_actionsteps_status",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0 AND VALUE <= 3)"
      },
      {
        "name": "fk_actionsteps_account",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (account) REFERENCES accounts(\"ID\") ON DELETE SET NULL DEFERRABLE"
      },
      {
        "name": "fk_actionsteps_assigneduser",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (assigneduser) REFERENCES users(\"ID\") ON DELETE SET NULL DEFERRABLE"
      },
      {
        "name": "fk_actionsteps_fork",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (fork) REFERENCES forks(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_actionsteps_ownergroup",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (ownergroup) REFERENCES groups(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_actionsteps_owneruser",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (owneruser) REFERENCES users(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_actionsteps_task",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (task) REFERENCES tasks(\"ID\") ON DELETE SET NULL DEFERRABLE"
      },
      {
        "name": "fk_actionsteps_ticket",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (ticket) REFERENCES tickets(\"ID\") ON DELETE SET NULL DEFERRABLE"
      },
      {
        "name": "fk_actionsteps_transaction",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (transaction) REFERENCES transactions(\"ID\") ON DELETE SET NULL DEFERRABLE"
      },
      {
        "name": "pk_actionsteps",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "addresses",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": true,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Address ID"
      },
      {
        "name": "creator",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creator user ID (defaults to authenticated user on creation)"
      },
      {
        "name": "creationdate",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creation date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (defaults to current date and time on creation)"
      },
      {
        "name": "lastmodified",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Last modification date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (auto-reset on modification)"
      },
      {
        "name": "account",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_addresses_account",
            "table": "accounts",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Account ID (**dependency**)"
      },
      {
        "name": "contact",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_addresses_contact",
            "table": "contacts",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Contact ID"
      },
      {
        "name": "type",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Address type (`0`=BILLING_SHIPPING, `1`=BILLING_BILLING, `2`=PROCUREMENT_SHIPPING, `3`=PROCUREMENT_BILLING, `4`=COLLECTION, `5`=BILLING_SELLER, `6`=PROCUREMENT_SELLER)"
      },
      {
        "name": "default",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Default for this address type"
      }
    ],
    "indexes": [
      {
        "name": "fk_addresses_contact",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "contact"
        ],
        "def": "CREATE INDEX fk_addresses_contact ON addresses USING btree (contact)"
      },
      {
        "name": "pk_addresses",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_addresses ON addresses USING btree (\"ID\")"
      },
      {
        "name": "u_addresses_account_contact_type",
        "unique": true,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "account",
          "contact",
          "type",
          "+default"
        ],
        "def": "CREATE UNIQUE INDEX u_addresses_account_contact_type ON addresses USING btree (account, contact, type) INCLUDE (\"default\")"
      }
    ],
    "constraints": [
      {
        "name": "dc_addresses_type",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0 AND VALUE <= 6)"
      },
      {
        "name": "fk_addresses_account",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (account) REFERENCES accounts(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_addresses_contact",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (contact) REFERENCES contacts(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "pk_addresses",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      },
      {
        "name": "u_addresses_account_contact_type",
        "type": "unique",
        "domain": false,
        "def": "UNIQUE (account, contact, type) INCLUDE (\"default\")"
      }
    ],
    "triggers": [
      {
        "name": "tiu_addresses_default",
        "type": "after",
        "events": [
          "insert",
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_addresses_default",
        "def": "CREATE TRIGGER tiu_addresses_default AFTER INSERT OR UPDATE OF type, \"default\" ON addresses FOR EACH ROW WHEN (new.\"default\"::smallint <> 0) EXECUTE FUNCTION ftiu_addresses_default()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "applicationassets",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": true,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Asset ID"
      },
      {
        "name": "creator",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creator user ID (defaults to authenticated user on creation)"
      },
      {
        "name": "creationdate",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "EXTRACT(epoch FROM now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creation date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (defaults to current date and time on creation)"
      },
      {
        "name": "lastmodified",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "EXTRACT(epoch FROM now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Last modification date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (auto-reset on modification)"
      },
      {
        "name": "application",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_applicationassets_application",
            "table": "applications",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Application ID (**dependency**)"
      },
      {
        "name": "binfile",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_applicationassets_binfile",
            "table": "binfiles",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Binary file ID; is read-only (not for `PUT` or `PATCH`)"
      },
      {
        "name": "filename",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Filename"
      },
      {
        "name": "mimetype",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": "'application/octet-stream'",
        "indexed": false,
        "fkeys": [],
        "pattern": "^[a-z]+/[^ \\t\\v\\r\\n]+$",
        "description": "[MIME type](https://en.wikipedia.org/wiki/Media_type) ([RFC 2045](https://tools.ietf.org/html/rfc2045))"
      }
    ],
    "indexes": [
      {
        "name": "fk_applicationassets_binfile",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "binfile"
        ],
        "def": "CREATE INDEX fk_applicationassets_binfile ON applicationassets USING btree (binfile) WHERE binfile IS NOT NULL"
      },
      {
        "name": "pk_applicationassets",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_applicationassets ON applicationassets USING btree (\"ID\")"
      },
      {
        "name": "u_applicationassets_application_filename",
        "unique": true,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "application",
          "filename"
        ],
        "def": "CREATE UNIQUE INDEX u_applicationassets_application_filename ON applicationassets USING btree (application, filename)"
      }
    ],
    "constraints": [
      {
        "name": "dc_applicationassets_filename",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^$|^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]|\\\\|(^|/)\\.{0,2}(/|$)'::text)"
      },
      {
        "name": "dc_applicationassets_mimetype",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE ~ '^[a-z]+\\/[^ \\t\\v\\r\\n]+$'::text)"
      },
      {
        "name": "fk_applicationassets_application",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (application) REFERENCES applications(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_applicationassets_binfile",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (binfile) REFERENCES binfiles(\"ID\") DEFERRABLE"
      },
      {
        "name": "pk_applicationassets",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      },
      {
        "name": "u_applicationassets_application_filename",
        "type": "unique",
        "domain": false,
        "def": "UNIQUE (application, filename)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "applications",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": true,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Application ID"
      },
      {
        "name": "creator",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creator user ID (defaults to authenticated user on creation)"
      },
      {
        "name": "creationdate",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creation date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (defaults to current date and time on creation)"
      },
      {
        "name": "lastmodified",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Last modification date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (auto-reset on modification)"
      },
      {
        "name": "activity",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Activity (`0`=ACTIVE, `1`=DEACTIVATED, `2`=DELETED)"
      },
      {
        "name": "readmebinfile",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [
          {
            "name": "fk_applications_readmebinfile",
            "table": "binfiles",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Binary file ID; is read-only (not for `PUT` or `PATCH`)"
      },
      {
        "name": "name",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Name"
      },
      {
        "name": "identifier",
        "type": "character varying(200)",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": "^[a-zA-Z0-9]([a-zA-Z0-9_.-]*[a-zA-Z0-9])?$",
        "description": "Unique application identifier"
      },
      {
        "name": "vendor",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Vendor (developer or company name)"
      },
      {
        "name": "restricted",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Restricted access via permission with same identifier"
      },
      {
        "name": "callbackurls",
        "type": "text[]",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "[Array](https://www.postgresql.org/docs/current/arrays.html)-encoded allowed callback URLs for APIs"
      },
      {
        "name": "settingscodebinfile",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_applications_settingscodebinfile",
            "table": "binfiles",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": null
      },
      {
        "name": "usersettingscodebinfile",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_applications_usersettingscodebinfile",
            "table": "binfiles",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": null
      },
      {
        "name": "secret",
        "type": "bytea",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "defaultsettings",
        "type": "json",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "settings",
        "type": "json",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "fk_applications_settingscodebinfile",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "settingscodebinfile"
        ],
        "def": "CREATE INDEX fk_applications_settingscodebinfile ON applications USING btree (settingscodebinfile) WHERE settingscodebinfile IS NOT NULL"
      },
      {
        "name": "fk_applications_usersettingscodebinfile",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "usersettingscodebinfile"
        ],
        "def": "CREATE INDEX fk_applications_usersettingscodebinfile ON applications USING btree (usersettingscodebinfile) WHERE usersettingscodebinfile IS NOT NULL"
      },
      {
        "name": "pk_applications",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_applications ON applications USING btree (\"ID\")"
      },
      {
        "name": "s_applications_identifier",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "identifier"
        ],
        "def": "CREATE INDEX s_applications_identifier ON applications USING gin (identifier gin_trgm_ops)"
      },
      {
        "name": "s_applications_name",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "name"
        ],
        "def": "CREATE INDEX s_applications_name ON applications USING gin (name gin_trgm_ops)"
      },
      {
        "name": "u_applications_identifier",
        "unique": true,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "identifier"
        ],
        "def": "CREATE UNIQUE INDEX u_applications_identifier ON applications USING btree (identifier)"
      },
      {
        "name": "u_applications_secret",
        "unique": true,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "secret"
        ],
        "def": "CREATE UNIQUE INDEX u_applications_secret ON applications USING btree (secret) WHERE secret IS NOT NULL"
      }
    ],
    "constraints": [
      {
        "name": "dc_applications_activity",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0 AND VALUE <= 2)"
      },
      {
        "name": "dc_applications_defaultsettings",
        "type": "check",
        "domain": true,
        "def": "CHECK (json_typeof(VALUE) = 'object'::text)"
      },
      {
        "name": "dc_applications_identifier",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE::text ~ '^[a-zA-Z0-9]([a-zA-Z0-9_.-]*[a-zA-Z0-9])?$'::text)"
      },
      {
        "name": "dc_applications_name",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^$|^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_applications_secret",
        "type": "check",
        "domain": true,
        "def": "CHECK (bit_length(VALUE) = 160)"
      },
      {
        "name": "dc_applications_settings",
        "type": "check",
        "domain": true,
        "def": "CHECK (json_typeof(VALUE) = 'object'::text)"
      },
      {
        "name": "dc_applications_vendor",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "fk_applications_readmebinfile",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (readmebinfile) REFERENCES binfiles(\"ID\") DEFERRABLE"
      },
      {
        "name": "fk_applications_settingscodebinfile",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (settingscodebinfile) REFERENCES binfiles(\"ID\") DEFERRABLE"
      },
      {
        "name": "fk_applications_usersettingscodebinfile",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (usersettingscodebinfile) REFERENCES binfiles(\"ID\") DEFERRABLE"
      },
      {
        "name": "pk_applications",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      },
      {
        "name": "u_applications_identifier",
        "type": "unique",
        "domain": false,
        "def": "UNIQUE (identifier)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "appointments",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": true,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Appointment ID"
      },
      {
        "name": "fork",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_appointments_fork",
            "table": "forks",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Fork ID (`null` for base module)"
      },
      {
        "name": "owneruser",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_appointments_owneruser",
            "table": "users",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Owner user ID (PUBLIC if `owneruser`=`null` and `ownergroup`=`null`)"
      },
      {
        "name": "ownergroup",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_appointments_ownergroup",
            "table": "groups",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Owner group ID (PUBLIC if `owneruser`=`null` and `ownergroup`=`null`)"
      },
      {
        "name": "creator",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creator user ID (defaults to authenticated user on creation)"
      },
      {
        "name": "assigneduser",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_appointments_assigneduser",
            "table": "users",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Assigned user ID"
      },
      {
        "name": "creationdate",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creation date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (defaults to current date and time on creation)"
      },
      {
        "name": "lastmodified",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Last modification date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (auto-reset on modification)"
      },
      {
        "name": "davserver",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_appointments_davserver",
            "table": "davservers",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "DAV server ID"
      },
      {
        "name": "visibility",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Visibility (`0`=REGULAR, `1`=ARCHIVED, `2`=DELETED)"
      },
      {
        "name": "name",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Name"
      },
      {
        "name": "location",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Location"
      },
      {
        "name": "color",
        "type": "character varying(6)",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": "^([A-F0-9]{3}){0,2}$",
        "description": "Color code (CSS-style hexadecimal without `#`)"
      },
      {
        "name": "datefrom",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Start date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time); must be less than or equal to `dateto`"
      },
      {
        "name": "dateto",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "End date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time); must be greater than or equal to `datefrom`"
      },
      {
        "name": "recurrence",
        "type": "smallint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Recurrence (`0`=DAY, `1`=WORKDAY, `2`=WEEK, `3`=MONTH, `4`=YEAR)"
      },
      {
        "name": "interval",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "1",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Recurrence interval in minutes"
      },
      {
        "name": "maxoccurrences",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Maximum number of occurrences including the start date (`0`=unlimited)"
      },
      {
        "name": "daterecurrence",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Recurrence end date as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time)"
      },
      {
        "name": "description",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Detailed general description"
      }
    ],
    "indexes": [
      {
        "name": "fk_appointments_assigneduser",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "assigneduser"
        ],
        "def": "CREATE INDEX fk_appointments_assigneduser ON appointments USING gin (assigneduser) WHERE assigneduser IS NOT NULL"
      },
      {
        "name": "fk_appointments_davserver",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "davserver"
        ],
        "def": "CREATE INDEX fk_appointments_davserver ON appointments USING gin (davserver) WHERE davserver IS NOT NULL"
      },
      {
        "name": "fk_appointments_fork",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "fork"
        ],
        "def": "CREATE INDEX fk_appointments_fork ON appointments USING gin (fork) WHERE fork IS NOT NULL"
      },
      {
        "name": "fk_appointments_ownergroup",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "ownergroup"
        ],
        "def": "CREATE INDEX fk_appointments_ownergroup ON appointments USING gin (ownergroup) WHERE ownergroup IS NOT NULL"
      },
      {
        "name": "fk_appointments_owneruser",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "owneruser"
        ],
        "def": "CREATE INDEX fk_appointments_owneruser ON appointments USING gin (owneruser) WHERE owneruser IS NOT NULL"
      },
      {
        "name": "i_appointments_datefrom_dateto",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "datefrom",
          "dateto"
        ],
        "def": "CREATE INDEX i_appointments_datefrom_dateto ON appointments USING btree (datefrom, dateto)"
      },
      {
        "name": "i_appointments_nofork",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "fork"
        ],
        "def": "CREATE INDEX i_appointments_nofork ON appointments USING gin (fork) WHERE fork IS NULL"
      },
      {
        "name": "i_appointments_noowner",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "ownergroup"
        ],
        "def": "CREATE INDEX i_appointments_noowner ON appointments USING gin (ownergroup) WHERE owneruser IS NULL AND ownergroup IS NULL"
      },
      {
        "name": "pk_appointments",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_appointments ON appointments USING btree (\"ID\")"
      },
      {
        "name": "s_appointments_location",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "location"
        ],
        "def": "CREATE INDEX s_appointments_location ON appointments USING gin (location gin_trgm_ops) WHERE location::text <> ''::text"
      },
      {
        "name": "s_appointments_name",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "name"
        ],
        "def": "CREATE INDEX s_appointments_name ON appointments USING gin (name gin_trgm_ops)"
      }
    ],
    "constraints": [
      {
        "name": "c_appointments_date",
        "type": "check",
        "domain": false,
        "def": "CHECK (datefrom <= dateto)"
      },
      {
        "name": "c_appointments_owner",
        "type": "check",
        "domain": false,
        "def": "CHECK (owneruser IS NULL OR ownergroup IS NULL)"
      },
      {
        "name": "dc_appointments_color",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE::text ~ '^([A-F0-9]{3}){0,2}$'::text)"
      },
      {
        "name": "dc_appointments_description",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v\\r\\n]|[ \\t\\v\\r\\n]$'::text)"
      },
      {
        "name": "dc_appointments_interval",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE > 0)"
      },
      {
        "name": "dc_appointments_location",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_appointments_maxoccurrences",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0)"
      },
      {
        "name": "dc_appointments_name",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^$|^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_appointments_recurrence",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0 AND VALUE <= 4)"
      },
      {
        "name": "dc_appointments_visibility",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0 AND VALUE <= 2)"
      },
      {
        "name": "fk_appointments_assigneduser",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (assigneduser) REFERENCES users(\"ID\") ON DELETE SET NULL DEFERRABLE"
      },
      {
        "name": "fk_appointments_davserver",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (davserver) REFERENCES davservers(\"ID\") ON DELETE SET NULL DEFERRABLE"
      },
      {
        "name": "fk_appointments_fork",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (fork) REFERENCES forks(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_appointments_ownergroup",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (ownergroup) REFERENCES groups(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_appointments_owneruser",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (owneruser) REFERENCES users(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "pk_appointments",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "associations",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": true,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Association ID"
      },
      {
        "name": "creator",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creator user ID (defaults to authenticated user on creation)"
      },
      {
        "name": "creationdate",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creation date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (defaults to current date and time on creation)"
      },
      {
        "name": "lastmodified",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "EXTRACT(epoch FROM now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Last modification date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (auto-reset on modification)"
      },
      {
        "name": "entity1",
        "type": "t_entity",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "First canonical entity"
      },
      {
        "name": "entity2",
        "type": "t_entity",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Second canonical entity"
      },
      {
        "name": "index1",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "First entity ID"
      },
      {
        "name": "index2",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Second entity ID"
      },
      {
        "name": "relation",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Relation"
      },
      {
        "name": "meta",
        "type": "json",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "[JSON](https://tools.ietf.org/html/rfc7159)-encoded metadata (object)"
      }
    ],
    "indexes": [
      {
        "name": "i_associations_entity2_index2",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "entity2",
          "index2"
        ],
        "def": "CREATE INDEX i_associations_entity2_index2 ON associations USING btree (entity2, index2)"
      },
      {
        "name": "pk_associations",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_associations ON associations USING btree (\"ID\")"
      },
      {
        "name": "u_associations_entity1_index1_entity2_index2",
        "unique": true,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "entity1",
          "index1",
          "entity2",
          "index2"
        ],
        "def": "CREATE UNIQUE INDEX u_associations_entity1_index1_entity2_index2 ON associations USING btree (entity1, index1, entity2, index2)"
      }
    ],
    "constraints": [
      {
        "name": "c_associations_entity",
        "type": "check",
        "domain": false,
        "def": "CHECK ((entity1 <> ALL (ARRAY['couponcodes'::t_entity, 'participants'::t_entity, 'records'::t_entity, 'stocktransactions'::t_entity])) AND (entity2 <> ALL (ARRAY['couponcodes'::t_entity, 'participants'::t_entity, 'records'::t_entity, 'stocktransactions'::t_entity])))"
      },
      {
        "name": "dc_associations_meta",
        "type": "check",
        "domain": true,
        "def": "CHECK (json_typeof(VALUE) = 'object'::text)"
      },
      {
        "name": "dc_associations_relation",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "pk_associations",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      },
      {
        "name": "u_associations_entity1_index1_entity2_index2",
        "type": "unique",
        "domain": false,
        "def": "UNIQUE (entity1, index1, entity2, index2)"
      }
    ],
    "triggers": [
      {
        "name": "tiu_associations_unique",
        "type": "before",
        "events": [
          "insert",
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_associations_unique",
        "def": "CREATE TRIGGER tiu_associations_unique BEFORE INSERT OR UPDATE OF entity1, entity2, index1, index2 ON associations FOR EACH ROW EXECUTE FUNCTION ftiu_associations_unique()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "binfiles",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Bin file ID"
      },
      {
        "name": "size",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Size in bytes"
      },
      {
        "name": "hash",
        "type": "bytea",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": "^\\\\x[a-f0-9]{32}$",
        "description": "[MD5](https://tools.ietf.org/html/rfc1321) hash of the content in hexadecimal notation prefixed with '\\x'"
      }
    ],
    "indexes": [
      {
        "name": "i_binfiles_hash",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "hash",
        "keys": [
          "hash"
        ],
        "def": "CREATE INDEX i_binfiles_hash ON binfiles USING hash (hash)"
      },
      {
        "name": "pk_binfiles",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID",
          "+size"
        ],
        "def": "CREATE UNIQUE INDEX pk_binfiles ON binfiles USING btree (\"ID\") INCLUDE (size)"
      }
    ],
    "constraints": [
      {
        "name": "dc_binfiles_hash",
        "type": "check",
        "domain": true,
        "def": "CHECK (bit_length(VALUE) = 128)"
      },
      {
        "name": "dc_binfiles_size",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE > 0)"
      },
      {
        "name": "pk_binfiles",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\") INCLUDE (size)"
      }
    ],
    "triggers": [
      {
        "name": "tu_binfiles",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ft_integrity",
        "def": "CREATE TRIGGER tu_binfiles BEFORE UPDATE ON binfiles FOR EACH ROW WHEN (old.* IS DISTINCT FROM new.*) EXECUTE FUNCTION ft_integrity()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "campaigns",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": true,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Campaign ID"
      },
      {
        "name": "fork",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_campaigns_fork",
            "table": "forks",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Fork ID (`null` for base module)"
      },
      {
        "name": "ownergroup",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_campaigns_ownergroup",
            "table": "groups",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Owner group ID (`null`=PUBLIC)"
      },
      {
        "name": "creator",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creator user ID (defaults to authenticated user on creation)"
      },
      {
        "name": "assigneduser",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_campaigns_assigneduser",
            "table": "users",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Assigned user ID"
      },
      {
        "name": "creationdate",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creation date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (defaults to current date and time on creation)"
      },
      {
        "name": "lastmodified",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Last modification date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (auto-reset on modification)"
      },
      {
        "name": "visibility",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Visibility (`0`=REGULAR, `1`=ARCHIVED, `2`=DELETED)"
      },
      {
        "name": "name",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Name"
      },
      {
        "name": "datefrom",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Start date as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time); must be less than or equal to `dateto`"
      },
      {
        "name": "dateto",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "End date as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time); must be greater than or equal to `datefrom`"
      },
      {
        "name": "status",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Status (`0`=DRAFT, `1`=NOTSTARTED, `2`=AWAITINGAPPROVAL, `3`=APPROVED, `4`=DISMISSED, `5`=ACTIVE, `6`=INACTIVE, `7`=INEVALUATION, `8`=CANCELLED, `9`=CLOSED)"
      },
      {
        "name": "description",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Detailed general description"
      }
    ],
    "indexes": [
      {
        "name": "fk_campaigns_assigneduser",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "assigneduser"
        ],
        "def": "CREATE INDEX fk_campaigns_assigneduser ON campaigns USING gin (assigneduser) WHERE assigneduser IS NOT NULL"
      },
      {
        "name": "fk_campaigns_fork",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "fork"
        ],
        "def": "CREATE INDEX fk_campaigns_fork ON campaigns USING gin (fork) WHERE fork IS NOT NULL"
      },
      {
        "name": "fk_campaigns_ownergroup",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "ownergroup"
        ],
        "def": "CREATE INDEX fk_campaigns_ownergroup ON campaigns USING gin (ownergroup)"
      },
      {
        "name": "i_campaigns_nofork",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "fork"
        ],
        "def": "CREATE INDEX i_campaigns_nofork ON campaigns USING gin (fork) WHERE fork IS NULL"
      },
      {
        "name": "i_campaigns_noowner",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "ownergroup"
        ],
        "def": "CREATE INDEX i_campaigns_noowner ON campaigns USING gin (ownergroup) WHERE ownergroup IS NULL"
      },
      {
        "name": "pk_campaigns",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_campaigns ON campaigns USING btree (\"ID\")"
      },
      {
        "name": "s_campaigns_name",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "name"
        ],
        "def": "CREATE INDEX s_campaigns_name ON campaigns USING gin (name gin_trgm_ops)"
      }
    ],
    "constraints": [
      {
        "name": "c_campaigns_date",
        "type": "check",
        "domain": false,
        "def": "CHECK (datefrom <= dateto)"
      },
      {
        "name": "dc_campaigns_description",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v\\r\\n]|[ \\t\\v\\r\\n]$'::text)"
      },
      {
        "name": "dc_campaigns_name",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^$|^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_campaigns_status",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0 AND VALUE <= 9)"
      },
      {
        "name": "dc_campaigns_visibility",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0 AND VALUE <= 2)"
      },
      {
        "name": "fk_campaigns_assigneduser",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (assigneduser) REFERENCES users(\"ID\") ON DELETE SET NULL DEFERRABLE"
      },
      {
        "name": "fk_campaigns_fork",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (fork) REFERENCES forks(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_campaigns_ownergroup",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (ownergroup) REFERENCES groups(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "pk_campaigns",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "categories",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": true,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Category ID"
      },
      {
        "name": "fork",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_categories_fork",
            "table": "forks",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Fork ID (`null` for base module)"
      },
      {
        "name": "owneruser",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_categories_owneruser",
            "table": "users",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Owner user ID (PUBLIC if `owneruser`=`null` and `ownergroup`=`null`)"
      },
      {
        "name": "ownergroup",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_categories_ownergroup",
            "table": "groups",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Owner group ID (PUBLIC if `owneruser`=`null` and `ownergroup`=`null`)"
      },
      {
        "name": "creator",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creator user ID (defaults to authenticated user on creation)"
      },
      {
        "name": "creationdate",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creation date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (defaults to current date and time on creation)"
      },
      {
        "name": "lastmodified",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "EXTRACT(epoch FROM now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Last modification date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (auto-reset on modification)"
      },
      {
        "name": "entity",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Canonical entity"
      },
      {
        "name": "name",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Name"
      }
    ],
    "indexes": [
      {
        "name": "i_categories_entity_name_root",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "entity",
          "name"
        ],
        "def": "CREATE INDEX i_categories_entity_name_root ON categories USING btree (entity, name text_pattern_ops) WHERE name::text !~~ '%/%'::text"
      },
      {
        "name": "i_categories_entity_name_sub",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "entity",
          "name"
        ],
        "def": "CREATE INDEX i_categories_entity_name_sub ON categories USING btree (entity, name text_pattern_ops) WHERE name::text ~~ '%/%'::text"
      },
      {
        "name": "i_categories_fork_entity_name_root",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "fork",
          "entity",
          "name"
        ],
        "def": "CREATE INDEX i_categories_fork_entity_name_root ON categories USING btree (fork, entity, name text_pattern_ops) WHERE name::text !~~ '%/%'::text"
      },
      {
        "name": "i_categories_fork_entity_name_sub",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "fork",
          "entity",
          "name"
        ],
        "def": "CREATE INDEX i_categories_fork_entity_name_sub ON categories USING btree (fork, entity, name text_pattern_ops) WHERE name::text ~~ '%/%'::text"
      },
      {
        "name": "pk_categories",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_categories ON categories USING btree (\"ID\")"
      },
      {
        "name": "u_categories_fork_entity_name_owneruser_ownergroup",
        "unique": true,
        "nullsdistinct": false,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "fork",
          "entity",
          "name",
          "owneruser",
          "ownergroup"
        ],
        "def": "CREATE UNIQUE INDEX u_categories_fork_entity_name_owneruser_ownergroup ON categories USING btree (fork, entity, name, owneruser, ownergroup) NULLS NOT DISTINCT"
      }
    ],
    "constraints": [
      {
        "name": "c_categories_owner",
        "type": "check",
        "domain": false,
        "def": "CHECK (owneruser IS NULL OR ownergroup IS NULL)"
      },
      {
        "name": "dc_categories_entity",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^$|^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_categories_name",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^$|^[ \\t\\v/]|[ \\t\\v/]$|[\\r\\n]|//'::text)"
      },
      {
        "name": "fk_categories_fork",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (fork) REFERENCES forks(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_categories_ownergroup",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (ownergroup) REFERENCES groups(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_categories_owneruser",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (owneruser) REFERENCES users(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "pk_categories",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      },
      {
        "name": "u_categories_fork_entity_name_owneruser_ownergroup",
        "type": "unique",
        "domain": false,
        "def": "UNIQUE NULLS NOT DISTINCT (fork, entity, name, owneruser, ownergroup)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "changes",
    "type": "table",
    "fields": [
      {
        "name": "entity",
        "type": "t_entity",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "user",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "date",
        "type": "double precision",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "type",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "identifier",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "transactionid",
        "type": "bytea",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "data",
        "type": "jsonb",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "extdata",
        "type": "jsonb",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "tags_add",
        "type": "text[]",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "tags_remove",
        "type": "text[]",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "binfiles",
        "type": "integer[]",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_changes_entity_identifier",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "entity",
          "identifier"
        ],
        "def": "CREATE INDEX i_changes_entity_identifier ON changes USING btree (entity, identifier) WHERE identifier <> ''::text"
      },
      {
        "name": "i_changes_transactionid",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "hash",
        "keys": [
          "transactionid"
        ],
        "def": "CREATE INDEX i_changes_transactionid ON changes USING hash (transactionid) WHERE transactionid IS NOT NULL"
      },
      {
        "name": "pk_changes",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "entity",
          "index",
          "date"
        ],
        "def": "CREATE UNIQUE INDEX pk_changes ON changes USING btree (entity, index, date)"
      }
    ],
    "constraints": [
      {
        "name": "c_changes_entity",
        "type": "check",
        "domain": false,
        "def": "CHECK (entity <> ALL (ARRAY['couponcodes'::t_entity, 'participants'::t_entity, 'records'::t_entity, 'stocktransactions'::t_entity]))"
      },
      {
        "name": "dc_changes_data",
        "type": "check",
        "domain": true,
        "def": "CHECK (jsonb_typeof(VALUE) = 'object'::text)"
      },
      {
        "name": "dc_changes_extdata",
        "type": "check",
        "domain": true,
        "def": "CHECK (jsonb_typeof(VALUE) = 'object'::text)"
      },
      {
        "name": "dc_changes_type",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0 AND VALUE <= 3)"
      },
      {
        "name": "pk_changes",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (entity, index, date)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "channels",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": true,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Channel ID"
      },
      {
        "name": "owneruser",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_channels_owneruser",
            "table": "users",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Owner user ID (PUBLIC if `owneruser`=`null` and `ownergroup`=`null`)"
      },
      {
        "name": "ownergroup",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_channels_ownergroup",
            "table": "groups",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Owner group ID (PUBLIC if `owneruser`=`null` and `ownergroup`=`null`)"
      },
      {
        "name": "creator",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creator user ID (defaults to authenticated user on creation)"
      },
      {
        "name": "creationdate",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creation date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (defaults to current date and time on creation)"
      },
      {
        "name": "lastmodified",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "EXTRACT(epoch FROM now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Last modification date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (auto-reset on modification)"
      },
      {
        "name": "activity",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Activity (`0`=ACTIVE, `1`=DEACTIVATED, `2`=DELETED)"
      },
      {
        "name": "name",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Name"
      },
      {
        "name": "description",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Detailed general description"
      }
    ],
    "indexes": [
      {
        "name": "fk_channels_ownergroup",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "ownergroup"
        ],
        "def": "CREATE INDEX fk_channels_ownergroup ON channels USING gin (ownergroup) WHERE ownergroup IS NOT NULL"
      },
      {
        "name": "fk_channels_owneruser",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "owneruser"
        ],
        "def": "CREATE INDEX fk_channels_owneruser ON channels USING gin (owneruser) WHERE owneruser IS NOT NULL"
      },
      {
        "name": "pk_channels",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_channels ON channels USING btree (\"ID\")"
      },
      {
        "name": "s_channels_name",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "name"
        ],
        "def": "CREATE INDEX s_channels_name ON channels USING gin (name gin_trgm_ops)"
      }
    ],
    "constraints": [
      {
        "name": "dc_channels_activity",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0 AND VALUE <= 2)"
      },
      {
        "name": "dc_channels_description",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v\\r\\n]|[ \\t\\v\\r\\n]$'::text)"
      },
      {
        "name": "dc_channels_name",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^$|^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "fk_channels_ownergroup",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (ownergroup) REFERENCES groups(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_channels_owneruser",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (owneruser) REFERENCES users(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "pk_channels",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "comments",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": true,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Comment ID"
      },
      {
        "name": "creator",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creator user ID (defaults to authenticated user on creation)"
      },
      {
        "name": "creationdate",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creation date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (defaults to current date and time on creation)"
      },
      {
        "name": "lastmodified",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "EXTRACT(epoch FROM now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Last modification date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (auto-reset on modification)"
      },
      {
        "name": "record",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_comments_record",
            "table": "records",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Record ID (**dependency**)"
      },
      {
        "name": "date",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "EXTRACT(epoch FROM now())",
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Designated date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (defaults to current date and time on creation)"
      },
      {
        "name": "sender",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Sender"
      },
      {
        "name": "text",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Comment text ([Markdown](https://en.wikipedia.org/wiki/Markdown) for rich text representation)"
      },
      {
        "name": "meta",
        "type": "json",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "[JSON](https://tools.ietf.org/html/rfc7159)-encoded metadata (object)"
      }
    ],
    "indexes": [
      {
        "name": "fk_comments_record",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "record"
        ],
        "def": "CREATE INDEX fk_comments_record ON comments USING btree (record)"
      },
      {
        "name": "i_comments_date",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "date"
        ],
        "def": "CREATE INDEX i_comments_date ON comments USING btree (date)"
      },
      {
        "name": "pk_comments",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_comments ON comments USING btree (\"ID\")"
      },
      {
        "name": "s_comments_text",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "text"
        ],
        "def": "CREATE INDEX s_comments_text ON comments USING gin (text gin_trgm_ops) WHERE text::text <> ''::text"
      }
    ],
    "constraints": [
      {
        "name": "dc_comments_meta",
        "type": "check",
        "domain": true,
        "def": "CHECK (json_typeof(VALUE) = 'object'::text)"
      },
      {
        "name": "dc_comments_sender",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_comments_text",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '[ \\t\\v\\r\\n]$'::text)"
      },
      {
        "name": "fk_comments_record",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (record) REFERENCES records(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "pk_comments",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "components",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": true,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Component ID"
      },
      {
        "name": "creator",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creator user ID (defaults to authenticated user on creation)"
      },
      {
        "name": "creationdate",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creation date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (defaults to current date and time on creation)"
      },
      {
        "name": "lastmodified",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Last modification date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (auto-reset on modification)"
      },
      {
        "name": "item",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_components_item",
            "table": "items",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Item ID (**dependency**)"
      },
      {
        "name": "component",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_components_component",
            "table": "items",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Component item ID; must be distinct from `item`"
      },
      {
        "name": "amount",
        "type": "double precision",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Amount (quantity)"
      },
      {
        "name": "price",
        "type": "double precision",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Imputed price per unit"
      },
      {
        "name": "fixed",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Fixed quantity"
      },
      {
        "name": "order",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "fk_components_component",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "component"
        ],
        "def": "CREATE INDEX fk_components_component ON components USING btree (component)"
      },
      {
        "name": "pk_components",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_components ON components USING btree (\"ID\")"
      },
      {
        "name": "u_components_item_component",
        "unique": true,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "item",
          "component"
        ],
        "def": "CREATE UNIQUE INDEX u_components_item_component ON components USING btree (item, component)"
      }
    ],
    "constraints": [
      {
        "name": "c_components_component",
        "type": "check",
        "domain": false,
        "def": "CHECK (item IS DISTINCT FROM component)"
      },
      {
        "name": "dc_components_order",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0)"
      },
      {
        "name": "fk_components_component",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (component) REFERENCES items(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_components_item",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (item) REFERENCES items(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "pk_components",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      },
      {
        "name": "u_components_item_component",
        "type": "unique",
        "domain": false,
        "def": "UNIQUE (item, component)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "contacts",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": true,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Contact ID"
      },
      {
        "name": "fork",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_contacts_fork",
            "table": "forks",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Fork ID (`null` for base module)"
      },
      {
        "name": "owneruser",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_contacts_owneruser",
            "table": "users",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Owner user ID (PUBLIC if `owneruser`=`null` and `ownergroup`=`null`)"
      },
      {
        "name": "ownergroup",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_contacts_ownergroup",
            "table": "groups",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Owner group ID (PUBLIC if `owneruser`=`null` and `ownergroup`=`null`)"
      },
      {
        "name": "creator",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creator user ID (defaults to authenticated user on creation)"
      },
      {
        "name": "assigneduser",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_contacts_assigneduser",
            "table": "users",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Assigned user ID"
      },
      {
        "name": "creationdate",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creation date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (defaults to current date and time on creation)"
      },
      {
        "name": "lastmodified",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Last modification date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (auto-reset on modification)"
      },
      {
        "name": "davserver",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_contacts_davserver",
            "table": "davservers",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "DAV server ID"
      },
      {
        "name": "picbinfile",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_contacts_picbinfile",
            "table": "binfiles",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Binary file ID; is read-only (not for `PUT` or `PATCH`)"
      },
      {
        "name": "visibility",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Visibility (`0`=REGULAR, `1`=ARCHIVED, `2`=DELETED)"
      },
      {
        "name": "lastname",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Last name (surname or company name); is required if `firstname` is empty"
      },
      {
        "name": "firstname",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "First name (given name); is required if `lastname` is empty"
      },
      {
        "name": "type",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Contact type (`0`=COMPANY, `1`=PERSON)"
      },
      {
        "name": "title",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Title or salutation; only for PERSON"
      },
      {
        "name": "company",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Company name; only for PERSON"
      },
      {
        "name": "position",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Position or job title; only for PERSON"
      },
      {
        "name": "department",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Department; only for PERSON"
      },
      {
        "name": "address",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Address (street and building/suite number)"
      },
      {
        "name": "postalcode",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Postal or ZIP code"
      },
      {
        "name": "city",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "City or locality"
      },
      {
        "name": "region",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Region or state"
      },
      {
        "name": "country",
        "type": "character varying(2)",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": "^([A-Z]{2})?$",
        "description": "Country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2))"
      },
      {
        "name": "phone",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Primary phone number"
      },
      {
        "name": "phone2",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Secondary phone number"
      },
      {
        "name": "cell",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Cell phone number"
      },
      {
        "name": "fax",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Fax number"
      },
      {
        "name": "email",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Primary e-mail address"
      },
      {
        "name": "email2",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Secondary e-mail address"
      },
      {
        "name": "website",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Website URL"
      },
      {
        "name": "birthdate",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Birth date as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time); only for PERSON"
      },
      {
        "name": "description",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Detailed general description"
      }
    ],
    "indexes": [
      {
        "name": "fk_contacts_assigneduser",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "assigneduser"
        ],
        "def": "CREATE INDEX fk_contacts_assigneduser ON contacts USING gin (assigneduser) WHERE assigneduser IS NOT NULL"
      },
      {
        "name": "fk_contacts_davserver",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "davserver"
        ],
        "def": "CREATE INDEX fk_contacts_davserver ON contacts USING gin (davserver) WHERE davserver IS NOT NULL"
      },
      {
        "name": "fk_contacts_fork",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "fork"
        ],
        "def": "CREATE INDEX fk_contacts_fork ON contacts USING gin (fork) WHERE fork IS NOT NULL"
      },
      {
        "name": "fk_contacts_ownergroup",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "ownergroup"
        ],
        "def": "CREATE INDEX fk_contacts_ownergroup ON contacts USING gin (ownergroup) WHERE ownergroup IS NOT NULL"
      },
      {
        "name": "fk_contacts_owneruser",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "owneruser"
        ],
        "def": "CREATE INDEX fk_contacts_owneruser ON contacts USING gin (owneruser) WHERE owneruser IS NOT NULL"
      },
      {
        "name": "fk_contacts_picbinfile",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "picbinfile"
        ],
        "def": "CREATE INDEX fk_contacts_picbinfile ON contacts USING btree (picbinfile) WHERE picbinfile IS NOT NULL"
      },
      {
        "name": "i_contacts_lastname_firstname",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "lastname",
          "firstname"
        ],
        "def": "CREATE INDEX i_contacts_lastname_firstname ON contacts USING btree (lastname, firstname)"
      },
      {
        "name": "i_contacts_nofork",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "fork"
        ],
        "def": "CREATE INDEX i_contacts_nofork ON contacts USING gin (fork) WHERE fork IS NULL"
      },
      {
        "name": "i_contacts_noowner",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "ownergroup"
        ],
        "def": "CREATE INDEX i_contacts_noowner ON contacts USING gin (ownergroup) WHERE owneruser IS NULL AND ownergroup IS NULL"
      },
      {
        "name": "pk_contacts",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_contacts ON contacts USING btree (\"ID\")"
      },
      {
        "name": "s_contacts_company",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "company"
        ],
        "def": "CREATE INDEX s_contacts_company ON contacts USING gin (company gin_trgm_ops) WHERE company::text <> ''::text"
      },
      {
        "name": "s_contacts_email",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "email"
        ],
        "def": "CREATE INDEX s_contacts_email ON contacts USING gin (email gin_trgm_ops) WHERE email::text <> ''::text"
      },
      {
        "name": "s_contacts_email2",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "email2"
        ],
        "def": "CREATE INDEX s_contacts_email2 ON contacts USING gin (email2 gin_trgm_ops) WHERE email2::text <> ''::text"
      },
      {
        "name": "s_contacts_firstname",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "firstname"
        ],
        "def": "CREATE INDEX s_contacts_firstname ON contacts USING gin (firstname gin_trgm_ops) WHERE firstname::text <> ''::text"
      },
      {
        "name": "s_contacts_lastname",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "lastname"
        ],
        "def": "CREATE INDEX s_contacts_lastname ON contacts USING gin (lastname gin_trgm_ops) WHERE lastname::text <> ''::text"
      }
    ],
    "constraints": [
      {
        "name": "c_contacts_name",
        "type": "check",
        "domain": false,
        "def": "CHECK (lastname::text <> ''::text OR firstname::text <> ''::text)"
      },
      {
        "name": "c_contacts_owner",
        "type": "check",
        "domain": false,
        "def": "CHECK (owneruser IS NULL OR ownergroup IS NULL)"
      },
      {
        "name": "c_contacts_type",
        "type": "check",
        "domain": false,
        "def": "CHECK (type::smallint = 1 OR title::text = ''::text AND company::text = ''::text AND \"position\"::text = ''::text AND department::text = ''::text AND birthdate IS NULL)"
      },
      {
        "name": "dc_contacts_address",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v\\r\\n]|[ \\t\\v\\r\\n]$'::text)"
      },
      {
        "name": "dc_contacts_cell",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_contacts_city",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_contacts_company",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_contacts_country",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE::text ~ '^([A-Z]{2})?$'::text)"
      },
      {
        "name": "dc_contacts_department",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_contacts_description",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v\\r\\n]|[ \\t\\v\\r\\n]$'::text)"
      },
      {
        "name": "dc_contacts_email",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_contacts_email2",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_contacts_fax",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_contacts_firstname",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_contacts_lastname",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_contacts_phone",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_contacts_phone2",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_contacts_position",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_contacts_postalcode",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_contacts_region",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_contacts_title",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_contacts_type",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0 AND VALUE <= 1)"
      },
      {
        "name": "dc_contacts_visibility",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0 AND VALUE <= 2)"
      },
      {
        "name": "dc_contacts_website",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "fk_contacts_assigneduser",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (assigneduser) REFERENCES users(\"ID\") ON DELETE SET NULL DEFERRABLE"
      },
      {
        "name": "fk_contacts_davserver",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (davserver) REFERENCES davservers(\"ID\") ON DELETE SET NULL DEFERRABLE"
      },
      {
        "name": "fk_contacts_fork",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (fork) REFERENCES forks(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_contacts_ownergroup",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (ownergroup) REFERENCES groups(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_contacts_owneruser",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (owneruser) REFERENCES users(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_contacts_picbinfile",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (picbinfile) REFERENCES binfiles(\"ID\") DEFERRABLE"
      },
      {
        "name": "pk_contacts",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "contacts2contacts",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": true,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Contact-to-contact ID"
      },
      {
        "name": "creator",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creator user ID (defaults to authenticated user on creation)"
      },
      {
        "name": "creationdate",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creation date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (defaults to current date and time on creation)"
      },
      {
        "name": "lastmodified",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "EXTRACT(epoch FROM now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Last modification date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (auto-reset on modification)"
      },
      {
        "name": "contact1",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_contacts2contacts_contact1",
            "table": "contacts",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "First contact ID (**dependency**)"
      },
      {
        "name": "contact2",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_contacts2contacts_contact2",
            "table": "contacts",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Second contact ID (**dependency**)"
      }
    ],
    "indexes": [
      {
        "name": "fk_contacts2contacts_contact2",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "contact2"
        ],
        "def": "CREATE INDEX fk_contacts2contacts_contact2 ON contacts2contacts USING btree (contact2)"
      },
      {
        "name": "pk_contacts2contacts",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_contacts2contacts ON contacts2contacts USING btree (\"ID\")"
      },
      {
        "name": "u_contacts2contacts_contact1_contact2",
        "unique": true,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "contact1",
          "contact2"
        ],
        "def": "CREATE UNIQUE INDEX u_contacts2contacts_contact1_contact2 ON contacts2contacts USING btree (contact1, contact2)"
      }
    ],
    "constraints": [
      {
        "name": "fk_contacts2contacts_contact1",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (contact1) REFERENCES contacts(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_contacts2contacts_contact2",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (contact2) REFERENCES contacts(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "pk_contacts2contacts",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      },
      {
        "name": "u_contacts2contacts_contact1_contact2",
        "type": "unique",
        "domain": false,
        "def": "UNIQUE (contact1, contact2)"
      }
    ],
    "triggers": [
      {
        "name": "tiu_contacts2contacts_unique",
        "type": "before",
        "events": [
          "insert",
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_contacts2contacts_unique",
        "def": "CREATE TRIGGER tiu_contacts2contacts_unique BEFORE INSERT OR UPDATE OF contact1, contact2 ON contacts2contacts FOR EACH ROW EXECUTE FUNCTION ftiu_contacts2contacts_unique()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "contracts",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": true,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Contract ID"
      },
      {
        "name": "fork",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_contracts_fork",
            "table": "forks",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Fork ID (`null` for base module)"
      },
      {
        "name": "ownergroup",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_contracts_ownergroup",
            "table": "groups",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Owner group ID (`null`=PUBLIC)"
      },
      {
        "name": "creator",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creator user ID (defaults to authenticated user on creation)"
      },
      {
        "name": "assigneduser",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_contracts_assigneduser",
            "table": "users",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Assigned user ID"
      },
      {
        "name": "creationdate",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creation date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (defaults to current date and time on creation)"
      },
      {
        "name": "lastmodified",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Last modification date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (auto-reset on modification)"
      },
      {
        "name": "account",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_contracts_account",
            "table": "accounts",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Account ID"
      },
      {
        "name": "visibility",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Visibility (`0`=REGULAR, `1`=ARCHIVED, `2`=DELETED)"
      },
      {
        "name": "name",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Name"
      },
      {
        "name": "contractnum",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Contract number"
      },
      {
        "name": "date",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "EXTRACT(epoch FROM now())",
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Designated date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (defaults to current date and time on creation)"
      },
      {
        "name": "datefrom",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Start date as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time); must be less than or equal to `dateto`"
      },
      {
        "name": "dateto",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "End date as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time); must be greater than or equal to `datefrom`"
      },
      {
        "name": "datecancel",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Cancellation date as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time)"
      },
      {
        "name": "status",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Status (`0`=DRAFT, `1`=AWAITINGAPPROVAL, `2`=APPROVED, `3`=DISMISSED, `4`=ACTIVE, `5`=INACTIVE, `6`=EXPIRED, `7`=CANCELLED, `8`=CLOSED)"
      },
      {
        "name": "currency",
        "type": "character varying(3)",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": "^[A-Z]{3}$",
        "description": "Currency code ([ISO 4217](https://en.wikipedia.org/wiki/ISO_4217))"
      },
      {
        "name": "exchangerate",
        "type": "double precision",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "1",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Exchange rate as a multiple of one monetary unit of the fixed system currency"
      },
      {
        "name": "billingcycle",
        "type": "smallint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Billing cycle in months"
      },
      {
        "name": "lastbilling",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Last billing date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time)"
      },
      {
        "name": "description",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Detailed general description"
      },
      {
        "name": "contractitems",
        "type": "json",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "[JSON](https://tools.ietf.org/html/rfc7159)-encoded items (array)"
      },
      {
        "name": "billingitems",
        "type": "json",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "[JSON](https://tools.ietf.org/html/rfc7159)-encoded items (array)"
      },
      {
        "name": "procurementitems",
        "type": "json",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "[JSON](https://tools.ietf.org/html/rfc7159)-encoded items (array)"
      },
      {
        "name": "autobilling",
        "type": "json",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "[JSON](https://tools.ietf.org/html/rfc7159)-encoded auto-billing data (object); only if `billingcycle` is not `null`"
      }
    ],
    "indexes": [
      {
        "name": "fk_contracts_account",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "account"
        ],
        "def": "CREATE INDEX fk_contracts_account ON contracts USING btree (account) WHERE account IS NOT NULL"
      },
      {
        "name": "fk_contracts_assigneduser",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "assigneduser"
        ],
        "def": "CREATE INDEX fk_contracts_assigneduser ON contracts USING gin (assigneduser) WHERE assigneduser IS NOT NULL"
      },
      {
        "name": "fk_contracts_fork",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "fork"
        ],
        "def": "CREATE INDEX fk_contracts_fork ON contracts USING gin (fork) WHERE fork IS NOT NULL"
      },
      {
        "name": "fk_contracts_ownergroup",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "ownergroup"
        ],
        "def": "CREATE INDEX fk_contracts_ownergroup ON contracts USING gin (ownergroup)"
      },
      {
        "name": "i_contracts_autobilling",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "status"
        ],
        "def": "CREATE INDEX i_contracts_autobilling ON contracts USING gin (status) WHERE autobilling IS NOT NULL"
      },
      {
        "name": "i_contracts_date",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "date"
        ],
        "def": "CREATE INDEX i_contracts_date ON contracts USING btree (date DESC)"
      },
      {
        "name": "i_contracts_nofork",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "fork"
        ],
        "def": "CREATE INDEX i_contracts_nofork ON contracts USING gin (fork) WHERE fork IS NULL"
      },
      {
        "name": "i_contracts_noowner",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "ownergroup"
        ],
        "def": "CREATE INDEX i_contracts_noowner ON contracts USING gin (ownergroup) WHERE ownergroup IS NULL"
      },
      {
        "name": "pk_contracts",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_contracts ON contracts USING btree (\"ID\")"
      },
      {
        "name": "s_contracts_contractnum",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "contractnum"
        ],
        "def": "CREATE INDEX s_contracts_contractnum ON contracts USING gin (contractnum gin_trgm_ops) WHERE contractnum::text <> ''::text"
      },
      {
        "name": "s_contracts_name",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "name"
        ],
        "def": "CREATE INDEX s_contracts_name ON contracts USING gin (name gin_trgm_ops)"
      }
    ],
    "constraints": [
      {
        "name": "c_contracts_date",
        "type": "check",
        "domain": false,
        "def": "CHECK (datefrom <= dateto)"
      },
      {
        "name": "dc_contracts_autobilling",
        "type": "check",
        "domain": true,
        "def": "CHECK (json_typeof(VALUE) = 'object'::text AND VALUE::jsonb <> '{}'::jsonb)"
      },
      {
        "name": "dc_contracts_billingcycle",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE > 0)"
      },
      {
        "name": "dc_contracts_billingitems",
        "type": "check",
        "domain": true,
        "def": "CHECK (json_typeof(VALUE) = 'array'::text)"
      },
      {
        "name": "dc_contracts_contractitems",
        "type": "check",
        "domain": true,
        "def": "CHECK (json_typeof(VALUE) = 'array'::text)"
      },
      {
        "name": "dc_contracts_contractnum",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_contracts_currency",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE::text ~ '^[A-Z]{3}$'::text)"
      },
      {
        "name": "dc_contracts_description",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v\\r\\n]|[ \\t\\v\\r\\n]$'::text)"
      },
      {
        "name": "dc_contracts_exchangerate",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE > 0::double precision)"
      },
      {
        "name": "dc_contracts_name",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^$|^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_contracts_procurementitems",
        "type": "check",
        "domain": true,
        "def": "CHECK (json_typeof(VALUE) = 'array'::text)"
      },
      {
        "name": "dc_contracts_status",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0 AND VALUE <= 8)"
      },
      {
        "name": "dc_contracts_visibility",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0 AND VALUE <= 2)"
      },
      {
        "name": "fk_contracts_account",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (account) REFERENCES accounts(\"ID\") ON DELETE SET NULL DEFERRABLE"
      },
      {
        "name": "fk_contracts_assigneduser",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (assigneduser) REFERENCES users(\"ID\") ON DELETE SET NULL DEFERRABLE"
      },
      {
        "name": "fk_contracts_fork",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (fork) REFERENCES forks(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_contracts_ownergroup",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (ownergroup) REFERENCES groups(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "pk_contracts",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "couponcodes",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": true,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Coupon code ID"
      },
      {
        "name": "creator",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creator user ID (defaults to authenticated user on creation)"
      },
      {
        "name": "creationdate",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creation date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (defaults to current date and time on creation)"
      },
      {
        "name": "lastmodified",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Last modification date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (auto-reset on modification)"
      },
      {
        "name": "coupon",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_couponcodes_coupon",
            "table": "coupons",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Coupon ID (**dependency**)"
      },
      {
        "name": "transaction",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_couponcodes_transaction",
            "table": "transactions",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Transaction ID"
      },
      {
        "name": "flag",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Flag (`0`=BOOKED, `1`=RESERVED, `2`=CANCELLED)"
      },
      {
        "name": "date",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Designated date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (defaults to current date and time on creation)"
      },
      {
        "name": "code",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Coupon code"
      },
      {
        "name": "value",
        "type": "double precision",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Value"
      },
      {
        "name": "datefrom",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Start date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time); must be less than or equal to `dateto`"
      },
      {
        "name": "dateto",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "End date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time); must be greater than or equal to `datefrom`"
      }
    ],
    "indexes": [
      {
        "name": "fk_couponcodes_coupon",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "coupon"
        ],
        "def": "CREATE INDEX fk_couponcodes_coupon ON couponcodes USING gin (coupon)"
      },
      {
        "name": "fk_couponcodes_transaction",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "transaction"
        ],
        "def": "CREATE INDEX fk_couponcodes_transaction ON couponcodes USING btree (transaction) WHERE transaction IS NOT NULL"
      },
      {
        "name": "i_couponcodes_code",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "code"
        ],
        "def": "CREATE INDEX i_couponcodes_code ON couponcodes USING btree (code)"
      },
      {
        "name": "pk_couponcodes",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_couponcodes ON couponcodes USING btree (\"ID\")"
      },
      {
        "name": "s_couponcodes_code",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "code"
        ],
        "def": "CREATE INDEX s_couponcodes_code ON couponcodes USING gin (code gin_trgm_ops)"
      }
    ],
    "constraints": [
      {
        "name": "c_couponcodes_date",
        "type": "check",
        "domain": false,
        "def": "CHECK (datefrom <= dateto)"
      },
      {
        "name": "dc_couponcodes_code",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^$|^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_couponcodes_flag",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0 AND VALUE <= 2)"
      },
      {
        "name": "fk_couponcodes_coupon",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (coupon) REFERENCES coupons(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_couponcodes_transaction",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (transaction) REFERENCES transactions(\"ID\") ON DELETE SET NULL DEFERRABLE"
      },
      {
        "name": "pk_couponcodes",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      }
    ],
    "triggers": [
      {
        "name": "ti_couponcodes_unique",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_couponcodes_unique",
        "def": "CREATE TRIGGER ti_couponcodes_unique BEFORE INSERT ON couponcodes FOR EACH ROW EXECUTE FUNCTION ftiu_couponcodes_unique()"
      },
      {
        "name": "tu_couponcodes_unique",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_couponcodes_unique",
        "def": "CREATE TRIGGER tu_couponcodes_unique BEFORE UPDATE OF coupon, code ON couponcodes FOR EACH ROW WHEN (old.coupon IS DISTINCT FROM new.coupon OR old.code::text <> new.code::text) EXECUTE FUNCTION ftiu_couponcodes_unique()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "coupons",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": true,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Coupon ID"
      },
      {
        "name": "fork",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_coupons_fork",
            "table": "forks",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Fork ID (`null` for base module)"
      },
      {
        "name": "ownergroup",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_coupons_ownergroup",
            "table": "groups",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Owner group ID (`null`=PUBLIC)"
      },
      {
        "name": "creator",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creator user ID (defaults to authenticated user on creation)"
      },
      {
        "name": "creationdate",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creation date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (defaults to current date and time on creation)"
      },
      {
        "name": "lastmodified",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Last modification date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (auto-reset on modification)"
      },
      {
        "name": "activity",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Activity (`0`=ACTIVE, `1`=DEACTIVATED, `2`=DELETED)"
      },
      {
        "name": "name",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Name"
      },
      {
        "name": "type",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Coupon type (`0`=PROMOTION, `1`=INDIVIDUAL)"
      },
      {
        "name": "code",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Promotion code; only for PROMOTION"
      },
      {
        "name": "value",
        "type": "double precision",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Default value"
      },
      {
        "name": "taxrate",
        "type": "double precision",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Tax rate in percent"
      },
      {
        "name": "neutral",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Neutral in transaction"
      },
      {
        "name": "datefrom",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Start date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time); must be less than or equal to `dateto`"
      },
      {
        "name": "dateto",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "End date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time); must be greater than or equal to `datefrom`"
      },
      {
        "name": "description",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Detailed general description"
      },
      {
        "name": "foreigntaxrates",
        "type": "json",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Country-specific tax rates in percent; use country code as object key"
      }
    ],
    "indexes": [
      {
        "name": "fk_coupons_fork",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "fork"
        ],
        "def": "CREATE INDEX fk_coupons_fork ON coupons USING gin (fork) WHERE fork IS NOT NULL"
      },
      {
        "name": "fk_coupons_ownergroup",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "ownergroup"
        ],
        "def": "CREATE INDEX fk_coupons_ownergroup ON coupons USING gin (ownergroup)"
      },
      {
        "name": "i_coupons_nofork",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "fork"
        ],
        "def": "CREATE INDEX i_coupons_nofork ON coupons USING gin (fork) WHERE fork IS NULL"
      },
      {
        "name": "i_coupons_noowner",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "ownergroup"
        ],
        "def": "CREATE INDEX i_coupons_noowner ON coupons USING gin (ownergroup) WHERE ownergroup IS NULL"
      },
      {
        "name": "pk_coupons",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_coupons ON coupons USING btree (\"ID\")"
      },
      {
        "name": "s_coupons_name",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "name"
        ],
        "def": "CREATE INDEX s_coupons_name ON coupons USING gin (name gin_trgm_ops)"
      },
      {
        "name": "u_coupons_code",
        "unique": true,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "code"
        ],
        "def": "CREATE UNIQUE INDEX u_coupons_code ON coupons USING btree (code) WHERE code::text <> ''::text"
      }
    ],
    "constraints": [
      {
        "name": "c_coupons_date",
        "type": "check",
        "domain": false,
        "def": "CHECK (datefrom <= dateto)"
      },
      {
        "name": "c_coupons_type",
        "type": "check",
        "domain": false,
        "def": "CHECK (\nCASE type\n    WHEN 0 THEN code::text <> ''::text\n    ELSE code::text = ''::text\nEND)"
      },
      {
        "name": "dc_coupons_activity",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0 AND VALUE <= 2)"
      },
      {
        "name": "dc_coupons_code",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_coupons_description",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v\\r\\n]|[ \\t\\v\\r\\n]$'::text)"
      },
      {
        "name": "dc_coupons_foreigntaxrates",
        "type": "check",
        "domain": true,
        "def": "CHECK (json_typeof(VALUE) = 'object'::text)"
      },
      {
        "name": "dc_coupons_name",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^$|^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_coupons_taxrate",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0::double precision AND VALUE <= 100::double precision)"
      },
      {
        "name": "dc_coupons_type",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0 AND VALUE <= 1)"
      },
      {
        "name": "fk_coupons_fork",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (fork) REFERENCES forks(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_coupons_ownergroup",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (ownergroup) REFERENCES groups(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "pk_coupons",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      }
    ],
    "triggers": [
      {
        "name": "tiu_coupons_unique",
        "type": "before",
        "events": [
          "insert",
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_coupons_unique",
        "def": "CREATE TRIGGER tiu_coupons_unique BEFORE INSERT OR UPDATE OF code ON coupons FOR EACH ROW WHEN (new.code::text <> ''::text) EXECUTE FUNCTION ftiu_coupons_unique()"
      },
      {
        "name": "tu_coupons_type",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ft_integrity",
        "def": "CREATE TRIGGER tu_coupons_type BEFORE UPDATE OF type ON coupons FOR EACH ROW WHEN (old.type::smallint <> new.type::smallint) EXECUTE FUNCTION ft_integrity()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "cpu",
    "type": "table",
    "fields": [
      {
        "name": "date",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "application",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "type",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "count",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "u_cpu_application_date_type",
        "unique": true,
        "nullsdistinct": false,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "application",
          "date",
          "type"
        ],
        "def": "CREATE UNIQUE INDEX u_cpu_application_date_type ON cpu USING btree (application, date DESC, type) NULLS NOT DISTINCT"
      }
    ],
    "constraints": [
      {
        "name": "dc_cpu_count",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE > 0)"
      },
      {
        "name": "dc_cpu_type",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0 AND VALUE <= 7)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "cpucollector",
    "type": "table",
    "fields": [
      {
        "name": "index",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "count",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "type",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "start",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "ticks",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "pk_cpucollector",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "index",
          "type"
        ],
        "def": "CREATE UNIQUE INDEX pk_cpucollector ON cpucollector USING btree (index, type)"
      }
    ],
    "constraints": [
      {
        "name": "pk_cpucollector",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (index, type)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "customfields",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": true,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Custom field ID"
      },
      {
        "name": "creator",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creator user ID (defaults to authenticated user on creation)"
      },
      {
        "name": "creationdate",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "EXTRACT(epoch FROM now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creation date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (defaults to current date and time on creation)"
      },
      {
        "name": "lastmodified",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "EXTRACT(epoch FROM now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Last modification date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (auto-reset on modification)"
      },
      {
        "name": "activity",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Activity (`0`=ACTIVE, `1`=DEACTIVATED, `2`=DELETED)"
      },
      {
        "name": "name",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Name"
      },
      {
        "name": "identifier",
        "type": "character varying(200)",
        "storage": "main",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": "^[a-zA-Z0-9]([a-zA-Z0-9_.-]*[a-zA-Z0-9])?$",
        "description": "Unique field identifier"
      },
      {
        "name": "context",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Context (mainly entity)"
      },
      {
        "name": "source",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Data source (`0`=EXTDATA, `1`=TAGS, `2`=INTERNAL)"
      },
      {
        "name": "reference",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Data reference (extdata field name or tag name)"
      },
      {
        "name": "indexed",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Indexed"
      },
      {
        "name": "type",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Data type"
      },
      {
        "name": "entity",
        "type": "t_entity",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Canonical entity; only for `type`=`entity`"
      },
      {
        "name": "options",
        "type": "json",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "[JSON](https://tools.ietf.org/html/rfc7159)-encoded option values and labels (array or object); only relevant for `type`=`list`"
      },
      {
        "name": "langaliases",
        "type": "json",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "[JSON](https://tools.ietf.org/html/rfc7159)-encoded language-specific aliases (object); use language code as object key"
      },
      {
        "name": "pattern",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "pk_customfields",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_customfields ON customfields USING btree (\"ID\")"
      },
      {
        "name": "s_customfields_context",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "context"
        ],
        "def": "CREATE INDEX s_customfields_context ON customfields USING gin (context gin_trgm_ops)"
      },
      {
        "name": "s_customfields_identifier",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "identifier"
        ],
        "def": "CREATE INDEX s_customfields_identifier ON customfields USING gin (identifier gin_trgm_ops)"
      },
      {
        "name": "s_customfields_name",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "name"
        ],
        "def": "CREATE INDEX s_customfields_name ON customfields USING gin (name gin_trgm_ops)"
      },
      {
        "name": "s_customfields_reference",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "reference"
        ],
        "def": "CREATE INDEX s_customfields_reference ON customfields USING gin (reference gin_trgm_ops)"
      },
      {
        "name": "u_customfields_identifier",
        "unique": true,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "identifier"
        ],
        "def": "CREATE UNIQUE INDEX u_customfields_identifier ON customfields USING btree (identifier)"
      }
    ],
    "constraints": [
      {
        "name": "c_customfields_entity",
        "type": "check",
        "domain": false,
        "def": "CHECK (\nCASE type\n    WHEN 'entity'::text THEN entity IS NOT NULL AND (entity <> ALL (ARRAY['couponcodes'::t_entity, 'participants'::t_entity, 'records'::t_entity, 'stocktransactions'::t_entity]))\n    ELSE entity IS NULL\nEND)"
      },
      {
        "name": "c_customfields_type",
        "type": "check",
        "domain": false,
        "def": "CHECK (type::text = ''::text OR\nCASE source\n    WHEN 1 THEN type::text = ANY (ARRAY['checked'::text, 'count'::text, 'isset'::text, 'text'::text])\n    ELSE type::text = ANY (ARRAY['checked'::text, 'count'::text, 'country'::text, 'currency'::text, 'date'::text, 'datepretty'::text, 'datetime'::text, 'datetimepretty'::text, 'duration'::text, 'email'::text, 'entity'::text, 'filetype'::text, 'isset'::text, 'list'::text, 'money'::text, 'num'::text, 'password'::text, 'percent'::text, 'price'::text, 'pricebilling'::text, 'priceprocurement'::text, 'priceproduction'::text, 'priority'::text, 'progress'::text, 'rate'::text, 'size'::text, 'tel'::text, 'text'::text, 'timing'::text, 'unit'::text, 'url'::text, 'weight'::text])\nEND)"
      },
      {
        "name": "dc_customfields_activity",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0 AND VALUE <= 2)"
      },
      {
        "name": "dc_customfields_context",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^$|^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_customfields_identifier",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE::text ~ '^[a-zA-Z0-9]([a-zA-Z0-9_.-]*[a-zA-Z0-9])?$'::text)"
      },
      {
        "name": "dc_customfields_langaliases",
        "type": "check",
        "domain": true,
        "def": "CHECK (json_typeof(VALUE) = 'object'::text)"
      },
      {
        "name": "dc_customfields_name",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^$|^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_customfields_options",
        "type": "check",
        "domain": true,
        "def": "CHECK (json_typeof(VALUE) = ANY (ARRAY['array'::text, 'object'::text]))"
      },
      {
        "name": "dc_customfields_pattern",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_customfields_reference",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^$|^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_customfields_source",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0 AND VALUE <= 2)"
      },
      {
        "name": "pk_customfields",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      },
      {
        "name": "u_customfields_identifier",
        "type": "unique",
        "domain": false,
        "def": "UNIQUE (identifier)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "davids",
    "type": "table",
    "fields": [
      {
        "name": "davserver",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_davids_davserver",
            "table": "davservers",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": null
      },
      {
        "name": "contact",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_davids_contact",
            "table": "contacts",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": null
      },
      {
        "name": "appointment",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_davids_appointment",
            "table": "appointments",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": null
      },
      {
        "name": "task",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_davids_task",
            "table": "tasks",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": null
      },
      {
        "name": "href",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "etag",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "vobject",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "pk_davids",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "davserver",
          "href"
        ],
        "def": "CREATE UNIQUE INDEX pk_davids ON davids USING btree (davserver, href)"
      },
      {
        "name": "u_davids_davserver_appointment",
        "unique": true,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "davserver",
          "appointment"
        ],
        "def": "CREATE UNIQUE INDEX u_davids_davserver_appointment ON davids USING btree (davserver, appointment) WHERE appointment IS NOT NULL"
      },
      {
        "name": "u_davids_davserver_contact",
        "unique": true,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "davserver",
          "contact"
        ],
        "def": "CREATE UNIQUE INDEX u_davids_davserver_contact ON davids USING btree (davserver, contact) WHERE contact IS NOT NULL"
      },
      {
        "name": "u_davids_davserver_task",
        "unique": true,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "davserver",
          "task"
        ],
        "def": "CREATE UNIQUE INDEX u_davids_davserver_task ON davids USING btree (davserver, task) WHERE task IS NOT NULL"
      }
    ],
    "constraints": [
      {
        "name": "c_davids_association",
        "type": "check",
        "domain": false,
        "def": "CHECK (num_nonnulls(contact, appointment, task) <= 1)"
      },
      {
        "name": "c_davids_vobject",
        "type": "check",
        "domain": false,
        "def": "CHECK (vobject::text <> ''::text OR etag::text = ''::text)"
      },
      {
        "name": "dc_davids_href",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE <> ''::text)"
      },
      {
        "name": "fk_davids_appointment",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (appointment) REFERENCES appointments(\"ID\") ON DELETE SET NULL DEFERRABLE"
      },
      {
        "name": "fk_davids_contact",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (contact) REFERENCES contacts(\"ID\") ON DELETE SET NULL DEFERRABLE"
      },
      {
        "name": "fk_davids_davserver",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (davserver) REFERENCES davservers(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_davids_task",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (task) REFERENCES tasks(\"ID\") ON DELETE SET NULL DEFERRABLE"
      },
      {
        "name": "pk_davids",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (davserver, href)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "davservers",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": true,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "DAV server ID"
      },
      {
        "name": "owneruser",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_davservers_owneruser",
            "table": "users",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Owner user ID (PUBLIC if `owneruser`=`null` and `ownergroup`=`null`)"
      },
      {
        "name": "ownergroup",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_davservers_ownergroup",
            "table": "groups",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Owner group ID (PUBLIC if `owneruser`=`null` and `ownergroup`=`null`)"
      },
      {
        "name": "creator",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creator user ID (defaults to authenticated user on creation)"
      },
      {
        "name": "creationdate",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creation date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (defaults to current date and time on creation)"
      },
      {
        "name": "lastmodified",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Last modification date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (auto-reset on modification)"
      },
      {
        "name": "recipientuser",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [
          {
            "name": "fk_davservers_recipientuser",
            "table": "users",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Recipient user ID (PUBLIC if `recipientuser`=`null` and `recipientgroup`=`null`)"
      },
      {
        "name": "recipientgroup",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [
          {
            "name": "fk_davservers_recipientgroup",
            "table": "groups",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Recipient group ID (PUBLIC if `recipientuser`=`null` and `recipientgroup`=`null`)"
      },
      {
        "name": "activity",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Activity (`0`=ACTIVE, `1`=DEACTIVATED, `2`=DELETED)"
      },
      {
        "name": "name",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Name"
      },
      {
        "name": "type",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Collection type (`0`=CONTACTS, `2`=APPOINTMENTS, `1`=TASKS)"
      },
      {
        "name": "url",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Endpoint URL"
      },
      {
        "name": "username",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Username"
      },
      {
        "name": "ctag",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Collection entity tag (CTag) ([caldav-ctag-03](https://github.com/apple/ccs-calendarserver/doc/Extensions/caldav-ctag.txt))"
      },
      {
        "name": "synctoken",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Synchronization token ([RFC 6578](https://tools.ietf.org/html/rfc6578#section-4))"
      },
      {
        "name": "description",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Detailed general description"
      },
      {
        "name": "password",
        "type": "bytea",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "fk_davservers_ownergroup",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "ownergroup"
        ],
        "def": "CREATE INDEX fk_davservers_ownergroup ON davservers USING gin (ownergroup) WHERE ownergroup IS NOT NULL"
      },
      {
        "name": "fk_davservers_owneruser",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "owneruser"
        ],
        "def": "CREATE INDEX fk_davservers_owneruser ON davservers USING gin (owneruser) WHERE owneruser IS NOT NULL"
      },
      {
        "name": "i_davservers_noowner",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "ownergroup"
        ],
        "def": "CREATE INDEX i_davservers_noowner ON davservers USING gin (ownergroup) WHERE owneruser IS NULL AND ownergroup IS NULL"
      },
      {
        "name": "pk_davservers",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_davservers ON davservers USING btree (\"ID\")"
      },
      {
        "name": "s_davservers_name",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "name"
        ],
        "def": "CREATE INDEX s_davservers_name ON davservers USING gin (name gin_trgm_ops)"
      },
      {
        "name": "s_davservers_url",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "url"
        ],
        "def": "CREATE INDEX s_davservers_url ON davservers USING gin (url gin_trgm_ops)"
      }
    ],
    "constraints": [
      {
        "name": "c_davservers_owner",
        "type": "check",
        "domain": false,
        "def": "CHECK (owneruser IS NULL OR ownergroup IS NULL)"
      },
      {
        "name": "c_davservers_recipient",
        "type": "check",
        "domain": false,
        "def": "CHECK (recipientuser IS NULL OR recipientgroup IS NULL)"
      },
      {
        "name": "dc_davservers_activity",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0 AND VALUE <= 2)"
      },
      {
        "name": "dc_davservers_description",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v\\r\\n]|[ \\t\\v\\r\\n]$'::text)"
      },
      {
        "name": "dc_davservers_name",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^$|^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_davservers_type",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0 AND VALUE <= 2)"
      },
      {
        "name": "dc_davservers_url",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^$|^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_davservers_username",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "fk_davservers_ownergroup",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (ownergroup) REFERENCES groups(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_davservers_owneruser",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (owneruser) REFERENCES users(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_davservers_recipientgroup",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (recipientgroup) REFERENCES groups(\"ID\") ON DELETE SET NULL DEFERRABLE"
      },
      {
        "name": "fk_davservers_recipientuser",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (recipientuser) REFERENCES users(\"ID\") ON DELETE SET NULL DEFERRABLE"
      },
      {
        "name": "pk_davservers",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      }
    ],
    "triggers": [
      {
        "name": "tu_davservers_type",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ft_integrity",
        "def": "CREATE TRIGGER tu_davservers_type BEFORE UPDATE OF type, url ON davservers FOR EACH ROW WHEN (old.type::smallint <> new.type::smallint OR old.url::text <> new.url::text) EXECUTE FUNCTION ft_integrity()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "devices",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": true,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Device ID"
      },
      {
        "name": "fork",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_devices_fork",
            "table": "forks",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Fork ID (`null` for base module)"
      },
      {
        "name": "ownergroup",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_devices_ownergroup",
            "table": "groups",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Owner group ID (`null`=PUBLIC)"
      },
      {
        "name": "creator",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creator user ID (defaults to authenticated user on creation)"
      },
      {
        "name": "creationdate",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creation date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (defaults to current date and time on creation)"
      },
      {
        "name": "lastmodified",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Last modification date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (auto-reset on modification)"
      },
      {
        "name": "item",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_devices_item",
            "table": "items",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Item ID"
      },
      {
        "name": "contract",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_devices_contract",
            "table": "contracts",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Contract ID"
      },
      {
        "name": "visibility",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Visibility (`0`=REGULAR, `1`=ARCHIVED, `2`=DELETED)"
      },
      {
        "name": "serialnum",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Serial number; is required if `chargenum` is empty, otherwise must be empty"
      },
      {
        "name": "chargenum",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Charge (lot) number; is required if `serialnum` is empty, otherwise must be empty"
      },
      {
        "name": "expdate",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Expiry date as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time)"
      },
      {
        "name": "description",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Detailed general description"
      }
    ],
    "indexes": [
      {
        "name": "fk_devices_contract",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "contract"
        ],
        "def": "CREATE INDEX fk_devices_contract ON devices USING btree (contract) WHERE contract IS NOT NULL"
      },
      {
        "name": "fk_devices_fork",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "fork"
        ],
        "def": "CREATE INDEX fk_devices_fork ON devices USING gin (fork) WHERE fork IS NOT NULL"
      },
      {
        "name": "fk_devices_ownergroup",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "ownergroup"
        ],
        "def": "CREATE INDEX fk_devices_ownergroup ON devices USING gin (ownergroup)"
      },
      {
        "name": "i_devices_nofork",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "fork"
        ],
        "def": "CREATE INDEX i_devices_nofork ON devices USING gin (fork) WHERE fork IS NULL"
      },
      {
        "name": "i_devices_noowner",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "ownergroup"
        ],
        "def": "CREATE INDEX i_devices_noowner ON devices USING gin (ownergroup) WHERE ownergroup IS NULL"
      },
      {
        "name": "pk_devices",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_devices ON devices USING btree (\"ID\")"
      },
      {
        "name": "s_devices_chargenum",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "chargenum"
        ],
        "def": "CREATE INDEX s_devices_chargenum ON devices USING gin (chargenum gin_trgm_ops) WHERE chargenum::text <> ''::text"
      },
      {
        "name": "s_devices_serialnum",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "serialnum"
        ],
        "def": "CREATE INDEX s_devices_serialnum ON devices USING gin (serialnum gin_trgm_ops) WHERE serialnum::text <> ''::text"
      },
      {
        "name": "u_devices_item_serialnum_chargenum",
        "unique": true,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "item",
          "serialnum",
          "chargenum"
        ],
        "def": "CREATE UNIQUE INDEX u_devices_item_serialnum_chargenum ON devices USING btree (item, serialnum, chargenum)"
      }
    ],
    "constraints": [
      {
        "name": "c_devices_devicenum",
        "type": "check",
        "domain": false,
        "def": "CHECK (serialnum::text <> ''::text AND chargenum::text = ''::text OR serialnum::text = ''::text AND chargenum::text <> ''::text)"
      },
      {
        "name": "dc_devices_chargenum",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_devices_description",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v\\r\\n]|[ \\t\\v\\r\\n]$'::text)"
      },
      {
        "name": "dc_devices_serialnum",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_devices_visibility",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0 AND VALUE <= 2)"
      },
      {
        "name": "fk_devices_contract",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (contract) REFERENCES contracts(\"ID\") ON DELETE SET NULL DEFERRABLE"
      },
      {
        "name": "fk_devices_fork",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (fork) REFERENCES forks(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_devices_item",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (item) REFERENCES items(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_devices_ownergroup",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (ownergroup) REFERENCES groups(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "pk_devices",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      },
      {
        "name": "u_devices_item_serialnum_chargenum",
        "type": "unique",
        "domain": false,
        "def": "UNIQUE (item, serialnum, chargenum)"
      }
    ],
    "triggers": [
      {
        "name": "ti_devices_item",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_devices_item",
        "def": "CREATE TRIGGER ti_devices_item BEFORE INSERT ON devices FOR EACH ROW EXECUTE FUNCTION ftiu_devices_item()"
      },
      {
        "name": "tu_devices_item",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_devices_item",
        "def": "CREATE TRIGGER tu_devices_item BEFORE UPDATE OF item, serialnum, chargenum ON devices FOR EACH ROW WHEN (old.item IS DISTINCT FROM new.item OR old.serialnum::text = ''::text AND new.serialnum::text <> ''::text OR old.chargenum::text = ''::text AND new.chargenum::text <> ''::text) EXECUTE FUNCTION ftiu_devices_item()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "documents",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": true,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Document ID"
      },
      {
        "name": "fork",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_documents_fork",
            "table": "forks",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Fork ID (`null` for base module)"
      },
      {
        "name": "owneruser",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_documents_owneruser",
            "table": "users",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Owner user ID (PUBLIC if `owneruser`=`null` and `ownergroup`=`null`)"
      },
      {
        "name": "ownergroup",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_documents_ownergroup",
            "table": "groups",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Owner group ID (PUBLIC if `owneruser`=`null` and `ownergroup`=`null`)"
      },
      {
        "name": "creator",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creator user ID (defaults to authenticated user on creation)"
      },
      {
        "name": "assigneduser",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_documents_assigneduser",
            "table": "users",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Assigned user ID"
      },
      {
        "name": "creationdate",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "EXTRACT(epoch FROM now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creation date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (defaults to current date and time on creation)"
      },
      {
        "name": "lastmodified",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "EXTRACT(epoch FROM now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Last modification date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (auto-reset on modification)"
      },
      {
        "name": "binfile",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_documents_binfile",
            "table": "binfiles",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Binary file ID; is read-only (not for `PUT` or `PATCH`)"
      },
      {
        "name": "visibility",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Visibility (`0`=REGULAR, `1`=ARCHIVED, `2`=DELETED)"
      },
      {
        "name": "name",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Name"
      },
      {
        "name": "documentnum",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Document number"
      },
      {
        "name": "status",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Status (`0`=DRAFT, `1`=FEEDBACKREQUIRED, `2`=INREVISION, `3`=AWAITINGAPPROVAL, `4`=FINAL, `5`=OBSOLETE)"
      },
      {
        "name": "filename",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Filename"
      },
      {
        "name": "mimetype",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": "'application/octet-stream'",
        "indexed": false,
        "fkeys": [],
        "pattern": "^[a-z]+/[^ \\t\\v\\r\\n]+$",
        "description": "[MIME type](https://en.wikipedia.org/wiki/Media_type) ([RFC 2045](https://tools.ietf.org/html/rfc2045))"
      },
      {
        "name": "public",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Publicly accessible"
      },
      {
        "name": "description",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Detailed general description"
      }
    ],
    "indexes": [
      {
        "name": "fk_documents_assigneduser",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "assigneduser"
        ],
        "def": "CREATE INDEX fk_documents_assigneduser ON documents USING gin (assigneduser) WHERE assigneduser IS NOT NULL"
      },
      {
        "name": "fk_documents_binfile",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "binfile"
        ],
        "def": "CREATE INDEX fk_documents_binfile ON documents USING btree (binfile) WHERE binfile IS NOT NULL"
      },
      {
        "name": "fk_documents_fork",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "fork"
        ],
        "def": "CREATE INDEX fk_documents_fork ON documents USING gin (fork) WHERE fork IS NOT NULL"
      },
      {
        "name": "fk_documents_ownergroup",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "ownergroup"
        ],
        "def": "CREATE INDEX fk_documents_ownergroup ON documents USING gin (ownergroup) WHERE ownergroup IS NOT NULL"
      },
      {
        "name": "fk_documents_owneruser",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "owneruser"
        ],
        "def": "CREATE INDEX fk_documents_owneruser ON documents USING gin (owneruser) WHERE owneruser IS NOT NULL"
      },
      {
        "name": "i_documents_nofork",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "fork"
        ],
        "def": "CREATE INDEX i_documents_nofork ON documents USING gin (fork) WHERE fork IS NULL"
      },
      {
        "name": "i_documents_noowner",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "ownergroup"
        ],
        "def": "CREATE INDEX i_documents_noowner ON documents USING gin (ownergroup) WHERE owneruser IS NULL AND ownergroup IS NULL"
      },
      {
        "name": "pk_documents",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_documents ON documents USING btree (\"ID\")"
      },
      {
        "name": "s_documents_documentnum",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "documentnum"
        ],
        "def": "CREATE INDEX s_documents_documentnum ON documents USING gin (documentnum gin_trgm_ops) WHERE documentnum::text <> ''::text"
      },
      {
        "name": "s_documents_filename",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "filename"
        ],
        "def": "CREATE INDEX s_documents_filename ON documents USING gin (filename gin_trgm_ops) WHERE filename::text <> ''::text"
      },
      {
        "name": "s_documents_name",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "name"
        ],
        "def": "CREATE INDEX s_documents_name ON documents USING gin (name gin_trgm_ops)"
      }
    ],
    "constraints": [
      {
        "name": "c_documents_owner",
        "type": "check",
        "domain": false,
        "def": "CHECK (owneruser IS NULL OR ownergroup IS NULL)"
      },
      {
        "name": "dc_documents_description",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v\\r\\n]|[ \\t\\v\\r\\n]$'::text)"
      },
      {
        "name": "dc_documents_documentnum",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_documents_filename",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v\\r\\n]|[ \\t\\v\\r\\n]$'::text)"
      },
      {
        "name": "dc_documents_name",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^$|^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_documents_status",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0 AND VALUE <= 5)"
      },
      {
        "name": "dc_documents_visibility",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0 AND VALUE <= 2)"
      },
      {
        "name": "dc_files_mimetype",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE ~ '^[a-z]+\\/[^ \\t\\v\\r\\n]+$'::text)"
      },
      {
        "name": "fk_documents_assigneduser",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (assigneduser) REFERENCES users(\"ID\") ON DELETE SET NULL DEFERRABLE"
      },
      {
        "name": "fk_documents_binfile",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (binfile) REFERENCES binfiles(\"ID\") DEFERRABLE"
      },
      {
        "name": "fk_documents_fork",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (fork) REFERENCES forks(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_documents_ownergroup",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (ownergroup) REFERENCES groups(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_documents_owneruser",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (owneruser) REFERENCES users(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "pk_documents",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "dunning",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": true,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Dunning notice ID"
      },
      {
        "name": "fork",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_dunning_fork",
            "table": "forks",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Fork ID (`null` for base module)"
      },
      {
        "name": "ownergroup",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_dunning_ownergroup",
            "table": "groups",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Owner group ID (`null`=PUBLIC)"
      },
      {
        "name": "creator",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creator user ID (defaults to authenticated user on creation)"
      },
      {
        "name": "assigneduser",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_dunning_assigneduser",
            "table": "users",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Assigned user ID"
      },
      {
        "name": "creationdate",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creation date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (defaults to current date and time on creation)"
      },
      {
        "name": "lastmodified",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Last modification date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (auto-reset on modification)"
      },
      {
        "name": "account",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_dunning_account",
            "table": "accounts",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Account ID"
      },
      {
        "name": "dunningnum",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Dunning number"
      },
      {
        "name": "type",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Dunning type (`0`=LISTING, `1`=REMINDER, `2`=NOTICE)"
      },
      {
        "name": "date",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Designated date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (defaults to current date and time on creation)"
      },
      {
        "name": "duedate",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Due date as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time)"
      },
      {
        "name": "status",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Status (`0`=DRAFT, `1`=BOOKED, `2`=CANCELLED, `3`=CLOSED)"
      },
      {
        "name": "fee",
        "type": "double precision",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Dunning fee"
      },
      {
        "name": "recipient",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Recipient"
      },
      {
        "name": "address",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Address (street and building/suite number)"
      },
      {
        "name": "postalcode",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Postal or ZIP code"
      },
      {
        "name": "city",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "City or locality"
      },
      {
        "name": "region",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Region or state"
      },
      {
        "name": "country",
        "type": "character varying(2)",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": "^([A-Z]{2})?$",
        "description": "Country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2))"
      }
    ],
    "indexes": [
      {
        "name": "fk_dunning_account",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "account"
        ],
        "def": "CREATE INDEX fk_dunning_account ON dunning USING btree (account) WHERE account IS NOT NULL"
      },
      {
        "name": "fk_dunning_assigneduser",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "assigneduser"
        ],
        "def": "CREATE INDEX fk_dunning_assigneduser ON dunning USING gin (assigneduser) WHERE assigneduser IS NOT NULL"
      },
      {
        "name": "fk_dunning_fork",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "fork"
        ],
        "def": "CREATE INDEX fk_dunning_fork ON dunning USING gin (fork) WHERE fork IS NOT NULL"
      },
      {
        "name": "fk_dunning_ownergroup",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "ownergroup"
        ],
        "def": "CREATE INDEX fk_dunning_ownergroup ON dunning USING gin (ownergroup)"
      },
      {
        "name": "i_dunning_date",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "date"
        ],
        "def": "CREATE INDEX i_dunning_date ON dunning USING btree (date DESC)"
      },
      {
        "name": "i_dunning_dunningnum",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "dunningnum"
        ],
        "def": "CREATE INDEX i_dunning_dunningnum ON dunning USING btree (dunningnum)"
      },
      {
        "name": "i_dunning_nofork",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "fork"
        ],
        "def": "CREATE INDEX i_dunning_nofork ON dunning USING gin (fork) WHERE fork IS NULL"
      },
      {
        "name": "i_dunning_noowner",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "ownergroup"
        ],
        "def": "CREATE INDEX i_dunning_noowner ON dunning USING gin (ownergroup) WHERE ownergroup IS NULL"
      },
      {
        "name": "pk_dunning",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_dunning ON dunning USING btree (\"ID\")"
      },
      {
        "name": "s_dunning_dunningnum",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "dunningnum"
        ],
        "def": "CREATE INDEX s_dunning_dunningnum ON dunning USING gin (dunningnum gin_trgm_ops)"
      },
      {
        "name": "u_dunning_dunningnum_type",
        "unique": true,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "dunningnum",
          "type"
        ],
        "def": "CREATE UNIQUE INDEX u_dunning_dunningnum_type ON dunning USING btree (dunningnum, type) WHERE status::smallint <> 2"
      }
    ],
    "constraints": [
      {
        "name": "dc_dunning_address",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v\\r\\n]|[ \\t\\v\\r\\n]$'::text)"
      },
      {
        "name": "dc_dunning_city",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_dunning_country",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE::text ~ '^([A-Z]{2})?$'::text)"
      },
      {
        "name": "dc_dunning_dunningnum",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^$|^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_dunning_fee",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0::double precision)"
      },
      {
        "name": "dc_dunning_postalcode",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_dunning_recipient",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_dunning_region",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_dunning_status",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0 AND VALUE <= 3)"
      },
      {
        "name": "dc_dunning_type",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0 AND VALUE <= 2)"
      },
      {
        "name": "fk_dunning_account",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (account) REFERENCES accounts(\"ID\") ON DELETE SET NULL DEFERRABLE"
      },
      {
        "name": "fk_dunning_assigneduser",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (assigneduser) REFERENCES users(\"ID\") ON DELETE SET NULL DEFERRABLE"
      },
      {
        "name": "fk_dunning_fork",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (fork) REFERENCES forks(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_dunning_ownergroup",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (ownergroup) REFERENCES groups(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "pk_dunning",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      }
    ],
    "triggers": [
      {
        "name": "ti_dunning_status",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_dunning_status",
        "def": "CREATE TRIGGER ti_dunning_status BEFORE INSERT ON dunning FOR EACH ROW WHEN (new.status::smallint = 3) EXECUTE FUNCTION ftiu_dunning_status()"
      },
      {
        "name": "tu_dunning_status",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_dunning_status",
        "def": "CREATE TRIGGER tu_dunning_status BEFORE UPDATE OF status ON dunning FOR EACH ROW WHEN ((new.status::smallint = ANY (ARRAY[1, 3])) AND old.status::smallint <> new.status::smallint) EXECUTE FUNCTION ftiu_dunning_status()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "dunning2transactions",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": true,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Dunning-to-transaction ID"
      },
      {
        "name": "creator",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creator user ID (defaults to authenticated user on creation)"
      },
      {
        "name": "creationdate",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creation date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (defaults to current date and time on creation)"
      },
      {
        "name": "lastmodified",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "EXTRACT(epoch FROM now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Last modification date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (auto-reset on modification)"
      },
      {
        "name": "dunning",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_dunning2transactions_dunning",
            "table": "dunning",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Dunning notice ID (**dependency**)"
      },
      {
        "name": "transaction",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_dunning2transactions_transaction",
            "table": "transactions",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Transaction ID (**dependency**)"
      }
    ],
    "indexes": [
      {
        "name": "fk_dunning2transactions_transaction",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "transaction"
        ],
        "def": "CREATE INDEX fk_dunning2transactions_transaction ON dunning2transactions USING btree (transaction)"
      },
      {
        "name": "pk_dunning2transactions",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_dunning2transactions ON dunning2transactions USING btree (\"ID\")"
      },
      {
        "name": "u_dunning2transactions_dunning_transaction",
        "unique": true,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "dunning",
          "transaction"
        ],
        "def": "CREATE UNIQUE INDEX u_dunning2transactions_dunning_transaction ON dunning2transactions USING btree (dunning, transaction)"
      }
    ],
    "constraints": [
      {
        "name": "fk_dunning2transactions_dunning",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (dunning) REFERENCES dunning(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_dunning2transactions_transaction",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (transaction) REFERENCES transactions(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "pk_dunning2transactions",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      },
      {
        "name": "u_dunning2transactions_dunning_transaction",
        "type": "unique",
        "domain": false,
        "def": "UNIQUE (dunning, transaction)"
      }
    ],
    "triggers": [
      {
        "name": "td_dunning2transactions_status",
        "type": "after",
        "events": [
          "delete"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftd_dunning2transactions_status",
        "def": "CREATE TRIGGER td_dunning2transactions_status AFTER DELETE ON dunning2transactions FOR EACH ROW EXECUTE FUNCTION ftd_dunning2transactions_status()"
      },
      {
        "name": "ti_dunning2transactions_status",
        "type": "after",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "fti_dunning2transactions_status",
        "def": "CREATE TRIGGER ti_dunning2transactions_status AFTER INSERT ON dunning2transactions FOR EACH ROW EXECUTE FUNCTION fti_dunning2transactions_status()"
      },
      {
        "name": "ti_dunning2transactions_transaction",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_dunning2transactions_transaction",
        "def": "CREATE TRIGGER ti_dunning2transactions_transaction BEFORE INSERT ON dunning2transactions FOR EACH ROW EXECUTE FUNCTION ftiu_dunning2transactions_transaction()"
      },
      {
        "name": "tu_dunning2transactions_status",
        "type": "after",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftu_dunning2transactions_status",
        "def": "CREATE TRIGGER tu_dunning2transactions_status AFTER UPDATE OF dunning ON dunning2transactions FOR EACH ROW WHEN (old.dunning IS DISTINCT FROM new.dunning) EXECUTE FUNCTION ftu_dunning2transactions_status()"
      },
      {
        "name": "tu_dunning2transactions_transaction",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_dunning2transactions_transaction",
        "def": "CREATE TRIGGER tu_dunning2transactions_transaction BEFORE UPDATE OF transaction ON dunning2transactions FOR EACH ROW WHEN (old.transaction IS DISTINCT FROM new.transaction) EXECUTE FUNCTION ftiu_dunning2transactions_transaction()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "entities2channels",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": true,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Entity-to-channel ID"
      },
      {
        "name": "creator",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creator user ID (defaults to authenticated user on creation)"
      },
      {
        "name": "creationdate",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creation date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (defaults to current date and time on creation)"
      },
      {
        "name": "lastmodified",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "EXTRACT(epoch FROM now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Last modification date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (auto-reset on modification)"
      },
      {
        "name": "entity",
        "type": "t_entity",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Canonical entity"
      },
      {
        "name": "index",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Entity ID"
      },
      {
        "name": "channel",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_entities2channels_channel",
            "table": "channels",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Channel ID (**dependency**)"
      }
    ],
    "indexes": [
      {
        "name": "fk_entities2channels_channel",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "channel"
        ],
        "def": "CREATE INDEX fk_entities2channels_channel ON entities2channels USING btree (channel)"
      },
      {
        "name": "pk_entities2channels",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_entities2channels ON entities2channels USING btree (\"ID\")"
      },
      {
        "name": "u_entities2channels_entity_index",
        "unique": true,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "entity",
          "index",
          "+channel"
        ],
        "def": "CREATE UNIQUE INDEX u_entities2channels_entity_index ON entities2channels USING btree (entity, index) INCLUDE (channel)"
      }
    ],
    "constraints": [
      {
        "name": "c_entities2channels_entity",
        "type": "check",
        "domain": false,
        "def": "CHECK (entity <> ALL (ARRAY['couponcodes'::t_entity, 'participants'::t_entity, 'records'::t_entity, 'stocktransactions'::t_entity]))"
      },
      {
        "name": "fk_entities2channels_channel",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (channel) REFERENCES channels(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "pk_entities2channels",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      },
      {
        "name": "u_entities2channels_entity_index",
        "type": "unique",
        "domain": false,
        "def": "UNIQUE (entity, index) INCLUDE (channel)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "events",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": true,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Event ID"
      },
      {
        "name": "fork",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_events_fork",
            "table": "forks",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Fork ID (`null` for base module); inherited from entity"
      },
      {
        "name": "owneruser",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_events_owneruser",
            "table": "users",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Owner user ID (PUBLIC if `owneruser`=`null` and `ownergroup`=`null`)"
      },
      {
        "name": "ownergroup",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_events_ownergroup",
            "table": "groups",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Owner group ID (PUBLIC if `owneruser`=`null` and `ownergroup`=`null`)"
      },
      {
        "name": "creator",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creator user ID (defaults to authenticated user on creation)"
      },
      {
        "name": "creationdate",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creation date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (defaults to current date and time on creation)"
      },
      {
        "name": "lastmodified",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Last modification date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (auto-reset on modification)"
      },
      {
        "name": "entity",
        "type": "t_entity",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Canonical entity"
      },
      {
        "name": "index",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Entity ID"
      },
      {
        "name": "name",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Name"
      },
      {
        "name": "color",
        "type": "character varying(6)",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": "^([A-F0-9]{3}){0,2}$",
        "description": "Color code (CSS-style hexadecimal without `#`)"
      },
      {
        "name": "datefrom",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Start date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time); must be less than or equal to `dateto`"
      },
      {
        "name": "dateto",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "End date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time); must be greater than or equal to `datefrom`"
      },
      {
        "name": "meta",
        "type": "json",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "[JSON](https://tools.ietf.org/html/rfc7159)-encoded metadata (object)"
      }
    ],
    "indexes": [
      {
        "name": "fk_events_fork",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "fork"
        ],
        "def": "CREATE INDEX fk_events_fork ON events USING gin (fork) WHERE fork IS NOT NULL"
      },
      {
        "name": "fk_events_ownergroup",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "ownergroup"
        ],
        "def": "CREATE INDEX fk_events_ownergroup ON events USING gin (ownergroup) WHERE ownergroup IS NOT NULL"
      },
      {
        "name": "fk_events_owneruser",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "owneruser"
        ],
        "def": "CREATE INDEX fk_events_owneruser ON events USING gin (owneruser) WHERE owneruser IS NOT NULL"
      },
      {
        "name": "i_events_datefrom_dateto",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "datefrom",
          "dateto"
        ],
        "def": "CREATE INDEX i_events_datefrom_dateto ON events USING btree (datefrom, dateto)"
      },
      {
        "name": "i_events_entity_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "entity",
          "index"
        ],
        "def": "CREATE INDEX i_events_entity_index ON events USING btree (entity, index) WHERE entity IS NOT NULL"
      },
      {
        "name": "i_events_noowner",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "ownergroup"
        ],
        "def": "CREATE INDEX i_events_noowner ON events USING gin (ownergroup) WHERE owneruser IS NULL AND ownergroup IS NULL"
      },
      {
        "name": "pk_events",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_events ON events USING btree (\"ID\")"
      }
    ],
    "constraints": [
      {
        "name": "c_events_date",
        "type": "check",
        "domain": false,
        "def": "CHECK (datefrom <= dateto)"
      },
      {
        "name": "c_events_entity",
        "type": "check",
        "domain": false,
        "def": "CHECK (entity <> ALL (ARRAY['couponcodes'::t_entity, 'participants'::t_entity, 'records'::t_entity, 'stocktransactions'::t_entity]))"
      },
      {
        "name": "c_events_owner",
        "type": "check",
        "domain": false,
        "def": "CHECK (owneruser IS NULL OR ownergroup IS NULL)"
      },
      {
        "name": "dc_events_color",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE::text ~ '^([A-F0-9]{3}){0,2}$'::text)"
      },
      {
        "name": "dc_events_meta",
        "type": "check",
        "domain": true,
        "def": "CHECK (json_typeof(VALUE) = 'object'::text)"
      },
      {
        "name": "dc_events_name",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^$|^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "fk_events_fork",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (fork) REFERENCES forks(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_events_ownergroup",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (ownergroup) REFERENCES groups(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_events_owneruser",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (owneruser) REFERENCES users(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "pk_events",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdata",
    "type": "view",
    "fields": [
      {
        "name": "entity",
        "type": "t_entity",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "name",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [],
    "constraints": [
      {
        "name": "dc_extdatafields_name",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^$|^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      }
    ],
    "triggers": [],
    "rules": [
      {
        "name": "_RETURN",
        "type": "select",
        "instead": true,
        "def": "CREATE RULE \"_RETURN\" AS\n    ON SELECT TO extdata DO INSTEAD  SELECT extdatavalues.entity,\n    extdatafields.name,\n    extdatavalues.index,\n    extdatavalues.value,\n    extdatavalues.number\n   FROM extdatavalues\n     JOIN extdatafields ON extdatafields.\"ID\" = extdatavalues.field AND extdatafields.entity = extdatavalues.entity;"
      },
      {
        "name": "rd_extdata",
        "type": "delete",
        "instead": true,
        "def": "CREATE RULE rd_extdata AS\n    ON DELETE TO extdata DO INSTEAD  DELETE FROM extdatavalues\n  WHERE extdatavalues.entity = old.entity AND (extdatavalues.field IN ( SELECT extdatafields.\"ID\"\n           FROM extdatafields\n          WHERE extdatafields.entity = old.entity AND extdatafields.name::text = old.name::text)) AND extdatavalues.index = old.index;"
      },
      {
        "name": "ri_extdata",
        "type": "insert",
        "instead": true,
        "def": "CREATE RULE ri_extdata AS\n    ON INSERT TO extdata DO INSTEAD  INSERT INTO extdatavalues (entity, field, index, value)\n  VALUES (new.entity, f_extdatafields_upsert(new.entity, new.name::text), new.index, new.value);"
      },
      {
        "name": "ru_extdata",
        "type": "update",
        "instead": true,
        "def": "CREATE RULE ru_extdata AS\n    ON UPDATE TO extdata DO INSTEAD  UPDATE extdatavalues SET field =\n        CASE\n            WHEN old.entity = new.entity AND old.name::text = new.name::text THEN extdatavalues.field\n            ELSE f_extdatafields_upsert(new.entity, new.name::text)\n        END, index = new.index, value = new.value\n  WHERE extdatavalues.entity = old.entity AND (extdatavalues.field IN ( SELECT extdatafields.\"ID\"\n           FROM extdatafields\n          WHERE extdatafields.entity = old.entity AND extdatafields.name::text = old.name::text)) AND extdatavalues.index = old.index;"
      }
    ],
    "statistics": [],
    "def": "SELECT extdatavalues.entity,\n    extdatafields.name,\n    extdatavalues.index,\n    extdatavalues.value,\n    extdatavalues.number\n   FROM extdatavalues\n     JOIN extdatafields ON extdatafields.\"ID\" = extdatavalues.field AND extdatafields.entity = extdatavalues.entity;"
  },
  {
    "name": "extdataempty_accounts",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataempty_accounts_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataempty_accounts_index ON extdataempty_accounts USING btree (index)"
      },
      {
        "name": "pk_extdataempty_accounts",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataempty_accounts ON extdataempty_accounts USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdataempty_accounts",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataempty_accounts",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_accounts",
        "def": "CREATE TRIGGER ti_extdataempty_accounts BEFORE INSERT ON extdataempty_accounts FOR EACH ROW EXECUTE FUNCTION ftiu_extdataempty_accounts()"
      },
      {
        "name": "tu_extdataempty_accounts",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_accounts",
        "def": "CREATE TRIGGER tu_extdataempty_accounts BEFORE UPDATE OF field, index ON extdataempty_accounts FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataempty_accounts()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdataempty_actionsteps",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataempty_actionsteps_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataempty_actionsteps_index ON extdataempty_actionsteps USING btree (index)"
      },
      {
        "name": "pk_extdataempty_actionsteps",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataempty_actionsteps ON extdataempty_actionsteps USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdataempty_actionsteps",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataempty_actionsteps",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_actionsteps",
        "def": "CREATE TRIGGER ti_extdataempty_actionsteps BEFORE INSERT ON extdataempty_actionsteps FOR EACH ROW EXECUTE FUNCTION ftiu_extdataempty_actionsteps()"
      },
      {
        "name": "tu_extdataempty_actionsteps",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_actionsteps",
        "def": "CREATE TRIGGER tu_extdataempty_actionsteps BEFORE UPDATE OF field, index ON extdataempty_actionsteps FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataempty_actionsteps()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdataempty_applications",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataempty_applications_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataempty_applications_index ON extdataempty_applications USING btree (index)"
      },
      {
        "name": "pk_extdataempty_applications",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataempty_applications ON extdataempty_applications USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdataempty_applications",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataempty_applications",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_applications",
        "def": "CREATE TRIGGER ti_extdataempty_applications BEFORE INSERT ON extdataempty_applications FOR EACH ROW EXECUTE FUNCTION ftiu_extdataempty_applications()"
      },
      {
        "name": "tu_extdataempty_applications",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_applications",
        "def": "CREATE TRIGGER tu_extdataempty_applications BEFORE UPDATE OF field, index ON extdataempty_applications FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataempty_applications()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdataempty_appointments",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataempty_appointments_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataempty_appointments_index ON extdataempty_appointments USING btree (index)"
      },
      {
        "name": "pk_extdataempty_appointments",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataempty_appointments ON extdataempty_appointments USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdataempty_appointments",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataempty_appointments",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_appointments",
        "def": "CREATE TRIGGER ti_extdataempty_appointments BEFORE INSERT ON extdataempty_appointments FOR EACH ROW EXECUTE FUNCTION ftiu_extdataempty_appointments()"
      },
      {
        "name": "tu_extdataempty_appointments",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_appointments",
        "def": "CREATE TRIGGER tu_extdataempty_appointments BEFORE UPDATE OF field, index ON extdataempty_appointments FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataempty_appointments()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdataempty_campaigns",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataempty_campaigns_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataempty_campaigns_index ON extdataempty_campaigns USING btree (index)"
      },
      {
        "name": "pk_extdataempty_campaigns",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataempty_campaigns ON extdataempty_campaigns USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdataempty_campaigns",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataempty_campaigns",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_campaigns",
        "def": "CREATE TRIGGER ti_extdataempty_campaigns BEFORE INSERT ON extdataempty_campaigns FOR EACH ROW EXECUTE FUNCTION ftiu_extdataempty_campaigns()"
      },
      {
        "name": "tu_extdataempty_campaigns",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_campaigns",
        "def": "CREATE TRIGGER tu_extdataempty_campaigns BEFORE UPDATE OF field, index ON extdataempty_campaigns FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataempty_campaigns()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdataempty_channels",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataempty_channels_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataempty_channels_index ON extdataempty_channels USING btree (index)"
      },
      {
        "name": "pk_extdataempty_channels",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataempty_channels ON extdataempty_channels USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdataempty_channels",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataempty_channels",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_channels",
        "def": "CREATE TRIGGER ti_extdataempty_channels BEFORE INSERT ON extdataempty_channels FOR EACH ROW EXECUTE FUNCTION ftiu_extdataempty_channels()"
      },
      {
        "name": "tu_extdataempty_channels",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_channels",
        "def": "CREATE TRIGGER tu_extdataempty_channels BEFORE UPDATE OF field, index ON extdataempty_channels FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataempty_channels()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdataempty_contacts",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataempty_contacts_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataempty_contacts_index ON extdataempty_contacts USING btree (index)"
      },
      {
        "name": "pk_extdataempty_contacts",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataempty_contacts ON extdataempty_contacts USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdataempty_contacts",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataempty_contacts",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_contacts",
        "def": "CREATE TRIGGER ti_extdataempty_contacts BEFORE INSERT ON extdataempty_contacts FOR EACH ROW EXECUTE FUNCTION ftiu_extdataempty_contacts()"
      },
      {
        "name": "tu_extdataempty_contacts",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_contacts",
        "def": "CREATE TRIGGER tu_extdataempty_contacts BEFORE UPDATE OF field, index ON extdataempty_contacts FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataempty_contacts()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdataempty_contracts",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataempty_contracts_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataempty_contracts_index ON extdataempty_contracts USING btree (index)"
      },
      {
        "name": "pk_extdataempty_contracts",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataempty_contracts ON extdataempty_contracts USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdataempty_contracts",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataempty_contracts",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_contracts",
        "def": "CREATE TRIGGER ti_extdataempty_contracts BEFORE INSERT ON extdataempty_contracts FOR EACH ROW EXECUTE FUNCTION ftiu_extdataempty_contracts()"
      },
      {
        "name": "tu_extdataempty_contracts",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_contracts",
        "def": "CREATE TRIGGER tu_extdataempty_contracts BEFORE UPDATE OF field, index ON extdataempty_contracts FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataempty_contracts()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdataempty_couponcodes",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataempty_couponcodes_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataempty_couponcodes_index ON extdataempty_couponcodes USING btree (index)"
      },
      {
        "name": "pk_extdataempty_couponcodes",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataempty_couponcodes ON extdataempty_couponcodes USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdataempty_couponcodes",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataempty_couponcodes",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_couponcodes",
        "def": "CREATE TRIGGER ti_extdataempty_couponcodes BEFORE INSERT ON extdataempty_couponcodes FOR EACH ROW EXECUTE FUNCTION ftiu_extdataempty_couponcodes()"
      },
      {
        "name": "tu_extdataempty_couponcodes",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_couponcodes",
        "def": "CREATE TRIGGER tu_extdataempty_couponcodes BEFORE UPDATE OF field, index ON extdataempty_couponcodes FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataempty_couponcodes()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdataempty_coupons",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataempty_coupons_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataempty_coupons_index ON extdataempty_coupons USING btree (index)"
      },
      {
        "name": "pk_extdataempty_coupons",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataempty_coupons ON extdataempty_coupons USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdataempty_coupons",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataempty_coupons",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_coupons",
        "def": "CREATE TRIGGER ti_extdataempty_coupons BEFORE INSERT ON extdataempty_coupons FOR EACH ROW EXECUTE FUNCTION ftiu_extdataempty_coupons()"
      },
      {
        "name": "tu_extdataempty_coupons",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_coupons",
        "def": "CREATE TRIGGER tu_extdataempty_coupons BEFORE UPDATE OF field, index ON extdataempty_coupons FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataempty_coupons()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdataempty_customfields",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataempty_customfields_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataempty_customfields_index ON extdataempty_customfields USING btree (index)"
      },
      {
        "name": "pk_extdataempty_customfields",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataempty_customfields ON extdataempty_customfields USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdataempty_customfields",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataempty_customfields",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_customfields",
        "def": "CREATE TRIGGER ti_extdataempty_customfields BEFORE INSERT ON extdataempty_customfields FOR EACH ROW EXECUTE FUNCTION ftiu_extdataempty_customfields()"
      },
      {
        "name": "tu_extdataempty_customfields",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_customfields",
        "def": "CREATE TRIGGER tu_extdataempty_customfields BEFORE UPDATE OF field, index ON extdataempty_customfields FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataempty_customfields()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdataempty_davservers",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataempty_davservers_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataempty_davservers_index ON extdataempty_davservers USING btree (index)"
      },
      {
        "name": "pk_extdataempty_davservers",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataempty_davservers ON extdataempty_davservers USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdataempty_davservers",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataempty_davservers",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_davservers",
        "def": "CREATE TRIGGER ti_extdataempty_davservers BEFORE INSERT ON extdataempty_davservers FOR EACH ROW EXECUTE FUNCTION ftiu_extdataempty_davservers()"
      },
      {
        "name": "tu_extdataempty_davservers",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_davservers",
        "def": "CREATE TRIGGER tu_extdataempty_davservers BEFORE UPDATE OF field, index ON extdataempty_davservers FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataempty_davservers()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdataempty_devices",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataempty_devices_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataempty_devices_index ON extdataempty_devices USING btree (index)"
      },
      {
        "name": "pk_extdataempty_devices",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataempty_devices ON extdataempty_devices USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdataempty_devices",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataempty_devices",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_devices",
        "def": "CREATE TRIGGER ti_extdataempty_devices BEFORE INSERT ON extdataempty_devices FOR EACH ROW EXECUTE FUNCTION ftiu_extdataempty_devices()"
      },
      {
        "name": "tu_extdataempty_devices",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_devices",
        "def": "CREATE TRIGGER tu_extdataempty_devices BEFORE UPDATE OF field, index ON extdataempty_devices FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataempty_devices()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdataempty_documents",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataempty_documents_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataempty_documents_index ON extdataempty_documents USING btree (index)"
      },
      {
        "name": "pk_extdataempty_documents",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataempty_documents ON extdataempty_documents USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdataempty_documents",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataempty_documents",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_documents",
        "def": "CREATE TRIGGER ti_extdataempty_documents BEFORE INSERT ON extdataempty_documents FOR EACH ROW EXECUTE FUNCTION ftiu_extdataempty_documents()"
      },
      {
        "name": "tu_extdataempty_documents",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_documents",
        "def": "CREATE TRIGGER tu_extdataempty_documents BEFORE UPDATE OF field, index ON extdataempty_documents FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataempty_documents()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdataempty_dunning",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataempty_dunning_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataempty_dunning_index ON extdataempty_dunning USING btree (index)"
      },
      {
        "name": "pk_extdataempty_dunning",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataempty_dunning ON extdataempty_dunning USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdataempty_dunning",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataempty_dunning",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_dunning",
        "def": "CREATE TRIGGER ti_extdataempty_dunning BEFORE INSERT ON extdataempty_dunning FOR EACH ROW EXECUTE FUNCTION ftiu_extdataempty_dunning()"
      },
      {
        "name": "tu_extdataempty_dunning",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_dunning",
        "def": "CREATE TRIGGER tu_extdataempty_dunning BEFORE UPDATE OF field, index ON extdataempty_dunning FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataempty_dunning()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdataempty_feedservers",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataempty_feedservers_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataempty_feedservers_index ON extdataempty_feedservers USING btree (index)"
      },
      {
        "name": "pk_extdataempty_feedservers",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataempty_feedservers ON extdataempty_feedservers USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdataempty_feedservers",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataempty_feedservers",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_feedservers",
        "def": "CREATE TRIGGER ti_extdataempty_feedservers BEFORE INSERT ON extdataempty_feedservers FOR EACH ROW EXECUTE FUNCTION ftiu_extdataempty_feedservers()"
      },
      {
        "name": "tu_extdataempty_feedservers",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_feedservers",
        "def": "CREATE TRIGGER tu_extdataempty_feedservers BEFORE UPDATE OF field, index ON extdataempty_feedservers FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataempty_feedservers()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdataempty_forks",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataempty_forks_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataempty_forks_index ON extdataempty_forks USING btree (index)"
      },
      {
        "name": "pk_extdataempty_forks",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataempty_forks ON extdataempty_forks USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdataempty_forks",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataempty_forks",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_forks",
        "def": "CREATE TRIGGER ti_extdataempty_forks BEFORE INSERT ON extdataempty_forks FOR EACH ROW EXECUTE FUNCTION ftiu_extdataempty_forks()"
      },
      {
        "name": "tu_extdataempty_forks",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_forks",
        "def": "CREATE TRIGGER tu_extdataempty_forks BEFORE UPDATE OF field, index ON extdataempty_forks FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataempty_forks()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdataempty_groups",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataempty_groups_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataempty_groups_index ON extdataempty_groups USING btree (index)"
      },
      {
        "name": "pk_extdataempty_groups",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataempty_groups ON extdataempty_groups USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdataempty_groups",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataempty_groups",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_groups",
        "def": "CREATE TRIGGER ti_extdataempty_groups BEFORE INSERT ON extdataempty_groups FOR EACH ROW EXECUTE FUNCTION ftiu_extdataempty_groups()"
      },
      {
        "name": "tu_extdataempty_groups",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_groups",
        "def": "CREATE TRIGGER tu_extdataempty_groups BEFORE UPDATE OF field, index ON extdataempty_groups FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataempty_groups()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdataempty_items",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataempty_items_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataempty_items_index ON extdataempty_items USING btree (index)"
      },
      {
        "name": "pk_extdataempty_items",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataempty_items ON extdataempty_items USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdataempty_items",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataempty_items",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_items",
        "def": "CREATE TRIGGER ti_extdataempty_items BEFORE INSERT ON extdataempty_items FOR EACH ROW EXECUTE FUNCTION ftiu_extdataempty_items()"
      },
      {
        "name": "tu_extdataempty_items",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_items",
        "def": "CREATE TRIGGER tu_extdataempty_items BEFORE UPDATE OF field, index ON extdataempty_items FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataempty_items()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdataempty_ledgers",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataempty_ledgers_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataempty_ledgers_index ON extdataempty_ledgers USING btree (index)"
      },
      {
        "name": "pk_extdataempty_ledgers",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataempty_ledgers ON extdataempty_ledgers USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdataempty_ledgers",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataempty_ledgers",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_ledgers",
        "def": "CREATE TRIGGER ti_extdataempty_ledgers BEFORE INSERT ON extdataempty_ledgers FOR EACH ROW EXECUTE FUNCTION ftiu_extdataempty_ledgers()"
      },
      {
        "name": "tu_extdataempty_ledgers",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_ledgers",
        "def": "CREATE TRIGGER tu_extdataempty_ledgers BEFORE UPDATE OF field, index ON extdataempty_ledgers FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataempty_ledgers()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdataempty_links",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataempty_links_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataempty_links_index ON extdataempty_links USING btree (index)"
      },
      {
        "name": "pk_extdataempty_links",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataempty_links ON extdataempty_links USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdataempty_links",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataempty_links",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_links",
        "def": "CREATE TRIGGER ti_extdataempty_links BEFORE INSERT ON extdataempty_links FOR EACH ROW EXECUTE FUNCTION ftiu_extdataempty_links()"
      },
      {
        "name": "tu_extdataempty_links",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_links",
        "def": "CREATE TRIGGER tu_extdataempty_links BEFORE UPDATE OF field, index ON extdataempty_links FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataempty_links()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdataempty_mailinglists",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataempty_mailinglists_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataempty_mailinglists_index ON extdataempty_mailinglists USING btree (index)"
      },
      {
        "name": "pk_extdataempty_mailinglists",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataempty_mailinglists ON extdataempty_mailinglists USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdataempty_mailinglists",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataempty_mailinglists",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_mailinglists",
        "def": "CREATE TRIGGER ti_extdataempty_mailinglists BEFORE INSERT ON extdataempty_mailinglists FOR EACH ROW EXECUTE FUNCTION ftiu_extdataempty_mailinglists()"
      },
      {
        "name": "tu_extdataempty_mailinglists",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_mailinglists",
        "def": "CREATE TRIGGER tu_extdataempty_mailinglists BEFORE UPDATE OF field, index ON extdataempty_mailinglists FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataempty_mailinglists()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdataempty_mailservers",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataempty_mailservers_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataempty_mailservers_index ON extdataempty_mailservers USING btree (index)"
      },
      {
        "name": "pk_extdataempty_mailservers",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataempty_mailservers ON extdataempty_mailservers USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdataempty_mailservers",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataempty_mailservers",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_mailservers",
        "def": "CREATE TRIGGER ti_extdataempty_mailservers BEFORE INSERT ON extdataempty_mailservers FOR EACH ROW EXECUTE FUNCTION ftiu_extdataempty_mailservers()"
      },
      {
        "name": "tu_extdataempty_mailservers",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_mailservers",
        "def": "CREATE TRIGGER tu_extdataempty_mailservers BEFORE UPDATE OF field, index ON extdataempty_mailservers FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataempty_mailservers()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdataempty_messages",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataempty_messages_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataempty_messages_index ON extdataempty_messages USING btree (index)"
      },
      {
        "name": "pk_extdataempty_messages",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataempty_messages ON extdataempty_messages USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdataempty_messages",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataempty_messages",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_messages",
        "def": "CREATE TRIGGER ti_extdataempty_messages BEFORE INSERT ON extdataempty_messages FOR EACH ROW EXECUTE FUNCTION ftiu_extdataempty_messages()"
      },
      {
        "name": "tu_extdataempty_messages",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_messages",
        "def": "CREATE TRIGGER tu_extdataempty_messages BEFORE UPDATE OF field, index ON extdataempty_messages FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataempty_messages()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdataempty_notes",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataempty_notes_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataempty_notes_index ON extdataempty_notes USING btree (index)"
      },
      {
        "name": "pk_extdataempty_notes",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataempty_notes ON extdataempty_notes USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdataempty_notes",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataempty_notes",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_notes",
        "def": "CREATE TRIGGER ti_extdataempty_notes BEFORE INSERT ON extdataempty_notes FOR EACH ROW EXECUTE FUNCTION ftiu_extdataempty_notes()"
      },
      {
        "name": "tu_extdataempty_notes",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_notes",
        "def": "CREATE TRIGGER tu_extdataempty_notes BEFORE UPDATE OF field, index ON extdataempty_notes FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataempty_notes()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdataempty_objects",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataempty_objects_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataempty_objects_index ON extdataempty_objects USING btree (index)"
      },
      {
        "name": "pk_extdataempty_objects",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataempty_objects ON extdataempty_objects USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdataempty_objects",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataempty_objects",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_objects",
        "def": "CREATE TRIGGER ti_extdataempty_objects BEFORE INSERT ON extdataempty_objects FOR EACH ROW EXECUTE FUNCTION ftiu_extdataempty_objects()"
      },
      {
        "name": "tu_extdataempty_objects",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_objects",
        "def": "CREATE TRIGGER tu_extdataempty_objects BEFORE UPDATE OF field, index ON extdataempty_objects FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataempty_objects()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdataempty_opportunities",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataempty_opportunities_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataempty_opportunities_index ON extdataempty_opportunities USING btree (index)"
      },
      {
        "name": "pk_extdataempty_opportunities",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataempty_opportunities ON extdataempty_opportunities USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdataempty_opportunities",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataempty_opportunities",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_opportunities",
        "def": "CREATE TRIGGER ti_extdataempty_opportunities BEFORE INSERT ON extdataempty_opportunities FOR EACH ROW EXECUTE FUNCTION ftiu_extdataempty_opportunities()"
      },
      {
        "name": "tu_extdataempty_opportunities",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_opportunities",
        "def": "CREATE TRIGGER tu_extdataempty_opportunities BEFORE UPDATE OF field, index ON extdataempty_opportunities FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataempty_opportunities()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdataempty_participants",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataempty_participants_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataempty_participants_index ON extdataempty_participants USING btree (index)"
      },
      {
        "name": "pk_extdataempty_participants",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataempty_participants ON extdataempty_participants USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdataempty_participants",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataempty_participants",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_participants",
        "def": "CREATE TRIGGER ti_extdataempty_participants BEFORE INSERT ON extdataempty_participants FOR EACH ROW EXECUTE FUNCTION ftiu_extdataempty_participants()"
      },
      {
        "name": "tu_extdataempty_participants",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_participants",
        "def": "CREATE TRIGGER tu_extdataempty_participants BEFORE UPDATE OF field, index ON extdataempty_participants FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataempty_participants()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdataempty_payments",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataempty_payments_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataempty_payments_index ON extdataempty_payments USING btree (index)"
      },
      {
        "name": "pk_extdataempty_payments",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataempty_payments ON extdataempty_payments USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdataempty_payments",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataempty_payments",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_payments",
        "def": "CREATE TRIGGER ti_extdataempty_payments BEFORE INSERT ON extdataempty_payments FOR EACH ROW EXECUTE FUNCTION ftiu_extdataempty_payments()"
      },
      {
        "name": "tu_extdataempty_payments",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_payments",
        "def": "CREATE TRIGGER tu_extdataempty_payments BEFORE UPDATE OF field, index ON extdataempty_payments FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataempty_payments()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdataempty_pricelists",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataempty_pricelists_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataempty_pricelists_index ON extdataempty_pricelists USING btree (index)"
      },
      {
        "name": "pk_extdataempty_pricelists",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataempty_pricelists ON extdataempty_pricelists USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdataempty_pricelists",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataempty_pricelists",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_pricelists",
        "def": "CREATE TRIGGER ti_extdataempty_pricelists BEFORE INSERT ON extdataempty_pricelists FOR EACH ROW EXECUTE FUNCTION ftiu_extdataempty_pricelists()"
      },
      {
        "name": "tu_extdataempty_pricelists",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_pricelists",
        "def": "CREATE TRIGGER tu_extdataempty_pricelists BEFORE UPDATE OF field, index ON extdataempty_pricelists FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataempty_pricelists()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdataempty_projects",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataempty_projects_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataempty_projects_index ON extdataempty_projects USING btree (index)"
      },
      {
        "name": "pk_extdataempty_projects",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataempty_projects ON extdataempty_projects USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdataempty_projects",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataempty_projects",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_projects",
        "def": "CREATE TRIGGER ti_extdataempty_projects BEFORE INSERT ON extdataempty_projects FOR EACH ROW EXECUTE FUNCTION ftiu_extdataempty_projects()"
      },
      {
        "name": "tu_extdataempty_projects",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_projects",
        "def": "CREATE TRIGGER tu_extdataempty_projects BEFORE UPDATE OF field, index ON extdataempty_projects FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataempty_projects()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdataempty_resources",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataempty_resources_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataempty_resources_index ON extdataempty_resources USING btree (index)"
      },
      {
        "name": "pk_extdataempty_resources",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataempty_resources ON extdataempty_resources USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdataempty_resources",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataempty_resources",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_resources",
        "def": "CREATE TRIGGER ti_extdataempty_resources BEFORE INSERT ON extdataempty_resources FOR EACH ROW EXECUTE FUNCTION ftiu_extdataempty_resources()"
      },
      {
        "name": "tu_extdataempty_resources",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_resources",
        "def": "CREATE TRIGGER tu_extdataempty_resources BEFORE UPDATE OF field, index ON extdataempty_resources FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataempty_resources()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdataempty_services",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataempty_services_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataempty_services_index ON extdataempty_services USING btree (index)"
      },
      {
        "name": "pk_extdataempty_services",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataempty_services ON extdataempty_services USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdataempty_services",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataempty_services",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_services",
        "def": "CREATE TRIGGER ti_extdataempty_services BEFORE INSERT ON extdataempty_services FOR EACH ROW EXECUTE FUNCTION ftiu_extdataempty_services()"
      },
      {
        "name": "tu_extdataempty_services",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_services",
        "def": "CREATE TRIGGER tu_extdataempty_services BEFORE UPDATE OF field, index ON extdataempty_services FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataempty_services()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdataempty_stocktransactions",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataempty_stocktransactions_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataempty_stocktransactions_index ON extdataempty_stocktransactions USING btree (index)"
      },
      {
        "name": "pk_extdataempty_stocktransactions",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataempty_stocktransactions ON extdataempty_stocktransactions USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdataempty_stocktransactions",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataempty_stocktransactions",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_stocktransactions",
        "def": "CREATE TRIGGER ti_extdataempty_stocktransactions BEFORE INSERT ON extdataempty_stocktransactions FOR EACH ROW EXECUTE FUNCTION ftiu_extdataempty_stocktransactions()"
      },
      {
        "name": "tu_extdataempty_stocktransactions",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_stocktransactions",
        "def": "CREATE TRIGGER tu_extdataempty_stocktransactions BEFORE UPDATE OF field, index ON extdataempty_stocktransactions FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataempty_stocktransactions()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdataempty_storages",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataempty_storages_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataempty_storages_index ON extdataempty_storages USING btree (index)"
      },
      {
        "name": "pk_extdataempty_storages",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataempty_storages ON extdataempty_storages USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdataempty_storages",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataempty_storages",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_storages",
        "def": "CREATE TRIGGER ti_extdataempty_storages BEFORE INSERT ON extdataempty_storages FOR EACH ROW EXECUTE FUNCTION ftiu_extdataempty_storages()"
      },
      {
        "name": "tu_extdataempty_storages",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_storages",
        "def": "CREATE TRIGGER tu_extdataempty_storages BEFORE UPDATE OF field, index ON extdataempty_storages FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataempty_storages()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdataempty_tasks",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataempty_tasks_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataempty_tasks_index ON extdataempty_tasks USING btree (index)"
      },
      {
        "name": "pk_extdataempty_tasks",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataempty_tasks ON extdataempty_tasks USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdataempty_tasks",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataempty_tasks",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_tasks",
        "def": "CREATE TRIGGER ti_extdataempty_tasks BEFORE INSERT ON extdataempty_tasks FOR EACH ROW EXECUTE FUNCTION ftiu_extdataempty_tasks()"
      },
      {
        "name": "tu_extdataempty_tasks",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_tasks",
        "def": "CREATE TRIGGER tu_extdataempty_tasks BEFORE UPDATE OF field, index ON extdataempty_tasks FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataempty_tasks()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdataempty_tickets",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataempty_tickets_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataempty_tickets_index ON extdataempty_tickets USING btree (index)"
      },
      {
        "name": "pk_extdataempty_tickets",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataempty_tickets ON extdataempty_tickets USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdataempty_tickets",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataempty_tickets",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_tickets",
        "def": "CREATE TRIGGER ti_extdataempty_tickets BEFORE INSERT ON extdataempty_tickets FOR EACH ROW EXECUTE FUNCTION ftiu_extdataempty_tickets()"
      },
      {
        "name": "tu_extdataempty_tickets",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_tickets",
        "def": "CREATE TRIGGER tu_extdataempty_tickets BEFORE UPDATE OF field, index ON extdataempty_tickets FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataempty_tickets()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdataempty_transactions",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataempty_transactions_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataempty_transactions_index ON extdataempty_transactions USING btree (index)"
      },
      {
        "name": "pk_extdataempty_transactions",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataempty_transactions ON extdataempty_transactions USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdataempty_transactions",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataempty_transactions",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_transactions",
        "def": "CREATE TRIGGER ti_extdataempty_transactions BEFORE INSERT ON extdataempty_transactions FOR EACH ROW EXECUTE FUNCTION ftiu_extdataempty_transactions()"
      },
      {
        "name": "tu_extdataempty_transactions",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_transactions",
        "def": "CREATE TRIGGER tu_extdataempty_transactions BEFORE UPDATE OF field, index ON extdataempty_transactions FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataempty_transactions()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdataempty_users",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataempty_users_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataempty_users_index ON extdataempty_users USING btree (index)"
      },
      {
        "name": "pk_extdataempty_users",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataempty_users ON extdataempty_users USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdataempty_users",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataempty_users",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_users",
        "def": "CREATE TRIGGER ti_extdataempty_users BEFORE INSERT ON extdataempty_users FOR EACH ROW EXECUTE FUNCTION ftiu_extdataempty_users()"
      },
      {
        "name": "tu_extdataempty_users",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_users",
        "def": "CREATE TRIGGER tu_extdataempty_users BEFORE UPDATE OF field, index ON extdataempty_users FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataempty_users()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdataempty_weblets",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataempty_weblets_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataempty_weblets_index ON extdataempty_weblets USING btree (index)"
      },
      {
        "name": "pk_extdataempty_weblets",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataempty_weblets ON extdataempty_weblets USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdataempty_weblets",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataempty_weblets",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_weblets",
        "def": "CREATE TRIGGER ti_extdataempty_weblets BEFORE INSERT ON extdataempty_weblets FOR EACH ROW EXECUTE FUNCTION ftiu_extdataempty_weblets()"
      },
      {
        "name": "tu_extdataempty_weblets",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataempty_weblets",
        "def": "CREATE TRIGGER tu_extdataempty_weblets BEFORE UPDATE OF field, index ON extdataempty_weblets FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataempty_weblets()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdatafields",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": true,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "entity",
        "type": "t_entity",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "name",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "pk_extdatafields",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatafields ON extdatafields USING btree (\"ID\")"
      },
      {
        "name": "u_extdatafields_entity_name",
        "unique": true,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "entity",
          "name",
          "+ID"
        ],
        "def": "CREATE UNIQUE INDEX u_extdatafields_entity_name ON extdatafields USING btree (entity, name) INCLUDE (\"ID\")"
      }
    ],
    "constraints": [
      {
        "name": "c_extdatafields_entity",
        "type": "check",
        "domain": false,
        "def": "CHECK (entity <> 'records'::t_entity)"
      },
      {
        "name": "dc_extdatafields_name",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^$|^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "pk_extdatafields",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      },
      {
        "name": "u_extdatafields_entity_name",
        "type": "unique",
        "domain": false,
        "def": "UNIQUE (entity, name) INCLUDE (\"ID\")"
      }
    ],
    "triggers": [
      {
        "name": "tu_extdatafields_entity",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ft_integrity",
        "def": "CREATE TRIGGER tu_extdatafields_entity BEFORE UPDATE ON extdatafields FOR EACH ROW WHEN (old.entity <> new.entity) EXECUTE FUNCTION ft_integrity()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdatanumeric_accounts",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatanumeric_accounts_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatanumeric_accounts_index ON extdatanumeric_accounts USING btree (index)"
      },
      {
        "name": "pk_extdatanumeric_accounts",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatanumeric_accounts ON extdatanumeric_accounts USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdatanumeric_number",
        "type": "check",
        "domain": false,
        "def": "CHECK ((number <> ALL (ARRAY['NaN'::numeric, 'Infinity'::numeric, '-Infinity'::numeric])) AND scale(number) = min_scale(number))"
      },
      {
        "name": "c_extdatanumeric_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdatanumeric_accounts",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdatanumeric_accounts",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_accounts",
        "def": "CREATE TRIGGER ti_extdatanumeric_accounts BEFORE INSERT ON extdatanumeric_accounts FOR EACH ROW EXECUTE FUNCTION ftiu_extdatanumeric_accounts()"
      },
      {
        "name": "tu_extdatanumeric_accounts",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_accounts",
        "def": "CREATE TRIGGER tu_extdatanumeric_accounts BEFORE UPDATE OF field, index ON extdatanumeric_accounts FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatanumeric_accounts()"
      }
    ],
    "rules": [],
    "statistics": [
      {
        "name": "st_extdatanumeric_accounts_field_number",
        "def": "CREATE STATISTICS st_extdatanumeric_accounts_field_number ON field, number FROM extdatanumeric_accounts"
      },
      {
        "name": "st_extdatanumeric_accounts_field_value",
        "def": "CREATE STATISTICS st_extdatanumeric_accounts_field_value ON field, COALESCE(value, number::text) FROM extdatanumeric_accounts"
      }
    ],
    "def": null
  },
  {
    "name": "extdatanumeric_actionsteps",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatanumeric_actionsteps_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatanumeric_actionsteps_index ON extdatanumeric_actionsteps USING btree (index)"
      },
      {
        "name": "pk_extdatanumeric_actionsteps",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatanumeric_actionsteps ON extdatanumeric_actionsteps USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdatanumeric_number",
        "type": "check",
        "domain": false,
        "def": "CHECK ((number <> ALL (ARRAY['NaN'::numeric, 'Infinity'::numeric, '-Infinity'::numeric])) AND scale(number) = min_scale(number))"
      },
      {
        "name": "c_extdatanumeric_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdatanumeric_actionsteps",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdatanumeric_actionsteps",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_actionsteps",
        "def": "CREATE TRIGGER ti_extdatanumeric_actionsteps BEFORE INSERT ON extdatanumeric_actionsteps FOR EACH ROW EXECUTE FUNCTION ftiu_extdatanumeric_actionsteps()"
      },
      {
        "name": "tu_extdatanumeric_actionsteps",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_actionsteps",
        "def": "CREATE TRIGGER tu_extdatanumeric_actionsteps BEFORE UPDATE OF field, index ON extdatanumeric_actionsteps FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatanumeric_actionsteps()"
      }
    ],
    "rules": [],
    "statistics": [
      {
        "name": "st_extdatanumeric_actionsteps_field_number",
        "def": "CREATE STATISTICS st_extdatanumeric_actionsteps_field_number ON field, number FROM extdatanumeric_actionsteps"
      },
      {
        "name": "st_extdatanumeric_actionsteps_field_value",
        "def": "CREATE STATISTICS st_extdatanumeric_actionsteps_field_value ON field, COALESCE(value, number::text) FROM extdatanumeric_actionsteps"
      }
    ],
    "def": null
  },
  {
    "name": "extdatanumeric_applications",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatanumeric_applications_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatanumeric_applications_index ON extdatanumeric_applications USING btree (index)"
      },
      {
        "name": "pk_extdatanumeric_applications",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatanumeric_applications ON extdatanumeric_applications USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdatanumeric_number",
        "type": "check",
        "domain": false,
        "def": "CHECK ((number <> ALL (ARRAY['NaN'::numeric, 'Infinity'::numeric, '-Infinity'::numeric])) AND scale(number) = min_scale(number))"
      },
      {
        "name": "c_extdatanumeric_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdatanumeric_applications",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdatanumeric_applications",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_applications",
        "def": "CREATE TRIGGER ti_extdatanumeric_applications BEFORE INSERT ON extdatanumeric_applications FOR EACH ROW EXECUTE FUNCTION ftiu_extdatanumeric_applications()"
      },
      {
        "name": "tu_extdatanumeric_applications",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_applications",
        "def": "CREATE TRIGGER tu_extdatanumeric_applications BEFORE UPDATE OF field, index ON extdatanumeric_applications FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatanumeric_applications()"
      }
    ],
    "rules": [],
    "statistics": [
      {
        "name": "st_extdatanumeric_applications_field_number",
        "def": "CREATE STATISTICS st_extdatanumeric_applications_field_number ON field, number FROM extdatanumeric_applications"
      },
      {
        "name": "st_extdatanumeric_applications_field_value",
        "def": "CREATE STATISTICS st_extdatanumeric_applications_field_value ON field, COALESCE(value, number::text) FROM extdatanumeric_applications"
      }
    ],
    "def": null
  },
  {
    "name": "extdatanumeric_appointments",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatanumeric_appointments_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatanumeric_appointments_index ON extdatanumeric_appointments USING btree (index)"
      },
      {
        "name": "pk_extdatanumeric_appointments",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatanumeric_appointments ON extdatanumeric_appointments USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdatanumeric_number",
        "type": "check",
        "domain": false,
        "def": "CHECK ((number <> ALL (ARRAY['NaN'::numeric, 'Infinity'::numeric, '-Infinity'::numeric])) AND scale(number) = min_scale(number))"
      },
      {
        "name": "c_extdatanumeric_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdatanumeric_appointments",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdatanumeric_appointments",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_appointments",
        "def": "CREATE TRIGGER ti_extdatanumeric_appointments BEFORE INSERT ON extdatanumeric_appointments FOR EACH ROW EXECUTE FUNCTION ftiu_extdatanumeric_appointments()"
      },
      {
        "name": "tu_extdatanumeric_appointments",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_appointments",
        "def": "CREATE TRIGGER tu_extdatanumeric_appointments BEFORE UPDATE OF field, index ON extdatanumeric_appointments FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatanumeric_appointments()"
      }
    ],
    "rules": [],
    "statistics": [
      {
        "name": "st_extdatanumeric_appointments_field_number",
        "def": "CREATE STATISTICS st_extdatanumeric_appointments_field_number ON field, number FROM extdatanumeric_appointments"
      },
      {
        "name": "st_extdatanumeric_appointments_field_value",
        "def": "CREATE STATISTICS st_extdatanumeric_appointments_field_value ON field, COALESCE(value, number::text) FROM extdatanumeric_appointments"
      }
    ],
    "def": null
  },
  {
    "name": "extdatanumeric_campaigns",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatanumeric_campaigns_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatanumeric_campaigns_index ON extdatanumeric_campaigns USING btree (index)"
      },
      {
        "name": "pk_extdatanumeric_campaigns",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatanumeric_campaigns ON extdatanumeric_campaigns USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdatanumeric_number",
        "type": "check",
        "domain": false,
        "def": "CHECK ((number <> ALL (ARRAY['NaN'::numeric, 'Infinity'::numeric, '-Infinity'::numeric])) AND scale(number) = min_scale(number))"
      },
      {
        "name": "c_extdatanumeric_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdatanumeric_campaigns",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdatanumeric_campaigns",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_campaigns",
        "def": "CREATE TRIGGER ti_extdatanumeric_campaigns BEFORE INSERT ON extdatanumeric_campaigns FOR EACH ROW EXECUTE FUNCTION ftiu_extdatanumeric_campaigns()"
      },
      {
        "name": "ti_extdatanumeric_channels",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_channels",
        "def": "CREATE TRIGGER ti_extdatanumeric_channels BEFORE INSERT ON extdatanumeric_campaigns FOR EACH ROW EXECUTE FUNCTION ftiu_extdatanumeric_channels()"
      },
      {
        "name": "tu_extdatanumeric_campaigns",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_campaigns",
        "def": "CREATE TRIGGER tu_extdatanumeric_campaigns BEFORE UPDATE OF field, index ON extdatanumeric_campaigns FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatanumeric_campaigns()"
      }
    ],
    "rules": [],
    "statistics": [
      {
        "name": "st_extdatanumeric_campaigns_field_number",
        "def": "CREATE STATISTICS st_extdatanumeric_campaigns_field_number ON field, number FROM extdatanumeric_campaigns"
      },
      {
        "name": "st_extdatanumeric_campaigns_field_value",
        "def": "CREATE STATISTICS st_extdatanumeric_campaigns_field_value ON field, COALESCE(value, number::text) FROM extdatanumeric_campaigns"
      }
    ],
    "def": null
  },
  {
    "name": "extdatanumeric_channels",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatanumeric_channels_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatanumeric_channels_index ON extdatanumeric_channels USING btree (index)"
      },
      {
        "name": "pk_extdatanumeric_channels",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatanumeric_channels ON extdatanumeric_channels USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdatanumeric_number",
        "type": "check",
        "domain": false,
        "def": "CHECK ((number <> ALL (ARRAY['NaN'::numeric, 'Infinity'::numeric, '-Infinity'::numeric])) AND scale(number) = min_scale(number))"
      },
      {
        "name": "c_extdatanumeric_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdatanumeric_channels",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "tu_extdatanumeric_channels",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_channels",
        "def": "CREATE TRIGGER tu_extdatanumeric_channels BEFORE UPDATE OF field, index ON extdatanumeric_channels FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatanumeric_channels()"
      }
    ],
    "rules": [],
    "statistics": [
      {
        "name": "st_extdatanumeric_channels_field_number",
        "def": "CREATE STATISTICS st_extdatanumeric_channels_field_number ON field, number FROM extdatanumeric_channels"
      },
      {
        "name": "st_extdatanumeric_channels_field_value",
        "def": "CREATE STATISTICS st_extdatanumeric_channels_field_value ON field, COALESCE(value, number::text) FROM extdatanumeric_channels"
      }
    ],
    "def": null
  },
  {
    "name": "extdatanumeric_contacts",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatanumeric_contacts_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatanumeric_contacts_index ON extdatanumeric_contacts USING btree (index)"
      },
      {
        "name": "pk_extdatanumeric_contacts",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatanumeric_contacts ON extdatanumeric_contacts USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdatanumeric_number",
        "type": "check",
        "domain": false,
        "def": "CHECK ((number <> ALL (ARRAY['NaN'::numeric, 'Infinity'::numeric, '-Infinity'::numeric])) AND scale(number) = min_scale(number))"
      },
      {
        "name": "c_extdatanumeric_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdatanumeric_contacts",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdatanumeric_contacts",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_contacts",
        "def": "CREATE TRIGGER ti_extdatanumeric_contacts BEFORE INSERT ON extdatanumeric_contacts FOR EACH ROW EXECUTE FUNCTION ftiu_extdatanumeric_contacts()"
      },
      {
        "name": "tu_extdatanumeric_contacts",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_contacts",
        "def": "CREATE TRIGGER tu_extdatanumeric_contacts BEFORE UPDATE OF field, index ON extdatanumeric_contacts FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatanumeric_contacts()"
      }
    ],
    "rules": [],
    "statistics": [
      {
        "name": "st_extdatanumeric_contacts_field_number",
        "def": "CREATE STATISTICS st_extdatanumeric_contacts_field_number ON field, number FROM extdatanumeric_contacts"
      },
      {
        "name": "st_extdatanumeric_contacts_field_value",
        "def": "CREATE STATISTICS st_extdatanumeric_contacts_field_value ON field, COALESCE(value, number::text) FROM extdatanumeric_contacts"
      }
    ],
    "def": null
  },
  {
    "name": "extdatanumeric_contracts",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatanumeric_contracts_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatanumeric_contracts_index ON extdatanumeric_contracts USING btree (index)"
      },
      {
        "name": "pk_extdatanumeric_contracts",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatanumeric_contracts ON extdatanumeric_contracts USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdatanumeric_number",
        "type": "check",
        "domain": false,
        "def": "CHECK ((number <> ALL (ARRAY['NaN'::numeric, 'Infinity'::numeric, '-Infinity'::numeric])) AND scale(number) = min_scale(number))"
      },
      {
        "name": "c_extdatanumeric_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdatanumeric_contracts",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdatanumeric_contracts",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_contracts",
        "def": "CREATE TRIGGER ti_extdatanumeric_contracts BEFORE INSERT ON extdatanumeric_contracts FOR EACH ROW EXECUTE FUNCTION ftiu_extdatanumeric_contracts()"
      },
      {
        "name": "tu_extdatanumeric_contracts",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_contracts",
        "def": "CREATE TRIGGER tu_extdatanumeric_contracts BEFORE UPDATE OF field, index ON extdatanumeric_contracts FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatanumeric_contracts()"
      }
    ],
    "rules": [],
    "statistics": [
      {
        "name": "st_extdatanumeric_contracts_field_number",
        "def": "CREATE STATISTICS st_extdatanumeric_contracts_field_number ON field, number FROM extdatanumeric_contracts"
      },
      {
        "name": "st_extdatanumeric_contracts_field_value",
        "def": "CREATE STATISTICS st_extdatanumeric_contracts_field_value ON field, COALESCE(value, number::text) FROM extdatanumeric_contracts"
      }
    ],
    "def": null
  },
  {
    "name": "extdatanumeric_couponcodes",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatanumeric_couponcodes_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatanumeric_couponcodes_index ON extdatanumeric_couponcodes USING btree (index)"
      },
      {
        "name": "pk_extdatanumeric_couponcodes",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatanumeric_couponcodes ON extdatanumeric_couponcodes USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdatanumeric_number",
        "type": "check",
        "domain": false,
        "def": "CHECK ((number <> ALL (ARRAY['NaN'::numeric, 'Infinity'::numeric, '-Infinity'::numeric])) AND scale(number) = min_scale(number))"
      },
      {
        "name": "c_extdatanumeric_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdatanumeric_couponcodes",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdatanumeric_couponcodes",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_couponcodes",
        "def": "CREATE TRIGGER ti_extdatanumeric_couponcodes BEFORE INSERT ON extdatanumeric_couponcodes FOR EACH ROW EXECUTE FUNCTION ftiu_extdatanumeric_couponcodes()"
      },
      {
        "name": "tu_extdatanumeric_couponcodes",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_couponcodes",
        "def": "CREATE TRIGGER tu_extdatanumeric_couponcodes BEFORE UPDATE OF field, index ON extdatanumeric_couponcodes FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatanumeric_couponcodes()"
      }
    ],
    "rules": [],
    "statistics": [
      {
        "name": "st_extdatanumeric_couponcodes_field_number",
        "def": "CREATE STATISTICS st_extdatanumeric_couponcodes_field_number ON field, number FROM extdatanumeric_couponcodes"
      },
      {
        "name": "st_extdatanumeric_couponcodes_field_value",
        "def": "CREATE STATISTICS st_extdatanumeric_couponcodes_field_value ON field, COALESCE(value, number::text) FROM extdatanumeric_couponcodes"
      }
    ],
    "def": null
  },
  {
    "name": "extdatanumeric_coupons",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatanumeric_coupons_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatanumeric_coupons_index ON extdatanumeric_coupons USING btree (index)"
      },
      {
        "name": "pk_extdatanumeric_coupons",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatanumeric_coupons ON extdatanumeric_coupons USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdatanumeric_number",
        "type": "check",
        "domain": false,
        "def": "CHECK ((number <> ALL (ARRAY['NaN'::numeric, 'Infinity'::numeric, '-Infinity'::numeric])) AND scale(number) = min_scale(number))"
      },
      {
        "name": "c_extdatanumeric_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdatanumeric_coupons",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdatanumeric_coupons",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_coupons",
        "def": "CREATE TRIGGER ti_extdatanumeric_coupons BEFORE INSERT ON extdatanumeric_coupons FOR EACH ROW EXECUTE FUNCTION ftiu_extdatanumeric_coupons()"
      },
      {
        "name": "tu_extdatanumeric_coupons",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_coupons",
        "def": "CREATE TRIGGER tu_extdatanumeric_coupons BEFORE UPDATE OF field, index ON extdatanumeric_coupons FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatanumeric_coupons()"
      }
    ],
    "rules": [],
    "statistics": [
      {
        "name": "st_extdatanumeric_coupons_field_number",
        "def": "CREATE STATISTICS st_extdatanumeric_coupons_field_number ON field, number FROM extdatanumeric_coupons"
      },
      {
        "name": "st_extdatanumeric_coupons_field_value",
        "def": "CREATE STATISTICS st_extdatanumeric_coupons_field_value ON field, COALESCE(value, number::text) FROM extdatanumeric_coupons"
      }
    ],
    "def": null
  },
  {
    "name": "extdatanumeric_customfields",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatanumeric_customfields_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatanumeric_customfields_index ON extdatanumeric_customfields USING btree (index)"
      },
      {
        "name": "pk_extdatanumeric_customfields",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatanumeric_customfields ON extdatanumeric_customfields USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdatanumeric_number",
        "type": "check",
        "domain": false,
        "def": "CHECK ((number <> ALL (ARRAY['NaN'::numeric, 'Infinity'::numeric, '-Infinity'::numeric])) AND scale(number) = min_scale(number))"
      },
      {
        "name": "c_extdatanumeric_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdatanumeric_customfields",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdatanumeric_customfields",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_customfields",
        "def": "CREATE TRIGGER ti_extdatanumeric_customfields BEFORE INSERT ON extdatanumeric_customfields FOR EACH ROW EXECUTE FUNCTION ftiu_extdatanumeric_customfields()"
      },
      {
        "name": "tu_extdatanumeric_customfields",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_customfields",
        "def": "CREATE TRIGGER tu_extdatanumeric_customfields BEFORE UPDATE OF field, index ON extdatanumeric_customfields FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatanumeric_customfields()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdatanumeric_davservers",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatanumeric_davservers_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatanumeric_davservers_index ON extdatanumeric_davservers USING btree (index)"
      },
      {
        "name": "pk_extdatanumeric_davservers",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatanumeric_davservers ON extdatanumeric_davservers USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdatanumeric_number",
        "type": "check",
        "domain": false,
        "def": "CHECK ((number <> ALL (ARRAY['NaN'::numeric, 'Infinity'::numeric, '-Infinity'::numeric])) AND scale(number) = min_scale(number))"
      },
      {
        "name": "c_extdatanumeric_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdatanumeric_davservers",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdatanumeric_davservers",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_davservers",
        "def": "CREATE TRIGGER ti_extdatanumeric_davservers BEFORE INSERT ON extdatanumeric_davservers FOR EACH ROW EXECUTE FUNCTION ftiu_extdatanumeric_davservers()"
      },
      {
        "name": "tu_extdatanumeric_davservers",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_davservers",
        "def": "CREATE TRIGGER tu_extdatanumeric_davservers BEFORE UPDATE OF field, index ON extdatanumeric_davservers FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatanumeric_davservers()"
      }
    ],
    "rules": [],
    "statistics": [
      {
        "name": "st_extdatanumeric_davservers_field_number",
        "def": "CREATE STATISTICS st_extdatanumeric_davservers_field_number ON field, number FROM extdatanumeric_davservers"
      },
      {
        "name": "st_extdatanumeric_davservers_field_value",
        "def": "CREATE STATISTICS st_extdatanumeric_davservers_field_value ON field, COALESCE(value, number::text) FROM extdatanumeric_davservers"
      }
    ],
    "def": null
  },
  {
    "name": "extdatanumeric_devices",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatanumeric_devices_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatanumeric_devices_index ON extdatanumeric_devices USING btree (index)"
      },
      {
        "name": "pk_extdatanumeric_devices",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatanumeric_devices ON extdatanumeric_devices USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdatanumeric_number",
        "type": "check",
        "domain": false,
        "def": "CHECK ((number <> ALL (ARRAY['NaN'::numeric, 'Infinity'::numeric, '-Infinity'::numeric])) AND scale(number) = min_scale(number))"
      },
      {
        "name": "c_extdatanumeric_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdatanumeric_devices",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdatanumeric_devices",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_devices",
        "def": "CREATE TRIGGER ti_extdatanumeric_devices BEFORE INSERT ON extdatanumeric_devices FOR EACH ROW EXECUTE FUNCTION ftiu_extdatanumeric_devices()"
      },
      {
        "name": "tu_extdatanumeric_devices",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_devices",
        "def": "CREATE TRIGGER tu_extdatanumeric_devices BEFORE UPDATE OF field, index ON extdatanumeric_devices FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatanumeric_devices()"
      }
    ],
    "rules": [],
    "statistics": [
      {
        "name": "st_extdatanumeric_devices_field_number",
        "def": "CREATE STATISTICS st_extdatanumeric_devices_field_number ON field, number FROM extdatanumeric_devices"
      },
      {
        "name": "st_extdatanumeric_devices_field_value",
        "def": "CREATE STATISTICS st_extdatanumeric_devices_field_value ON field, COALESCE(value, number::text) FROM extdatanumeric_devices"
      }
    ],
    "def": null
  },
  {
    "name": "extdatanumeric_documents",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatanumeric_documents_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatanumeric_documents_index ON extdatanumeric_documents USING btree (index)"
      },
      {
        "name": "pk_extdatanumeric_documents",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatanumeric_documents ON extdatanumeric_documents USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdatanumeric_number",
        "type": "check",
        "domain": false,
        "def": "CHECK ((number <> ALL (ARRAY['NaN'::numeric, 'Infinity'::numeric, '-Infinity'::numeric])) AND scale(number) = min_scale(number))"
      },
      {
        "name": "c_extdatanumeric_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdatanumeric_documents",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdatanumeric_documents",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_documents",
        "def": "CREATE TRIGGER ti_extdatanumeric_documents BEFORE INSERT ON extdatanumeric_documents FOR EACH ROW EXECUTE FUNCTION ftiu_extdatanumeric_documents()"
      },
      {
        "name": "tu_extdatanumeric_documents",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_documents",
        "def": "CREATE TRIGGER tu_extdatanumeric_documents BEFORE UPDATE OF field, index ON extdatanumeric_documents FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatanumeric_documents()"
      }
    ],
    "rules": [],
    "statistics": [
      {
        "name": "st_extdatanumeric_documents_field_number",
        "def": "CREATE STATISTICS st_extdatanumeric_documents_field_number ON field, number FROM extdatanumeric_documents"
      },
      {
        "name": "st_extdatanumeric_documents_field_value",
        "def": "CREATE STATISTICS st_extdatanumeric_documents_field_value ON field, COALESCE(value, number::text) FROM extdatanumeric_documents"
      }
    ],
    "def": null
  },
  {
    "name": "extdatanumeric_dunning",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatanumeric_dunning_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatanumeric_dunning_index ON extdatanumeric_dunning USING btree (index)"
      },
      {
        "name": "pk_extdatanumeric_dunning",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatanumeric_dunning ON extdatanumeric_dunning USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdatanumeric_number",
        "type": "check",
        "domain": false,
        "def": "CHECK ((number <> ALL (ARRAY['NaN'::numeric, 'Infinity'::numeric, '-Infinity'::numeric])) AND scale(number) = min_scale(number))"
      },
      {
        "name": "c_extdatanumeric_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdatanumeric_dunning",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdatanumeric_dunning",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_dunning",
        "def": "CREATE TRIGGER ti_extdatanumeric_dunning BEFORE INSERT ON extdatanumeric_dunning FOR EACH ROW EXECUTE FUNCTION ftiu_extdatanumeric_dunning()"
      },
      {
        "name": "tu_extdatanumeric_dunning",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_dunning",
        "def": "CREATE TRIGGER tu_extdatanumeric_dunning BEFORE UPDATE OF field, index ON extdatanumeric_dunning FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatanumeric_dunning()"
      }
    ],
    "rules": [],
    "statistics": [
      {
        "name": "st_extdatanumeric_dunning_field_number",
        "def": "CREATE STATISTICS st_extdatanumeric_dunning_field_number ON field, number FROM extdatanumeric_dunning"
      },
      {
        "name": "st_extdatanumeric_dunning_field_value",
        "def": "CREATE STATISTICS st_extdatanumeric_dunning_field_value ON field, COALESCE(value, number::text) FROM extdatanumeric_dunning"
      }
    ],
    "def": null
  },
  {
    "name": "extdatanumeric_feedservers",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatanumeric_feedservers_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatanumeric_feedservers_index ON extdatanumeric_feedservers USING btree (index)"
      },
      {
        "name": "pk_extdatanumeric_feedservers",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatanumeric_feedservers ON extdatanumeric_feedservers USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdatanumeric_number",
        "type": "check",
        "domain": false,
        "def": "CHECK ((number <> ALL (ARRAY['NaN'::numeric, 'Infinity'::numeric, '-Infinity'::numeric])) AND scale(number) = min_scale(number))"
      },
      {
        "name": "c_extdatanumeric_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdatanumeric_feedservers",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdatanumeric_feedservers",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_feedservers",
        "def": "CREATE TRIGGER ti_extdatanumeric_feedservers BEFORE INSERT ON extdatanumeric_feedservers FOR EACH ROW EXECUTE FUNCTION ftiu_extdatanumeric_feedservers()"
      },
      {
        "name": "tu_extdatanumeric_feedservers",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_feedservers",
        "def": "CREATE TRIGGER tu_extdatanumeric_feedservers BEFORE UPDATE OF field, index ON extdatanumeric_feedservers FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatanumeric_feedservers()"
      }
    ],
    "rules": [],
    "statistics": [
      {
        "name": "st_extdatanumeric_feedservers_field_number",
        "def": "CREATE STATISTICS st_extdatanumeric_feedservers_field_number ON field, number FROM extdatanumeric_feedservers"
      },
      {
        "name": "st_extdatanumeric_feedservers_field_value",
        "def": "CREATE STATISTICS st_extdatanumeric_feedservers_field_value ON field, COALESCE(value, number::text) FROM extdatanumeric_feedservers"
      }
    ],
    "def": null
  },
  {
    "name": "extdatanumeric_forks",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatanumeric_forks_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatanumeric_forks_index ON extdatanumeric_forks USING btree (index)"
      },
      {
        "name": "pk_extdatanumeric_forks",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatanumeric_forks ON extdatanumeric_forks USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdatanumeric_number",
        "type": "check",
        "domain": false,
        "def": "CHECK ((number <> ALL (ARRAY['NaN'::numeric, 'Infinity'::numeric, '-Infinity'::numeric])) AND scale(number) = min_scale(number))"
      },
      {
        "name": "c_extdatanumeric_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdatanumeric_forks",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdatanumeric_forks",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_forks",
        "def": "CREATE TRIGGER ti_extdatanumeric_forks BEFORE INSERT ON extdatanumeric_forks FOR EACH ROW EXECUTE FUNCTION ftiu_extdatanumeric_forks()"
      },
      {
        "name": "tu_extdatanumeric_forks",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_forks",
        "def": "CREATE TRIGGER tu_extdatanumeric_forks BEFORE UPDATE OF field, index ON extdatanumeric_forks FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatanumeric_forks()"
      }
    ],
    "rules": [],
    "statistics": [
      {
        "name": "st_extdatanumeric_forks_field_number",
        "def": "CREATE STATISTICS st_extdatanumeric_forks_field_number ON field, number FROM extdatanumeric_forks"
      },
      {
        "name": "st_extdatanumeric_forks_field_value",
        "def": "CREATE STATISTICS st_extdatanumeric_forks_field_value ON field, COALESCE(value, number::text) FROM extdatanumeric_forks"
      }
    ],
    "def": null
  },
  {
    "name": "extdatanumeric_groups",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatanumeric_groups_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatanumeric_groups_index ON extdatanumeric_groups USING btree (index)"
      },
      {
        "name": "pk_extdatanumeric_groups",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatanumeric_groups ON extdatanumeric_groups USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdatanumeric_number",
        "type": "check",
        "domain": false,
        "def": "CHECK ((number <> ALL (ARRAY['NaN'::numeric, 'Infinity'::numeric, '-Infinity'::numeric])) AND scale(number) = min_scale(number))"
      },
      {
        "name": "c_extdatanumeric_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdatanumeric_groups",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdatanumeric_groups",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_groups",
        "def": "CREATE TRIGGER ti_extdatanumeric_groups BEFORE INSERT ON extdatanumeric_groups FOR EACH ROW EXECUTE FUNCTION ftiu_extdatanumeric_groups()"
      },
      {
        "name": "tu_extdatanumeric_groups",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_groups",
        "def": "CREATE TRIGGER tu_extdatanumeric_groups BEFORE UPDATE OF field, index ON extdatanumeric_groups FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatanumeric_groups()"
      }
    ],
    "rules": [],
    "statistics": [
      {
        "name": "st_extdatanumeric_groups_field_number",
        "def": "CREATE STATISTICS st_extdatanumeric_groups_field_number ON field, number FROM extdatanumeric_groups"
      },
      {
        "name": "st_extdatanumeric_groups_field_value",
        "def": "CREATE STATISTICS st_extdatanumeric_groups_field_value ON field, COALESCE(value, number::text) FROM extdatanumeric_groups"
      }
    ],
    "def": null
  },
  {
    "name": "extdatanumeric_items",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatanumeric_items_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatanumeric_items_index ON extdatanumeric_items USING btree (index)"
      },
      {
        "name": "pk_extdatanumeric_items",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatanumeric_items ON extdatanumeric_items USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdatanumeric_number",
        "type": "check",
        "domain": false,
        "def": "CHECK ((number <> ALL (ARRAY['NaN'::numeric, 'Infinity'::numeric, '-Infinity'::numeric])) AND scale(number) = min_scale(number))"
      },
      {
        "name": "c_extdatanumeric_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdatanumeric_items",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdatanumeric_items",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_items",
        "def": "CREATE TRIGGER ti_extdatanumeric_items BEFORE INSERT ON extdatanumeric_items FOR EACH ROW EXECUTE FUNCTION ftiu_extdatanumeric_items()"
      },
      {
        "name": "tu_extdatanumeric_items",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_items",
        "def": "CREATE TRIGGER tu_extdatanumeric_items BEFORE UPDATE OF field, index ON extdatanumeric_items FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatanumeric_items()"
      }
    ],
    "rules": [],
    "statistics": [
      {
        "name": "st_extdatanumeric_items_field_number",
        "def": "CREATE STATISTICS st_extdatanumeric_items_field_number ON field, number FROM extdatanumeric_items"
      },
      {
        "name": "st_extdatanumeric_items_field_value",
        "def": "CREATE STATISTICS st_extdatanumeric_items_field_value ON field, COALESCE(value, number::text) FROM extdatanumeric_items"
      }
    ],
    "def": null
  },
  {
    "name": "extdatanumeric_ledgers",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatanumeric_ledgers_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatanumeric_ledgers_index ON extdatanumeric_ledgers USING btree (index)"
      },
      {
        "name": "pk_extdatanumeric_ledgers",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatanumeric_ledgers ON extdatanumeric_ledgers USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdatanumeric_number",
        "type": "check",
        "domain": false,
        "def": "CHECK ((number <> ALL (ARRAY['NaN'::numeric, 'Infinity'::numeric, '-Infinity'::numeric])) AND scale(number) = min_scale(number))"
      },
      {
        "name": "c_extdatanumeric_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdatanumeric_ledgers",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdatanumeric_ledgers",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_ledgers",
        "def": "CREATE TRIGGER ti_extdatanumeric_ledgers BEFORE INSERT ON extdatanumeric_ledgers FOR EACH ROW EXECUTE FUNCTION ftiu_extdatanumeric_ledgers()"
      },
      {
        "name": "tu_extdatanumeric_ledgers",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_ledgers",
        "def": "CREATE TRIGGER tu_extdatanumeric_ledgers BEFORE UPDATE OF field, index ON extdatanumeric_ledgers FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatanumeric_ledgers()"
      }
    ],
    "rules": [],
    "statistics": [
      {
        "name": "st_extdatanumeric_ledgers_field_number",
        "def": "CREATE STATISTICS st_extdatanumeric_ledgers_field_number ON field, number FROM extdatanumeric_ledgers"
      },
      {
        "name": "st_extdatanumeric_ledgers_field_value",
        "def": "CREATE STATISTICS st_extdatanumeric_ledgers_field_value ON field, COALESCE(value, number::text) FROM extdatanumeric_ledgers"
      }
    ],
    "def": null
  },
  {
    "name": "extdatanumeric_links",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatanumeric_links_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatanumeric_links_index ON extdatanumeric_links USING btree (index)"
      },
      {
        "name": "pk_extdatanumeric_links",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatanumeric_links ON extdatanumeric_links USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdatanumeric_number",
        "type": "check",
        "domain": false,
        "def": "CHECK ((number <> ALL (ARRAY['NaN'::numeric, 'Infinity'::numeric, '-Infinity'::numeric])) AND scale(number) = min_scale(number))"
      },
      {
        "name": "c_extdatanumeric_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdatanumeric_links",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdatanumeric_links",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_links",
        "def": "CREATE TRIGGER ti_extdatanumeric_links BEFORE INSERT ON extdatanumeric_links FOR EACH ROW EXECUTE FUNCTION ftiu_extdatanumeric_links()"
      },
      {
        "name": "tu_extdatanumeric_links",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_links",
        "def": "CREATE TRIGGER tu_extdatanumeric_links BEFORE UPDATE OF field, index ON extdatanumeric_links FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatanumeric_links()"
      }
    ],
    "rules": [],
    "statistics": [
      {
        "name": "st_extdatanumeric_links_field_number",
        "def": "CREATE STATISTICS st_extdatanumeric_links_field_number ON field, number FROM extdatanumeric_links"
      },
      {
        "name": "st_extdatanumeric_links_field_value",
        "def": "CREATE STATISTICS st_extdatanumeric_links_field_value ON field, COALESCE(value, number::text) FROM extdatanumeric_links"
      }
    ],
    "def": null
  },
  {
    "name": "extdatanumeric_mailinglists",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatanumeric_mailinglists_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatanumeric_mailinglists_index ON extdatanumeric_mailinglists USING btree (index)"
      },
      {
        "name": "pk_extdatanumeric_mailinglists",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatanumeric_mailinglists ON extdatanumeric_mailinglists USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdatanumeric_number",
        "type": "check",
        "domain": false,
        "def": "CHECK ((number <> ALL (ARRAY['NaN'::numeric, 'Infinity'::numeric, '-Infinity'::numeric])) AND scale(number) = min_scale(number))"
      },
      {
        "name": "c_extdatanumeric_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdatanumeric_mailinglists",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdatanumeric_mailinglists",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_mailinglists",
        "def": "CREATE TRIGGER ti_extdatanumeric_mailinglists BEFORE INSERT ON extdatanumeric_mailinglists FOR EACH ROW EXECUTE FUNCTION ftiu_extdatanumeric_mailinglists()"
      },
      {
        "name": "tu_extdatanumeric_mailinglists",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_mailinglists",
        "def": "CREATE TRIGGER tu_extdatanumeric_mailinglists BEFORE UPDATE OF field, index ON extdatanumeric_mailinglists FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatanumeric_mailinglists()"
      }
    ],
    "rules": [],
    "statistics": [
      {
        "name": "st_extdatanumeric_mailinglists_field_number",
        "def": "CREATE STATISTICS st_extdatanumeric_mailinglists_field_number ON field, number FROM extdatanumeric_mailinglists"
      },
      {
        "name": "st_extdatanumeric_mailinglists_field_value",
        "def": "CREATE STATISTICS st_extdatanumeric_mailinglists_field_value ON field, COALESCE(value, number::text) FROM extdatanumeric_mailinglists"
      }
    ],
    "def": null
  },
  {
    "name": "extdatanumeric_mailservers",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatanumeric_mailservers_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatanumeric_mailservers_index ON extdatanumeric_mailservers USING btree (index)"
      },
      {
        "name": "pk_extdatanumeric_mailservers",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatanumeric_mailservers ON extdatanumeric_mailservers USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdatanumeric_number",
        "type": "check",
        "domain": false,
        "def": "CHECK ((number <> ALL (ARRAY['NaN'::numeric, 'Infinity'::numeric, '-Infinity'::numeric])) AND scale(number) = min_scale(number))"
      },
      {
        "name": "c_extdatanumeric_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdatanumeric_mailservers",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdatanumeric_mailservers",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_mailservers",
        "def": "CREATE TRIGGER ti_extdatanumeric_mailservers BEFORE INSERT ON extdatanumeric_mailservers FOR EACH ROW EXECUTE FUNCTION ftiu_extdatanumeric_mailservers()"
      },
      {
        "name": "tu_extdatanumeric_mailservers",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_mailservers",
        "def": "CREATE TRIGGER tu_extdatanumeric_mailservers BEFORE UPDATE OF field, index ON extdatanumeric_mailservers FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatanumeric_mailservers()"
      }
    ],
    "rules": [],
    "statistics": [
      {
        "name": "st_extdatanumeric_mailservers_field_number",
        "def": "CREATE STATISTICS st_extdatanumeric_mailservers_field_number ON field, number FROM extdatanumeric_mailservers"
      },
      {
        "name": "st_extdatanumeric_mailservers_field_value",
        "def": "CREATE STATISTICS st_extdatanumeric_mailservers_field_value ON field, COALESCE(value, number::text) FROM extdatanumeric_mailservers"
      }
    ],
    "def": null
  },
  {
    "name": "extdatanumeric_messages",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatanumeric_messages_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatanumeric_messages_index ON extdatanumeric_messages USING btree (index)"
      },
      {
        "name": "pk_extdatanumeric_messages",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatanumeric_messages ON extdatanumeric_messages USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdatanumeric_number",
        "type": "check",
        "domain": false,
        "def": "CHECK ((number <> ALL (ARRAY['NaN'::numeric, 'Infinity'::numeric, '-Infinity'::numeric])) AND scale(number) = min_scale(number))"
      },
      {
        "name": "c_extdatanumeric_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdatanumeric_messages",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdatanumeric_messages",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_messages",
        "def": "CREATE TRIGGER ti_extdatanumeric_messages BEFORE INSERT ON extdatanumeric_messages FOR EACH ROW EXECUTE FUNCTION ftiu_extdatanumeric_messages()"
      },
      {
        "name": "tu_extdatanumeric_messages",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_messages",
        "def": "CREATE TRIGGER tu_extdatanumeric_messages BEFORE UPDATE OF field, index ON extdatanumeric_messages FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatanumeric_messages()"
      }
    ],
    "rules": [],
    "statistics": [
      {
        "name": "st_extdatanumeric_messages_field_number",
        "def": "CREATE STATISTICS st_extdatanumeric_messages_field_number ON field, number FROM extdatanumeric_messages"
      },
      {
        "name": "st_extdatanumeric_messages_field_value",
        "def": "CREATE STATISTICS st_extdatanumeric_messages_field_value ON field, COALESCE(value, number::text) FROM extdatanumeric_messages"
      }
    ],
    "def": null
  },
  {
    "name": "extdatanumeric_notes",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatanumeric_notes_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatanumeric_notes_index ON extdatanumeric_notes USING btree (index)"
      },
      {
        "name": "pk_extdatanumeric_notes",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatanumeric_notes ON extdatanumeric_notes USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdatanumeric_number",
        "type": "check",
        "domain": false,
        "def": "CHECK ((number <> ALL (ARRAY['NaN'::numeric, 'Infinity'::numeric, '-Infinity'::numeric])) AND scale(number) = min_scale(number))"
      },
      {
        "name": "c_extdatanumeric_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdatanumeric_notes",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdatanumeric_notes",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_notes",
        "def": "CREATE TRIGGER ti_extdatanumeric_notes BEFORE INSERT ON extdatanumeric_notes FOR EACH ROW EXECUTE FUNCTION ftiu_extdatanumeric_notes()"
      },
      {
        "name": "tu_extdatanumeric_notes",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_notes",
        "def": "CREATE TRIGGER tu_extdatanumeric_notes BEFORE UPDATE OF field, index ON extdatanumeric_notes FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatanumeric_notes()"
      }
    ],
    "rules": [],
    "statistics": [
      {
        "name": "st_extdatanumeric_notes_field_number",
        "def": "CREATE STATISTICS st_extdatanumeric_notes_field_number ON field, number FROM extdatanumeric_notes"
      },
      {
        "name": "st_extdatanumeric_notes_field_value",
        "def": "CREATE STATISTICS st_extdatanumeric_notes_field_value ON field, COALESCE(value, number::text) FROM extdatanumeric_notes"
      }
    ],
    "def": null
  },
  {
    "name": "extdatanumeric_objects",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatanumeric_objects_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatanumeric_objects_index ON extdatanumeric_objects USING btree (index)"
      },
      {
        "name": "pk_extdatanumeric_objects",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatanumeric_objects ON extdatanumeric_objects USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdatanumeric_number",
        "type": "check",
        "domain": false,
        "def": "CHECK ((number <> ALL (ARRAY['NaN'::numeric, 'Infinity'::numeric, '-Infinity'::numeric])) AND scale(number) = min_scale(number))"
      },
      {
        "name": "c_extdatanumeric_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdatanumeric_objects",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdatanumeric_objects",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_objects",
        "def": "CREATE TRIGGER ti_extdatanumeric_objects BEFORE INSERT ON extdatanumeric_objects FOR EACH ROW EXECUTE FUNCTION ftiu_extdatanumeric_objects()"
      },
      {
        "name": "tu_extdatanumeric_objects",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_objects",
        "def": "CREATE TRIGGER tu_extdatanumeric_objects BEFORE UPDATE OF field, index ON extdatanumeric_objects FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatanumeric_objects()"
      }
    ],
    "rules": [],
    "statistics": [
      {
        "name": "st_extdatanumeric_objects_field_number",
        "def": "CREATE STATISTICS st_extdatanumeric_objects_field_number ON field, number FROM extdatanumeric_objects"
      },
      {
        "name": "st_extdatanumeric_objects_field_value",
        "def": "CREATE STATISTICS st_extdatanumeric_objects_field_value ON field, COALESCE(value, number::text) FROM extdatanumeric_objects"
      }
    ],
    "def": null
  },
  {
    "name": "extdatanumeric_opportunities",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatanumeric_opportunities_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatanumeric_opportunities_index ON extdatanumeric_opportunities USING btree (index)"
      },
      {
        "name": "pk_extdatanumeric_opportunities",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatanumeric_opportunities ON extdatanumeric_opportunities USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdatanumeric_number",
        "type": "check",
        "domain": false,
        "def": "CHECK ((number <> ALL (ARRAY['NaN'::numeric, 'Infinity'::numeric, '-Infinity'::numeric])) AND scale(number) = min_scale(number))"
      },
      {
        "name": "c_extdatanumeric_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdatanumeric_opportunities",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdatanumeric_opportunities",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_opportunities",
        "def": "CREATE TRIGGER ti_extdatanumeric_opportunities BEFORE INSERT ON extdatanumeric_opportunities FOR EACH ROW EXECUTE FUNCTION ftiu_extdatanumeric_opportunities()"
      },
      {
        "name": "tu_extdatanumeric_opportunities",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_opportunities",
        "def": "CREATE TRIGGER tu_extdatanumeric_opportunities BEFORE UPDATE OF field, index ON extdatanumeric_opportunities FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatanumeric_opportunities()"
      }
    ],
    "rules": [],
    "statistics": [
      {
        "name": "st_extdatanumeric_opportunities_field_number",
        "def": "CREATE STATISTICS st_extdatanumeric_opportunities_field_number ON field, number FROM extdatanumeric_opportunities"
      },
      {
        "name": "st_extdatanumeric_opportunities_field_value",
        "def": "CREATE STATISTICS st_extdatanumeric_opportunities_field_value ON field, COALESCE(value, number::text) FROM extdatanumeric_opportunities"
      }
    ],
    "def": null
  },
  {
    "name": "extdatanumeric_participants",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatanumeric_participants_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatanumeric_participants_index ON extdatanumeric_participants USING btree (index)"
      },
      {
        "name": "pk_extdatanumeric_participants",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatanumeric_participants ON extdatanumeric_participants USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdatanumeric_number",
        "type": "check",
        "domain": false,
        "def": "CHECK ((number <> ALL (ARRAY['NaN'::numeric, 'Infinity'::numeric, '-Infinity'::numeric])) AND scale(number) = min_scale(number))"
      },
      {
        "name": "c_extdatanumeric_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdatanumeric_participants",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdatanumeric_participants",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_participants",
        "def": "CREATE TRIGGER ti_extdatanumeric_participants BEFORE INSERT ON extdatanumeric_participants FOR EACH ROW EXECUTE FUNCTION ftiu_extdatanumeric_participants()"
      },
      {
        "name": "tu_extdatanumeric_participants",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_participants",
        "def": "CREATE TRIGGER tu_extdatanumeric_participants BEFORE UPDATE OF field, index ON extdatanumeric_participants FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatanumeric_participants()"
      }
    ],
    "rules": [],
    "statistics": [
      {
        "name": "st_extdatanumeric_participants_field_number",
        "def": "CREATE STATISTICS st_extdatanumeric_participants_field_number ON field, number FROM extdatanumeric_participants"
      },
      {
        "name": "st_extdatanumeric_participants_field_value",
        "def": "CREATE STATISTICS st_extdatanumeric_participants_field_value ON field, COALESCE(value, number::text) FROM extdatanumeric_participants"
      }
    ],
    "def": null
  },
  {
    "name": "extdatanumeric_payments",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatanumeric_payments_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatanumeric_payments_index ON extdatanumeric_payments USING btree (index)"
      },
      {
        "name": "pk_extdatanumeric_payments",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatanumeric_payments ON extdatanumeric_payments USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdatanumeric_number",
        "type": "check",
        "domain": false,
        "def": "CHECK ((number <> ALL (ARRAY['NaN'::numeric, 'Infinity'::numeric, '-Infinity'::numeric])) AND scale(number) = min_scale(number))"
      },
      {
        "name": "c_extdatanumeric_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdatanumeric_payments",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdatanumeric_payments",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_payments",
        "def": "CREATE TRIGGER ti_extdatanumeric_payments BEFORE INSERT ON extdatanumeric_payments FOR EACH ROW EXECUTE FUNCTION ftiu_extdatanumeric_payments()"
      },
      {
        "name": "tu_extdatanumeric_payments",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_payments",
        "def": "CREATE TRIGGER tu_extdatanumeric_payments BEFORE UPDATE OF field, index ON extdatanumeric_payments FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatanumeric_payments()"
      }
    ],
    "rules": [],
    "statistics": [
      {
        "name": "st_extdatanumeric_payments_field_number",
        "def": "CREATE STATISTICS st_extdatanumeric_payments_field_number ON field, number FROM extdatanumeric_payments"
      },
      {
        "name": "st_extdatanumeric_payments_field_value",
        "def": "CREATE STATISTICS st_extdatanumeric_payments_field_value ON field, COALESCE(value, number::text) FROM extdatanumeric_payments"
      }
    ],
    "def": null
  },
  {
    "name": "extdatanumeric_pricelists",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatanumeric_pricelists_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatanumeric_pricelists_index ON extdatanumeric_pricelists USING btree (index)"
      },
      {
        "name": "pk_extdatanumeric_pricelists",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatanumeric_pricelists ON extdatanumeric_pricelists USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdatanumeric_number",
        "type": "check",
        "domain": false,
        "def": "CHECK ((number <> ALL (ARRAY['NaN'::numeric, 'Infinity'::numeric, '-Infinity'::numeric])) AND scale(number) = min_scale(number))"
      },
      {
        "name": "c_extdatanumeric_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdatanumeric_pricelists",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdatanumeric_pricelists",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_pricelists",
        "def": "CREATE TRIGGER ti_extdatanumeric_pricelists BEFORE INSERT ON extdatanumeric_pricelists FOR EACH ROW EXECUTE FUNCTION ftiu_extdatanumeric_pricelists()"
      },
      {
        "name": "tu_extdatanumeric_pricelists",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_pricelists",
        "def": "CREATE TRIGGER tu_extdatanumeric_pricelists BEFORE UPDATE OF field, index ON extdatanumeric_pricelists FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatanumeric_pricelists()"
      }
    ],
    "rules": [],
    "statistics": [
      {
        "name": "st_extdatanumeric_pricelists_field_number",
        "def": "CREATE STATISTICS st_extdatanumeric_pricelists_field_number ON field, number FROM extdatanumeric_pricelists"
      },
      {
        "name": "st_extdatanumeric_pricelists_field_value",
        "def": "CREATE STATISTICS st_extdatanumeric_pricelists_field_value ON field, COALESCE(value, number::text) FROM extdatanumeric_pricelists"
      }
    ],
    "def": null
  },
  {
    "name": "extdatanumeric_projects",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatanumeric_projects_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatanumeric_projects_index ON extdatanumeric_projects USING btree (index)"
      },
      {
        "name": "pk_extdatanumeric_projects",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatanumeric_projects ON extdatanumeric_projects USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdatanumeric_number",
        "type": "check",
        "domain": false,
        "def": "CHECK ((number <> ALL (ARRAY['NaN'::numeric, 'Infinity'::numeric, '-Infinity'::numeric])) AND scale(number) = min_scale(number))"
      },
      {
        "name": "c_extdatanumeric_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdatanumeric_projects",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdatanumeric_projects",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_projects",
        "def": "CREATE TRIGGER ti_extdatanumeric_projects BEFORE INSERT ON extdatanumeric_projects FOR EACH ROW EXECUTE FUNCTION ftiu_extdatanumeric_projects()"
      },
      {
        "name": "tu_extdatanumeric_projects",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_projects",
        "def": "CREATE TRIGGER tu_extdatanumeric_projects BEFORE UPDATE OF field, index ON extdatanumeric_projects FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatanumeric_projects()"
      }
    ],
    "rules": [],
    "statistics": [
      {
        "name": "st_extdatanumeric_projects_field_number",
        "def": "CREATE STATISTICS st_extdatanumeric_projects_field_number ON field, number FROM extdatanumeric_projects"
      },
      {
        "name": "st_extdatanumeric_projects_field_value",
        "def": "CREATE STATISTICS st_extdatanumeric_projects_field_value ON field, COALESCE(value, number::text) FROM extdatanumeric_projects"
      }
    ],
    "def": null
  },
  {
    "name": "extdatanumeric_resources",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatanumeric_resources_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatanumeric_resources_index ON extdatanumeric_resources USING btree (index)"
      },
      {
        "name": "pk_extdatanumeric_resources",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatanumeric_resources ON extdatanumeric_resources USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdatanumeric_number",
        "type": "check",
        "domain": false,
        "def": "CHECK ((number <> ALL (ARRAY['NaN'::numeric, 'Infinity'::numeric, '-Infinity'::numeric])) AND scale(number) = min_scale(number))"
      },
      {
        "name": "c_extdatanumeric_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdatanumeric_resources",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdatanumeric_resources",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_resources",
        "def": "CREATE TRIGGER ti_extdatanumeric_resources BEFORE INSERT ON extdatanumeric_resources FOR EACH ROW EXECUTE FUNCTION ftiu_extdatanumeric_resources()"
      },
      {
        "name": "tu_extdatanumeric_resources",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_resources",
        "def": "CREATE TRIGGER tu_extdatanumeric_resources BEFORE UPDATE OF field, index ON extdatanumeric_resources FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatanumeric_resources()"
      }
    ],
    "rules": [],
    "statistics": [
      {
        "name": "st_extdatanumeric_resources_field_number",
        "def": "CREATE STATISTICS st_extdatanumeric_resources_field_number ON field, number FROM extdatanumeric_resources"
      },
      {
        "name": "st_extdatanumeric_resources_field_value",
        "def": "CREATE STATISTICS st_extdatanumeric_resources_field_value ON field, COALESCE(value, number::text) FROM extdatanumeric_resources"
      }
    ],
    "def": null
  },
  {
    "name": "extdatanumeric_services",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatanumeric_services_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatanumeric_services_index ON extdatanumeric_services USING btree (index)"
      },
      {
        "name": "pk_extdatanumeric_services",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatanumeric_services ON extdatanumeric_services USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdatanumeric_number",
        "type": "check",
        "domain": false,
        "def": "CHECK ((number <> ALL (ARRAY['NaN'::numeric, 'Infinity'::numeric, '-Infinity'::numeric])) AND scale(number) = min_scale(number))"
      },
      {
        "name": "c_extdatanumeric_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdatanumeric_services",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdatanumeric_services",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_services",
        "def": "CREATE TRIGGER ti_extdatanumeric_services BEFORE INSERT ON extdatanumeric_services FOR EACH ROW EXECUTE FUNCTION ftiu_extdatanumeric_services()"
      },
      {
        "name": "tu_extdatanumeric_services",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_services",
        "def": "CREATE TRIGGER tu_extdatanumeric_services BEFORE UPDATE OF field, index ON extdatanumeric_services FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatanumeric_services()"
      }
    ],
    "rules": [],
    "statistics": [
      {
        "name": "st_extdatanumeric_services_field_number",
        "def": "CREATE STATISTICS st_extdatanumeric_services_field_number ON field, number FROM extdatanumeric_services"
      },
      {
        "name": "st_extdatanumeric_services_field_value",
        "def": "CREATE STATISTICS st_extdatanumeric_services_field_value ON field, COALESCE(value, number::text) FROM extdatanumeric_services"
      }
    ],
    "def": null
  },
  {
    "name": "extdatanumeric_stocktransactions",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatanumeric_stocktransactions_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatanumeric_stocktransactions_index ON extdatanumeric_stocktransactions USING btree (index)"
      },
      {
        "name": "pk_extdatanumeric_stocktransactions",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatanumeric_stocktransactions ON extdatanumeric_stocktransactions USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdatanumeric_number",
        "type": "check",
        "domain": false,
        "def": "CHECK ((number <> ALL (ARRAY['NaN'::numeric, 'Infinity'::numeric, '-Infinity'::numeric])) AND scale(number) = min_scale(number))"
      },
      {
        "name": "c_extdatanumeric_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdatanumeric_stocktransactions",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdatanumeric_stocktransactions",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_stocktransactions",
        "def": "CREATE TRIGGER ti_extdatanumeric_stocktransactions BEFORE INSERT ON extdatanumeric_stocktransactions FOR EACH ROW EXECUTE FUNCTION ftiu_extdatanumeric_stocktransactions()"
      },
      {
        "name": "tu_extdatanumeric_stocktransactions",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_stocktransactions",
        "def": "CREATE TRIGGER tu_extdatanumeric_stocktransactions BEFORE UPDATE OF field, index ON extdatanumeric_stocktransactions FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatanumeric_stocktransactions()"
      }
    ],
    "rules": [],
    "statistics": [
      {
        "name": "st_extdatanumeric_stocktransactions_field_number",
        "def": "CREATE STATISTICS st_extdatanumeric_stocktransactions_field_number ON field, number FROM extdatanumeric_stocktransactions"
      },
      {
        "name": "st_extdatanumeric_stocktransactions_field_value",
        "def": "CREATE STATISTICS st_extdatanumeric_stocktransactions_field_value ON field, COALESCE(value, number::text) FROM extdatanumeric_stocktransactions"
      }
    ],
    "def": null
  },
  {
    "name": "extdatanumeric_storages",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatanumeric_storages_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatanumeric_storages_index ON extdatanumeric_storages USING btree (index)"
      },
      {
        "name": "pk_extdatanumeric_storages",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatanumeric_storages ON extdatanumeric_storages USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdatanumeric_number",
        "type": "check",
        "domain": false,
        "def": "CHECK ((number <> ALL (ARRAY['NaN'::numeric, 'Infinity'::numeric, '-Infinity'::numeric])) AND scale(number) = min_scale(number))"
      },
      {
        "name": "c_extdatanumeric_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdatanumeric_storages",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdatanumeric_storages",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_storages",
        "def": "CREATE TRIGGER ti_extdatanumeric_storages BEFORE INSERT ON extdatanumeric_storages FOR EACH ROW EXECUTE FUNCTION ftiu_extdatanumeric_storages()"
      },
      {
        "name": "tu_extdatanumeric_storages",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_storages",
        "def": "CREATE TRIGGER tu_extdatanumeric_storages BEFORE UPDATE OF field, index ON extdatanumeric_storages FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatanumeric_storages()"
      }
    ],
    "rules": [],
    "statistics": [
      {
        "name": "st_extdatanumeric_storages_field_number",
        "def": "CREATE STATISTICS st_extdatanumeric_storages_field_number ON field, number FROM extdatanumeric_storages"
      },
      {
        "name": "st_extdatanumeric_storages_field_value",
        "def": "CREATE STATISTICS st_extdatanumeric_storages_field_value ON field, COALESCE(value, number::text) FROM extdatanumeric_storages"
      }
    ],
    "def": null
  },
  {
    "name": "extdatanumeric_tasks",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatanumeric_tasks_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatanumeric_tasks_index ON extdatanumeric_tasks USING btree (index)"
      },
      {
        "name": "pk_extdatanumeric_tasks",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatanumeric_tasks ON extdatanumeric_tasks USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdatanumeric_number",
        "type": "check",
        "domain": false,
        "def": "CHECK ((number <> ALL (ARRAY['NaN'::numeric, 'Infinity'::numeric, '-Infinity'::numeric])) AND scale(number) = min_scale(number))"
      },
      {
        "name": "c_extdatanumeric_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdatanumeric_tasks",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdatanumeric_tasks",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_tasks",
        "def": "CREATE TRIGGER ti_extdatanumeric_tasks BEFORE INSERT ON extdatanumeric_tasks FOR EACH ROW EXECUTE FUNCTION ftiu_extdatanumeric_tasks()"
      },
      {
        "name": "tu_extdatanumeric_tasks",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_tasks",
        "def": "CREATE TRIGGER tu_extdatanumeric_tasks BEFORE UPDATE OF field, index ON extdatanumeric_tasks FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatanumeric_tasks()"
      }
    ],
    "rules": [],
    "statistics": [
      {
        "name": "st_extdatanumeric_tasks_field_number",
        "def": "CREATE STATISTICS st_extdatanumeric_tasks_field_number ON field, number FROM extdatanumeric_tasks"
      },
      {
        "name": "st_extdatanumeric_tasks_field_value",
        "def": "CREATE STATISTICS st_extdatanumeric_tasks_field_value ON field, COALESCE(value, number::text) FROM extdatanumeric_tasks"
      }
    ],
    "def": null
  },
  {
    "name": "extdatanumeric_tickets",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatanumeric_tickets_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatanumeric_tickets_index ON extdatanumeric_tickets USING btree (index)"
      },
      {
        "name": "pk_extdatanumeric_tickets",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatanumeric_tickets ON extdatanumeric_tickets USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdatanumeric_number",
        "type": "check",
        "domain": false,
        "def": "CHECK ((number <> ALL (ARRAY['NaN'::numeric, 'Infinity'::numeric, '-Infinity'::numeric])) AND scale(number) = min_scale(number))"
      },
      {
        "name": "c_extdatanumeric_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdatanumeric_tickets",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdatanumeric_tickets",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_tickets",
        "def": "CREATE TRIGGER ti_extdatanumeric_tickets BEFORE INSERT ON extdatanumeric_tickets FOR EACH ROW EXECUTE FUNCTION ftiu_extdatanumeric_tickets()"
      },
      {
        "name": "tu_extdatanumeric_tickets",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_tickets",
        "def": "CREATE TRIGGER tu_extdatanumeric_tickets BEFORE UPDATE OF field, index ON extdatanumeric_tickets FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatanumeric_tickets()"
      }
    ],
    "rules": [],
    "statistics": [
      {
        "name": "st_extdatanumeric_tickets_field_number",
        "def": "CREATE STATISTICS st_extdatanumeric_tickets_field_number ON field, number FROM extdatanumeric_tickets"
      },
      {
        "name": "st_extdatanumeric_tickets_field_value",
        "def": "CREATE STATISTICS st_extdatanumeric_tickets_field_value ON field, COALESCE(value, number::text) FROM extdatanumeric_tickets"
      }
    ],
    "def": null
  },
  {
    "name": "extdatanumeric_transactions",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatanumeric_transactions_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatanumeric_transactions_index ON extdatanumeric_transactions USING btree (index)"
      },
      {
        "name": "pk_extdatanumeric_transactions",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatanumeric_transactions ON extdatanumeric_transactions USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdatanumeric_number",
        "type": "check",
        "domain": false,
        "def": "CHECK ((number <> ALL (ARRAY['NaN'::numeric, 'Infinity'::numeric, '-Infinity'::numeric])) AND scale(number) = min_scale(number))"
      },
      {
        "name": "c_extdatanumeric_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdatanumeric_transactions",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdatanumeric_transactions",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_transactions",
        "def": "CREATE TRIGGER ti_extdatanumeric_transactions BEFORE INSERT ON extdatanumeric_transactions FOR EACH ROW EXECUTE FUNCTION ftiu_extdatanumeric_transactions()"
      },
      {
        "name": "tu_extdatanumeric_transactions",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_transactions",
        "def": "CREATE TRIGGER tu_extdatanumeric_transactions BEFORE UPDATE OF field, index ON extdatanumeric_transactions FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatanumeric_transactions()"
      }
    ],
    "rules": [],
    "statistics": [
      {
        "name": "st_extdatanumeric_transactions_field_number",
        "def": "CREATE STATISTICS st_extdatanumeric_transactions_field_number ON field, number FROM extdatanumeric_transactions"
      },
      {
        "name": "st_extdatanumeric_transactions_field_value",
        "def": "CREATE STATISTICS st_extdatanumeric_transactions_field_value ON field, COALESCE(value, number::text) FROM extdatanumeric_transactions"
      }
    ],
    "def": null
  },
  {
    "name": "extdatanumeric_users",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatanumeric_users_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatanumeric_users_index ON extdatanumeric_users USING btree (index)"
      },
      {
        "name": "pk_extdatanumeric_users",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatanumeric_users ON extdatanumeric_users USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdatanumeric_number",
        "type": "check",
        "domain": false,
        "def": "CHECK ((number <> ALL (ARRAY['NaN'::numeric, 'Infinity'::numeric, '-Infinity'::numeric])) AND scale(number) = min_scale(number))"
      },
      {
        "name": "c_extdatanumeric_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdatanumeric_users",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdatanumeric_users",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_users",
        "def": "CREATE TRIGGER ti_extdatanumeric_users BEFORE INSERT ON extdatanumeric_users FOR EACH ROW EXECUTE FUNCTION ftiu_extdatanumeric_users()"
      },
      {
        "name": "tu_extdatanumeric_users",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_users",
        "def": "CREATE TRIGGER tu_extdatanumeric_users BEFORE UPDATE OF field, index ON extdatanumeric_users FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatanumeric_users()"
      }
    ],
    "rules": [],
    "statistics": [
      {
        "name": "st_extdatanumeric_users_field_number",
        "def": "CREATE STATISTICS st_extdatanumeric_users_field_number ON field, number FROM extdatanumeric_users"
      },
      {
        "name": "st_extdatanumeric_users_field_value",
        "def": "CREATE STATISTICS st_extdatanumeric_users_field_value ON field, COALESCE(value, number::text) FROM extdatanumeric_users"
      }
    ],
    "def": null
  },
  {
    "name": "extdatanumeric_weblets",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatanumeric_weblets_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatanumeric_weblets_index ON extdatanumeric_weblets USING btree (index)"
      },
      {
        "name": "pk_extdatanumeric_weblets",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatanumeric_weblets ON extdatanumeric_weblets USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdatanumeric_number",
        "type": "check",
        "domain": false,
        "def": "CHECK ((number <> ALL (ARRAY['NaN'::numeric, 'Infinity'::numeric, '-Infinity'::numeric])) AND scale(number) = min_scale(number))"
      },
      {
        "name": "c_extdatanumeric_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdatanumeric_weblets",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdatanumeric_weblets",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_weblets",
        "def": "CREATE TRIGGER ti_extdatanumeric_weblets BEFORE INSERT ON extdatanumeric_weblets FOR EACH ROW EXECUTE FUNCTION ftiu_extdatanumeric_weblets()"
      },
      {
        "name": "tu_extdatanumeric_weblets",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatanumeric_weblets",
        "def": "CREATE TRIGGER tu_extdatanumeric_weblets BEFORE UPDATE OF field, index ON extdatanumeric_weblets FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatanumeric_weblets()"
      }
    ],
    "rules": [],
    "statistics": [
      {
        "name": "st_extdatanumeric_weblets_field_number",
        "def": "CREATE STATISTICS st_extdatanumeric_weblets_field_number ON field, number FROM extdatanumeric_weblets"
      },
      {
        "name": "st_extdatanumeric_weblets_field_value",
        "def": "CREATE STATISTICS st_extdatanumeric_weblets_field_value ON field, COALESCE(value, number::text) FROM extdatanumeric_weblets"
      }
    ],
    "def": null
  },
  {
    "name": "extdataregular_accounts",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataregular_accounts_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataregular_accounts_index ON extdataregular_accounts USING btree (index)"
      },
      {
        "name": "pk_extdataregular_accounts",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataregular_accounts ON extdataregular_accounts USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdataregular_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdataregular_accounts",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataregular_accounts",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_accounts",
        "def": "CREATE TRIGGER ti_extdataregular_accounts BEFORE INSERT ON extdataregular_accounts FOR EACH ROW EXECUTE FUNCTION ftiu_extdataregular_accounts()"
      },
      {
        "name": "tu_extdataregular_accounts",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_accounts",
        "def": "CREATE TRIGGER tu_extdataregular_accounts BEFORE UPDATE OF field, index ON extdataregular_accounts FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataregular_accounts()"
      }
    ],
    "rules": [],
    "statistics": [
      {
        "name": "st_extdataregular_accounts_field_value",
        "def": "CREATE STATISTICS st_extdataregular_accounts_field_value ON field, value FROM extdataregular_accounts"
      }
    ],
    "def": null
  },
  {
    "name": "extdataregular_actionsteps",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataregular_actionsteps_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataregular_actionsteps_index ON extdataregular_actionsteps USING btree (index)"
      },
      {
        "name": "pk_extdataregular_actionsteps",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataregular_actionsteps ON extdataregular_actionsteps USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdataregular_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdataregular_actionsteps",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataregular_actionsteps",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_actionsteps",
        "def": "CREATE TRIGGER ti_extdataregular_actionsteps BEFORE INSERT ON extdataregular_actionsteps FOR EACH ROW EXECUTE FUNCTION ftiu_extdataregular_actionsteps()"
      },
      {
        "name": "tu_extdataregular_actionsteps",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_actionsteps",
        "def": "CREATE TRIGGER tu_extdataregular_actionsteps BEFORE UPDATE OF field, index ON extdataregular_actionsteps FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataregular_actionsteps()"
      }
    ],
    "rules": [],
    "statistics": [
      {
        "name": "st_extdataregular_actionsteps_field_value",
        "def": "CREATE STATISTICS st_extdataregular_actionsteps_field_value ON field, value FROM extdataregular_actionsteps"
      }
    ],
    "def": null
  },
  {
    "name": "extdataregular_applications",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataregular_applications_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataregular_applications_index ON extdataregular_applications USING btree (index)"
      },
      {
        "name": "pk_extdataregular_applications",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataregular_applications ON extdataregular_applications USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdataregular_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdataregular_applications",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataregular_applications",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_applications",
        "def": "CREATE TRIGGER ti_extdataregular_applications BEFORE INSERT ON extdataregular_applications FOR EACH ROW EXECUTE FUNCTION ftiu_extdataregular_applications()"
      },
      {
        "name": "tu_extdataregular_applications",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_applications",
        "def": "CREATE TRIGGER tu_extdataregular_applications BEFORE UPDATE OF field, index ON extdataregular_applications FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataregular_applications()"
      }
    ],
    "rules": [],
    "statistics": [
      {
        "name": "st_extdataregular_applications_field_value",
        "def": "CREATE STATISTICS st_extdataregular_applications_field_value ON field, value FROM extdataregular_applications"
      }
    ],
    "def": null
  },
  {
    "name": "extdataregular_appointments",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataregular_appointments_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataregular_appointments_index ON extdataregular_appointments USING btree (index)"
      },
      {
        "name": "pk_extdataregular_appointments",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataregular_appointments ON extdataregular_appointments USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdataregular_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdataregular_appointments",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataregular_appointments",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_appointments",
        "def": "CREATE TRIGGER ti_extdataregular_appointments BEFORE INSERT ON extdataregular_appointments FOR EACH ROW EXECUTE FUNCTION ftiu_extdataregular_appointments()"
      },
      {
        "name": "tu_extdataregular_appointments",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_appointments",
        "def": "CREATE TRIGGER tu_extdataregular_appointments BEFORE UPDATE OF field, index ON extdataregular_appointments FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataregular_appointments()"
      }
    ],
    "rules": [],
    "statistics": [
      {
        "name": "st_extdataregular_appointments_field_value",
        "def": "CREATE STATISTICS st_extdataregular_appointments_field_value ON field, value FROM extdataregular_appointments"
      }
    ],
    "def": null
  },
  {
    "name": "extdataregular_campaigns",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataregular_campaigns_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataregular_campaigns_index ON extdataregular_campaigns USING btree (index)"
      },
      {
        "name": "pk_extdataregular_campaigns",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataregular_campaigns ON extdataregular_campaigns USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdataregular_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdataregular_campaigns",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataregular_campaigns",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_campaigns",
        "def": "CREATE TRIGGER ti_extdataregular_campaigns BEFORE INSERT ON extdataregular_campaigns FOR EACH ROW EXECUTE FUNCTION ftiu_extdataregular_campaigns()"
      },
      {
        "name": "tu_extdataregular_campaigns",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_campaigns",
        "def": "CREATE TRIGGER tu_extdataregular_campaigns BEFORE UPDATE OF field, index ON extdataregular_campaigns FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataregular_campaigns()"
      }
    ],
    "rules": [],
    "statistics": [
      {
        "name": "st_extdataregular_campaigns_field_value",
        "def": "CREATE STATISTICS st_extdataregular_campaigns_field_value ON field, value FROM extdataregular_campaigns"
      }
    ],
    "def": null
  },
  {
    "name": "extdataregular_channels",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataregular_channels_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataregular_channels_index ON extdataregular_channels USING btree (index)"
      },
      {
        "name": "pk_extdataregular_channels",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataregular_channels ON extdataregular_channels USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdataregular_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdataregular_channels",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataregular_channels",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_channels",
        "def": "CREATE TRIGGER ti_extdataregular_channels BEFORE INSERT ON extdataregular_channels FOR EACH ROW EXECUTE FUNCTION ftiu_extdataregular_channels()"
      },
      {
        "name": "tu_extdataregular_channels",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_channels",
        "def": "CREATE TRIGGER tu_extdataregular_channels BEFORE UPDATE OF field, index ON extdataregular_channels FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataregular_channels()"
      }
    ],
    "rules": [],
    "statistics": [
      {
        "name": "st_extdataregular_channels_field_value",
        "def": "CREATE STATISTICS st_extdataregular_channels_field_value ON field, value FROM extdataregular_channels"
      }
    ],
    "def": null
  },
  {
    "name": "extdataregular_contacts",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataregular_contacts_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataregular_contacts_index ON extdataregular_contacts USING btree (index)"
      },
      {
        "name": "pk_extdataregular_contacts",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataregular_contacts ON extdataregular_contacts USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdataregular_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdataregular_contacts",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataregular_contacts",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_contacts",
        "def": "CREATE TRIGGER ti_extdataregular_contacts BEFORE INSERT ON extdataregular_contacts FOR EACH ROW EXECUTE FUNCTION ftiu_extdataregular_contacts()"
      },
      {
        "name": "tu_extdataregular_contacts",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_contacts",
        "def": "CREATE TRIGGER tu_extdataregular_contacts BEFORE UPDATE OF field, index ON extdataregular_contacts FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataregular_contacts()"
      }
    ],
    "rules": [],
    "statistics": [
      {
        "name": "st_extdataregular_contacts_field_value",
        "def": "CREATE STATISTICS st_extdataregular_contacts_field_value ON field, value FROM extdataregular_contacts"
      }
    ],
    "def": null
  },
  {
    "name": "extdataregular_contracts",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataregular_contracts_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataregular_contracts_index ON extdataregular_contracts USING btree (index)"
      },
      {
        "name": "pk_extdataregular_contracts",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataregular_contracts ON extdataregular_contracts USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdataregular_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdataregular_contracts",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataregular_contracts",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_contracts",
        "def": "CREATE TRIGGER ti_extdataregular_contracts BEFORE INSERT ON extdataregular_contracts FOR EACH ROW EXECUTE FUNCTION ftiu_extdataregular_contracts()"
      },
      {
        "name": "tu_extdataregular_contracts",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_contracts",
        "def": "CREATE TRIGGER tu_extdataregular_contracts BEFORE UPDATE OF field, index ON extdataregular_contracts FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataregular_contracts()"
      }
    ],
    "rules": [],
    "statistics": [
      {
        "name": "st_extdataregular_contracts_field_value",
        "def": "CREATE STATISTICS st_extdataregular_contracts_field_value ON field, value FROM extdataregular_contracts"
      }
    ],
    "def": null
  },
  {
    "name": "extdataregular_couponcodes",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataregular_couponcodes_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataregular_couponcodes_index ON extdataregular_couponcodes USING btree (index)"
      },
      {
        "name": "pk_extdataregular_couponcodes",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataregular_couponcodes ON extdataregular_couponcodes USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdataregular_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdataregular_couponcodes",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataregular_couponcodes",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_couponcodes",
        "def": "CREATE TRIGGER ti_extdataregular_couponcodes BEFORE INSERT ON extdataregular_couponcodes FOR EACH ROW EXECUTE FUNCTION ftiu_extdataregular_couponcodes()"
      },
      {
        "name": "tu_extdataregular_couponcodes",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_couponcodes",
        "def": "CREATE TRIGGER tu_extdataregular_couponcodes BEFORE UPDATE OF field, index ON extdataregular_couponcodes FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataregular_couponcodes()"
      }
    ],
    "rules": [],
    "statistics": [
      {
        "name": "st_extdataregular_couponcodes_field_value",
        "def": "CREATE STATISTICS st_extdataregular_couponcodes_field_value ON field, value FROM extdataregular_couponcodes"
      }
    ],
    "def": null
  },
  {
    "name": "extdataregular_coupons",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataregular_coupons_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataregular_coupons_index ON extdataregular_coupons USING btree (index)"
      },
      {
        "name": "pk_extdataregular_coupons",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataregular_coupons ON extdataregular_coupons USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdataregular_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdataregular_coupons",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataregular_coupons",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_coupons",
        "def": "CREATE TRIGGER ti_extdataregular_coupons BEFORE INSERT ON extdataregular_coupons FOR EACH ROW EXECUTE FUNCTION ftiu_extdataregular_coupons()"
      },
      {
        "name": "tu_extdataregular_coupons",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_coupons",
        "def": "CREATE TRIGGER tu_extdataregular_coupons BEFORE UPDATE OF field, index ON extdataregular_coupons FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataregular_coupons()"
      }
    ],
    "rules": [],
    "statistics": [
      {
        "name": "st_extdataregular_coupons_field_value",
        "def": "CREATE STATISTICS st_extdataregular_coupons_field_value ON field, value FROM extdataregular_coupons"
      }
    ],
    "def": null
  },
  {
    "name": "extdataregular_customfields",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataregular_customfields_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataregular_customfields_index ON extdataregular_customfields USING btree (index)"
      },
      {
        "name": "pk_extdataregular_customfields",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataregular_customfields ON extdataregular_customfields USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdataregular_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdataregular_customfields",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataregular_customfields",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_customfields",
        "def": "CREATE TRIGGER ti_extdataregular_customfields BEFORE INSERT ON extdataregular_customfields FOR EACH ROW EXECUTE FUNCTION ftiu_extdataregular_customfields()"
      },
      {
        "name": "tu_extdataregular_customfields",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_customfields",
        "def": "CREATE TRIGGER tu_extdataregular_customfields BEFORE UPDATE OF field, index ON extdataregular_customfields FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataregular_customfields()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdataregular_davservers",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataregular_davservers_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataregular_davservers_index ON extdataregular_davservers USING btree (index)"
      },
      {
        "name": "pk_extdataregular_davservers",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataregular_davservers ON extdataregular_davservers USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdataregular_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdataregular_davservers",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataregular_davservers",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_davservers",
        "def": "CREATE TRIGGER ti_extdataregular_davservers BEFORE INSERT ON extdataregular_davservers FOR EACH ROW EXECUTE FUNCTION ftiu_extdataregular_davservers()"
      },
      {
        "name": "tu_extdataregular_davservers",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_davservers",
        "def": "CREATE TRIGGER tu_extdataregular_davservers BEFORE UPDATE OF field, index ON extdataregular_davservers FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataregular_davservers()"
      }
    ],
    "rules": [],
    "statistics": [
      {
        "name": "st_extdataregular_davservers_field_value",
        "def": "CREATE STATISTICS st_extdataregular_davservers_field_value ON field, value FROM extdataregular_davservers"
      }
    ],
    "def": null
  },
  {
    "name": "extdataregular_devices",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataregular_devices_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataregular_devices_index ON extdataregular_devices USING btree (index)"
      },
      {
        "name": "pk_extdataregular_devices",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataregular_devices ON extdataregular_devices USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdataregular_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdataregular_devices",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataregular_devices",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_devices",
        "def": "CREATE TRIGGER ti_extdataregular_devices BEFORE INSERT ON extdataregular_devices FOR EACH ROW EXECUTE FUNCTION ftiu_extdataregular_devices()"
      },
      {
        "name": "tu_extdataregular_devices",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_devices",
        "def": "CREATE TRIGGER tu_extdataregular_devices BEFORE UPDATE OF field, index ON extdataregular_devices FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataregular_devices()"
      }
    ],
    "rules": [],
    "statistics": [
      {
        "name": "st_extdataregular_devices_field_value",
        "def": "CREATE STATISTICS st_extdataregular_devices_field_value ON field, value FROM extdataregular_devices"
      }
    ],
    "def": null
  },
  {
    "name": "extdataregular_documents",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataregular_documents_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataregular_documents_index ON extdataregular_documents USING btree (index)"
      },
      {
        "name": "pk_extdataregular_documents",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataregular_documents ON extdataregular_documents USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdataregular_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdataregular_documents",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataregular_documents",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_documents",
        "def": "CREATE TRIGGER ti_extdataregular_documents BEFORE INSERT ON extdataregular_documents FOR EACH ROW EXECUTE FUNCTION ftiu_extdataregular_documents()"
      },
      {
        "name": "tu_extdataregular_documents",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_documents",
        "def": "CREATE TRIGGER tu_extdataregular_documents BEFORE UPDATE OF field, index ON extdataregular_documents FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataregular_documents()"
      }
    ],
    "rules": [],
    "statistics": [
      {
        "name": "st_extdataregular_documents_field_value",
        "def": "CREATE STATISTICS st_extdataregular_documents_field_value ON field, value FROM extdataregular_documents"
      }
    ],
    "def": null
  },
  {
    "name": "extdataregular_dunning",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataregular_dunning_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataregular_dunning_index ON extdataregular_dunning USING btree (index)"
      },
      {
        "name": "pk_extdataregular_dunning",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataregular_dunning ON extdataregular_dunning USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdataregular_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdataregular_dunning",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataregular_dunning",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_dunning",
        "def": "CREATE TRIGGER ti_extdataregular_dunning BEFORE INSERT ON extdataregular_dunning FOR EACH ROW EXECUTE FUNCTION ftiu_extdataregular_dunning()"
      },
      {
        "name": "tu_extdataregular_dunning",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_dunning",
        "def": "CREATE TRIGGER tu_extdataregular_dunning BEFORE UPDATE OF field, index ON extdataregular_dunning FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataregular_dunning()"
      }
    ],
    "rules": [],
    "statistics": [
      {
        "name": "st_extdataregular_dunning_field_value",
        "def": "CREATE STATISTICS st_extdataregular_dunning_field_value ON field, value FROM extdataregular_dunning"
      }
    ],
    "def": null
  },
  {
    "name": "extdataregular_feedservers",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataregular_feedservers_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataregular_feedservers_index ON extdataregular_feedservers USING btree (index)"
      },
      {
        "name": "pk_extdataregular_feedservers",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataregular_feedservers ON extdataregular_feedservers USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdataregular_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdataregular_feedservers",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataregular_feedservers",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_feedservers",
        "def": "CREATE TRIGGER ti_extdataregular_feedservers BEFORE INSERT ON extdataregular_feedservers FOR EACH ROW EXECUTE FUNCTION ftiu_extdataregular_feedservers()"
      },
      {
        "name": "tu_extdataregular_feedservers",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_feedservers",
        "def": "CREATE TRIGGER tu_extdataregular_feedservers BEFORE UPDATE OF field, index ON extdataregular_feedservers FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataregular_feedservers()"
      }
    ],
    "rules": [],
    "statistics": [
      {
        "name": "st_extdataregular_feedservers_field_value",
        "def": "CREATE STATISTICS st_extdataregular_feedservers_field_value ON field, value FROM extdataregular_feedservers"
      }
    ],
    "def": null
  },
  {
    "name": "extdataregular_forks",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataregular_forks_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataregular_forks_index ON extdataregular_forks USING btree (index)"
      },
      {
        "name": "pk_extdataregular_forks",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataregular_forks ON extdataregular_forks USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdataregular_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdataregular_forks",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataregular_forks",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_forks",
        "def": "CREATE TRIGGER ti_extdataregular_forks BEFORE INSERT ON extdataregular_forks FOR EACH ROW EXECUTE FUNCTION ftiu_extdataregular_forks()"
      },
      {
        "name": "tu_extdataregular_forks",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_forks",
        "def": "CREATE TRIGGER tu_extdataregular_forks BEFORE UPDATE OF field, index ON extdataregular_forks FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataregular_forks()"
      }
    ],
    "rules": [],
    "statistics": [
      {
        "name": "st_extdataregular_forks_field_value",
        "def": "CREATE STATISTICS st_extdataregular_forks_field_value ON field, value FROM extdataregular_forks"
      }
    ],
    "def": null
  },
  {
    "name": "extdataregular_groups",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataregular_groups_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataregular_groups_index ON extdataregular_groups USING btree (index)"
      },
      {
        "name": "pk_extdataregular_groups",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataregular_groups ON extdataregular_groups USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdataregular_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdataregular_groups",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataregular_groups",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_groups",
        "def": "CREATE TRIGGER ti_extdataregular_groups BEFORE INSERT ON extdataregular_groups FOR EACH ROW EXECUTE FUNCTION ftiu_extdataregular_groups()"
      },
      {
        "name": "tu_extdataregular_groups",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_groups",
        "def": "CREATE TRIGGER tu_extdataregular_groups BEFORE UPDATE OF field, index ON extdataregular_groups FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataregular_groups()"
      }
    ],
    "rules": [],
    "statistics": [
      {
        "name": "st_extdataregular_groups_field_value",
        "def": "CREATE STATISTICS st_extdataregular_groups_field_value ON field, value FROM extdataregular_groups"
      }
    ],
    "def": null
  },
  {
    "name": "extdataregular_items",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataregular_items_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataregular_items_index ON extdataregular_items USING btree (index)"
      },
      {
        "name": "pk_extdataregular_items",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataregular_items ON extdataregular_items USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdataregular_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdataregular_items",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataregular_items",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_items",
        "def": "CREATE TRIGGER ti_extdataregular_items BEFORE INSERT ON extdataregular_items FOR EACH ROW EXECUTE FUNCTION ftiu_extdataregular_items()"
      },
      {
        "name": "tu_extdataregular_items",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_items",
        "def": "CREATE TRIGGER tu_extdataregular_items BEFORE UPDATE OF field, index ON extdataregular_items FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataregular_items()"
      }
    ],
    "rules": [],
    "statistics": [
      {
        "name": "st_extdataregular_items_field_value",
        "def": "CREATE STATISTICS st_extdataregular_items_field_value ON field, value FROM extdataregular_items"
      }
    ],
    "def": null
  },
  {
    "name": "extdataregular_ledgers",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataregular_ledgers_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataregular_ledgers_index ON extdataregular_ledgers USING btree (index)"
      },
      {
        "name": "pk_extdataregular_ledgers",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataregular_ledgers ON extdataregular_ledgers USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdataregular_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdataregular_ledgers",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataregular_ledgers",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_ledgers",
        "def": "CREATE TRIGGER ti_extdataregular_ledgers BEFORE INSERT ON extdataregular_ledgers FOR EACH ROW EXECUTE FUNCTION ftiu_extdataregular_ledgers()"
      },
      {
        "name": "tu_extdataregular_ledgers",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_ledgers",
        "def": "CREATE TRIGGER tu_extdataregular_ledgers BEFORE UPDATE OF field, index ON extdataregular_ledgers FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataregular_ledgers()"
      }
    ],
    "rules": [],
    "statistics": [
      {
        "name": "st_extdataregular_ledgers_field_value",
        "def": "CREATE STATISTICS st_extdataregular_ledgers_field_value ON field, value FROM extdataregular_ledgers"
      }
    ],
    "def": null
  },
  {
    "name": "extdataregular_links",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataregular_links_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataregular_links_index ON extdataregular_links USING btree (index)"
      },
      {
        "name": "pk_extdataregular_links",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataregular_links ON extdataregular_links USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdataregular_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdataregular_links",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataregular_links",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_links",
        "def": "CREATE TRIGGER ti_extdataregular_links BEFORE INSERT ON extdataregular_links FOR EACH ROW EXECUTE FUNCTION ftiu_extdataregular_links()"
      },
      {
        "name": "tu_extdataregular_links",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_links",
        "def": "CREATE TRIGGER tu_extdataregular_links BEFORE UPDATE OF field, index ON extdataregular_links FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataregular_links()"
      }
    ],
    "rules": [],
    "statistics": [
      {
        "name": "st_extdataregular_links_field_value",
        "def": "CREATE STATISTICS st_extdataregular_links_field_value ON field, value FROM extdataregular_links"
      }
    ],
    "def": null
  },
  {
    "name": "extdataregular_mailinglists",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataregular_mailinglists_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataregular_mailinglists_index ON extdataregular_mailinglists USING btree (index)"
      },
      {
        "name": "pk_extdataregular_mailinglists",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataregular_mailinglists ON extdataregular_mailinglists USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdataregular_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdataregular_mailinglists",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataregular_mailinglists",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_mailinglists",
        "def": "CREATE TRIGGER ti_extdataregular_mailinglists BEFORE INSERT ON extdataregular_mailinglists FOR EACH ROW EXECUTE FUNCTION ftiu_extdataregular_mailinglists()"
      },
      {
        "name": "tu_extdataregular_mailinglists",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_mailinglists",
        "def": "CREATE TRIGGER tu_extdataregular_mailinglists BEFORE UPDATE OF field, index ON extdataregular_mailinglists FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataregular_mailinglists()"
      }
    ],
    "rules": [],
    "statistics": [
      {
        "name": "st_extdataregular_mailinglists_field_value",
        "def": "CREATE STATISTICS st_extdataregular_mailinglists_field_value ON field, value FROM extdataregular_mailinglists"
      }
    ],
    "def": null
  },
  {
    "name": "extdataregular_mailservers",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataregular_mailservers_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataregular_mailservers_index ON extdataregular_mailservers USING btree (index)"
      },
      {
        "name": "pk_extdataregular_mailservers",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataregular_mailservers ON extdataregular_mailservers USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdataregular_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdataregular_mailservers",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataregular_mailservers",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_mailservers",
        "def": "CREATE TRIGGER ti_extdataregular_mailservers BEFORE INSERT ON extdataregular_mailservers FOR EACH ROW EXECUTE FUNCTION ftiu_extdataregular_mailservers()"
      },
      {
        "name": "tu_extdataregular_mailservers",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_mailservers",
        "def": "CREATE TRIGGER tu_extdataregular_mailservers BEFORE UPDATE OF field, index ON extdataregular_mailservers FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataregular_mailservers()"
      }
    ],
    "rules": [],
    "statistics": [
      {
        "name": "st_extdataregular_mailservers_field_value",
        "def": "CREATE STATISTICS st_extdataregular_mailservers_field_value ON field, value FROM extdataregular_mailservers"
      }
    ],
    "def": null
  },
  {
    "name": "extdataregular_messages",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataregular_messages_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataregular_messages_index ON extdataregular_messages USING btree (index)"
      },
      {
        "name": "pk_extdataregular_messages",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataregular_messages ON extdataregular_messages USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdataregular_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdataregular_messages",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataregular_messages",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_messages",
        "def": "CREATE TRIGGER ti_extdataregular_messages BEFORE INSERT ON extdataregular_messages FOR EACH ROW EXECUTE FUNCTION ftiu_extdataregular_messages()"
      },
      {
        "name": "tu_extdataregular_messages",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_messages",
        "def": "CREATE TRIGGER tu_extdataregular_messages BEFORE UPDATE OF field, index ON extdataregular_messages FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataregular_messages()"
      }
    ],
    "rules": [],
    "statistics": [
      {
        "name": "st_extdataregular_messages_field_value",
        "def": "CREATE STATISTICS st_extdataregular_messages_field_value ON field, value FROM extdataregular_messages"
      }
    ],
    "def": null
  },
  {
    "name": "extdataregular_notes",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataregular_notes_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataregular_notes_index ON extdataregular_notes USING btree (index)"
      },
      {
        "name": "pk_extdataregular_notes",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataregular_notes ON extdataregular_notes USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdataregular_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdataregular_notes",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataregular_notes",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_notes",
        "def": "CREATE TRIGGER ti_extdataregular_notes BEFORE INSERT ON extdataregular_notes FOR EACH ROW EXECUTE FUNCTION ftiu_extdataregular_notes()"
      },
      {
        "name": "tu_extdataregular_notes",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_notes",
        "def": "CREATE TRIGGER tu_extdataregular_notes BEFORE UPDATE OF field, index ON extdataregular_notes FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataregular_notes()"
      }
    ],
    "rules": [],
    "statistics": [
      {
        "name": "st_extdataregular_notes_field_value",
        "def": "CREATE STATISTICS st_extdataregular_notes_field_value ON field, value FROM extdataregular_notes"
      }
    ],
    "def": null
  },
  {
    "name": "extdataregular_objects",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataregular_objects_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataregular_objects_index ON extdataregular_objects USING btree (index)"
      },
      {
        "name": "pk_extdataregular_objects",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataregular_objects ON extdataregular_objects USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdataregular_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdataregular_objects",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataregular_objects",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_objects",
        "def": "CREATE TRIGGER ti_extdataregular_objects BEFORE INSERT ON extdataregular_objects FOR EACH ROW EXECUTE FUNCTION ftiu_extdataregular_objects()"
      },
      {
        "name": "tu_extdataregular_objects",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_objects",
        "def": "CREATE TRIGGER tu_extdataregular_objects BEFORE UPDATE OF field, index ON extdataregular_objects FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataregular_objects()"
      }
    ],
    "rules": [],
    "statistics": [
      {
        "name": "st_extdataregular_objects_field_value",
        "def": "CREATE STATISTICS st_extdataregular_objects_field_value ON field, value FROM extdataregular_objects"
      }
    ],
    "def": null
  },
  {
    "name": "extdataregular_opportunities",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataregular_opportunities_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataregular_opportunities_index ON extdataregular_opportunities USING btree (index)"
      },
      {
        "name": "pk_extdataregular_opportunities",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataregular_opportunities ON extdataregular_opportunities USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdataregular_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdataregular_opportunities",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataregular_opportunities",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_opportunities",
        "def": "CREATE TRIGGER ti_extdataregular_opportunities BEFORE INSERT ON extdataregular_opportunities FOR EACH ROW EXECUTE FUNCTION ftiu_extdataregular_opportunities()"
      },
      {
        "name": "tu_extdataregular_opportunities",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_opportunities",
        "def": "CREATE TRIGGER tu_extdataregular_opportunities BEFORE UPDATE OF field, index ON extdataregular_opportunities FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataregular_opportunities()"
      }
    ],
    "rules": [],
    "statistics": [
      {
        "name": "st_extdataregular_opportunities_field_value",
        "def": "CREATE STATISTICS st_extdataregular_opportunities_field_value ON field, value FROM extdataregular_opportunities"
      }
    ],
    "def": null
  },
  {
    "name": "extdataregular_participants",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataregular_participants_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataregular_participants_index ON extdataregular_participants USING btree (index)"
      },
      {
        "name": "pk_extdataregular_participants",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataregular_participants ON extdataregular_participants USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdataregular_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdataregular_participants",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataregular_participants",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_participants",
        "def": "CREATE TRIGGER ti_extdataregular_participants BEFORE INSERT ON extdataregular_participants FOR EACH ROW EXECUTE FUNCTION ftiu_extdataregular_participants()"
      },
      {
        "name": "tu_extdataregular_participants",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_participants",
        "def": "CREATE TRIGGER tu_extdataregular_participants BEFORE UPDATE OF field, index ON extdataregular_participants FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataregular_participants()"
      }
    ],
    "rules": [],
    "statistics": [
      {
        "name": "st_extdataregular_participants_field_value",
        "def": "CREATE STATISTICS st_extdataregular_participants_field_value ON field, value FROM extdataregular_participants"
      }
    ],
    "def": null
  },
  {
    "name": "extdataregular_payments",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataregular_payments_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataregular_payments_index ON extdataregular_payments USING btree (index)"
      },
      {
        "name": "pk_extdataregular_payments",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataregular_payments ON extdataregular_payments USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdataregular_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdataregular_payments",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataregular_payments",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_payments",
        "def": "CREATE TRIGGER ti_extdataregular_payments BEFORE INSERT ON extdataregular_payments FOR EACH ROW EXECUTE FUNCTION ftiu_extdataregular_payments()"
      },
      {
        "name": "tu_extdataregular_payments",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_payments",
        "def": "CREATE TRIGGER tu_extdataregular_payments BEFORE UPDATE OF field, index ON extdataregular_payments FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataregular_payments()"
      }
    ],
    "rules": [],
    "statistics": [
      {
        "name": "st_extdataregular_payments_field_value",
        "def": "CREATE STATISTICS st_extdataregular_payments_field_value ON field, value FROM extdataregular_payments"
      }
    ],
    "def": null
  },
  {
    "name": "extdataregular_pricelists",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataregular_pricelists_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataregular_pricelists_index ON extdataregular_pricelists USING btree (index)"
      },
      {
        "name": "pk_extdataregular_pricelists",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataregular_pricelists ON extdataregular_pricelists USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdataregular_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdataregular_pricelists",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataregular_pricelists",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_pricelists",
        "def": "CREATE TRIGGER ti_extdataregular_pricelists BEFORE INSERT ON extdataregular_pricelists FOR EACH ROW EXECUTE FUNCTION ftiu_extdataregular_pricelists()"
      },
      {
        "name": "tu_extdataregular_pricelists",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_pricelists",
        "def": "CREATE TRIGGER tu_extdataregular_pricelists BEFORE UPDATE OF field, index ON extdataregular_pricelists FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataregular_pricelists()"
      }
    ],
    "rules": [],
    "statistics": [
      {
        "name": "st_extdataregular_pricelists_field_value",
        "def": "CREATE STATISTICS st_extdataregular_pricelists_field_value ON field, value FROM extdataregular_pricelists"
      }
    ],
    "def": null
  },
  {
    "name": "extdataregular_projects",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataregular_projects_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataregular_projects_index ON extdataregular_projects USING btree (index)"
      },
      {
        "name": "pk_extdataregular_projects",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataregular_projects ON extdataregular_projects USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdataregular_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdataregular_projects",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataregular_projects",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_projects",
        "def": "CREATE TRIGGER ti_extdataregular_projects BEFORE INSERT ON extdataregular_projects FOR EACH ROW EXECUTE FUNCTION ftiu_extdataregular_projects()"
      },
      {
        "name": "tu_extdataregular_projects",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_projects",
        "def": "CREATE TRIGGER tu_extdataregular_projects BEFORE UPDATE OF field, index ON extdataregular_projects FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataregular_projects()"
      }
    ],
    "rules": [],
    "statistics": [
      {
        "name": "st_extdataregular_projects_field_value",
        "def": "CREATE STATISTICS st_extdataregular_projects_field_value ON field, value FROM extdataregular_projects"
      }
    ],
    "def": null
  },
  {
    "name": "extdataregular_resources",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataregular_resources_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataregular_resources_index ON extdataregular_resources USING btree (index)"
      },
      {
        "name": "pk_extdataregular_resources",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataregular_resources ON extdataregular_resources USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdataregular_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdataregular_resources",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataregular_resources",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_resources",
        "def": "CREATE TRIGGER ti_extdataregular_resources BEFORE INSERT ON extdataregular_resources FOR EACH ROW EXECUTE FUNCTION ftiu_extdataregular_resources()"
      },
      {
        "name": "tu_extdataregular_resources",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_resources",
        "def": "CREATE TRIGGER tu_extdataregular_resources BEFORE UPDATE OF field, index ON extdataregular_resources FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataregular_resources()"
      }
    ],
    "rules": [],
    "statistics": [
      {
        "name": "st_extdataregular_resources_field_value",
        "def": "CREATE STATISTICS st_extdataregular_resources_field_value ON field, value FROM extdataregular_resources"
      }
    ],
    "def": null
  },
  {
    "name": "extdataregular_services",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataregular_services_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataregular_services_index ON extdataregular_services USING btree (index)"
      },
      {
        "name": "pk_extdataregular_services",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataregular_services ON extdataregular_services USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdataregular_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdataregular_services",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataregular_services",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_services",
        "def": "CREATE TRIGGER ti_extdataregular_services BEFORE INSERT ON extdataregular_services FOR EACH ROW EXECUTE FUNCTION ftiu_extdataregular_services()"
      },
      {
        "name": "tu_extdataregular_services",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_services",
        "def": "CREATE TRIGGER tu_extdataregular_services BEFORE UPDATE OF field, index ON extdataregular_services FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataregular_services()"
      }
    ],
    "rules": [],
    "statistics": [
      {
        "name": "st_extdataregular_services_field_value",
        "def": "CREATE STATISTICS st_extdataregular_services_field_value ON field, value FROM extdataregular_services"
      }
    ],
    "def": null
  },
  {
    "name": "extdataregular_stocktransactions",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataregular_stocktransactions_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataregular_stocktransactions_index ON extdataregular_stocktransactions USING btree (index)"
      },
      {
        "name": "pk_extdataregular_stocktransactions",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataregular_stocktransactions ON extdataregular_stocktransactions USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdataregular_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdataregular_stocktransactions",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataregular_stocktransactions",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_stocktransactions",
        "def": "CREATE TRIGGER ti_extdataregular_stocktransactions BEFORE INSERT ON extdataregular_stocktransactions FOR EACH ROW EXECUTE FUNCTION ftiu_extdataregular_stocktransactions()"
      },
      {
        "name": "tu_extdataregular_stocktransactions",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_stocktransactions",
        "def": "CREATE TRIGGER tu_extdataregular_stocktransactions BEFORE UPDATE OF field, index ON extdataregular_stocktransactions FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataregular_stocktransactions()"
      }
    ],
    "rules": [],
    "statistics": [
      {
        "name": "st_extdataregular_stocktransactions_field_value",
        "def": "CREATE STATISTICS st_extdataregular_stocktransactions_field_value ON field, value FROM extdataregular_stocktransactions"
      }
    ],
    "def": null
  },
  {
    "name": "extdataregular_storages",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataregular_storages_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataregular_storages_index ON extdataregular_storages USING btree (index)"
      },
      {
        "name": "pk_extdataregular_storages",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataregular_storages ON extdataregular_storages USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdataregular_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdataregular_storages",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataregular_storages",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_storages",
        "def": "CREATE TRIGGER ti_extdataregular_storages BEFORE INSERT ON extdataregular_storages FOR EACH ROW EXECUTE FUNCTION ftiu_extdataregular_storages()"
      },
      {
        "name": "tu_extdataregular_storages",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_storages",
        "def": "CREATE TRIGGER tu_extdataregular_storages BEFORE UPDATE OF field, index ON extdataregular_storages FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataregular_storages()"
      }
    ],
    "rules": [],
    "statistics": [
      {
        "name": "st_extdataregular_storages_field_value",
        "def": "CREATE STATISTICS st_extdataregular_storages_field_value ON field, value FROM extdataregular_storages"
      }
    ],
    "def": null
  },
  {
    "name": "extdataregular_tasks",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataregular_tasks_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataregular_tasks_index ON extdataregular_tasks USING btree (index)"
      },
      {
        "name": "pk_extdataregular_tasks",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataregular_tasks ON extdataregular_tasks USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdataregular_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdataregular_tasks",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataregular_tasks",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_tasks",
        "def": "CREATE TRIGGER ti_extdataregular_tasks BEFORE INSERT ON extdataregular_tasks FOR EACH ROW EXECUTE FUNCTION ftiu_extdataregular_tasks()"
      },
      {
        "name": "tu_extdataregular_tasks",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_tasks",
        "def": "CREATE TRIGGER tu_extdataregular_tasks BEFORE UPDATE OF field, index ON extdataregular_tasks FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataregular_tasks()"
      }
    ],
    "rules": [],
    "statistics": [
      {
        "name": "st_extdataregular_tasks_field_value",
        "def": "CREATE STATISTICS st_extdataregular_tasks_field_value ON field, value FROM extdataregular_tasks"
      }
    ],
    "def": null
  },
  {
    "name": "extdataregular_tickets",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataregular_tickets_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataregular_tickets_index ON extdataregular_tickets USING btree (index)"
      },
      {
        "name": "pk_extdataregular_tickets",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataregular_tickets ON extdataregular_tickets USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdataregular_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdataregular_tickets",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataregular_tickets",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_tickets",
        "def": "CREATE TRIGGER ti_extdataregular_tickets BEFORE INSERT ON extdataregular_tickets FOR EACH ROW EXECUTE FUNCTION ftiu_extdataregular_tickets()"
      },
      {
        "name": "tu_extdataregular_tickets",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_tickets",
        "def": "CREATE TRIGGER tu_extdataregular_tickets BEFORE UPDATE OF field, index ON extdataregular_tickets FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataregular_tickets()"
      }
    ],
    "rules": [],
    "statistics": [
      {
        "name": "st_extdataregular_tickets_field_value",
        "def": "CREATE STATISTICS st_extdataregular_tickets_field_value ON field, value FROM extdataregular_tickets"
      }
    ],
    "def": null
  },
  {
    "name": "extdataregular_transactions",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataregular_transactions_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataregular_transactions_index ON extdataregular_transactions USING btree (index)"
      },
      {
        "name": "pk_extdataregular_transactions",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataregular_transactions ON extdataregular_transactions USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdataregular_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdataregular_transactions",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataregular_transactions",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_transactions",
        "def": "CREATE TRIGGER ti_extdataregular_transactions BEFORE INSERT ON extdataregular_transactions FOR EACH ROW EXECUTE FUNCTION ftiu_extdataregular_transactions()"
      },
      {
        "name": "tu_extdataregular_transactions",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_transactions",
        "def": "CREATE TRIGGER tu_extdataregular_transactions BEFORE UPDATE OF field, index ON extdataregular_transactions FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataregular_transactions()"
      }
    ],
    "rules": [],
    "statistics": [
      {
        "name": "st_extdataregular_transactions_field_value",
        "def": "CREATE STATISTICS st_extdataregular_transactions_field_value ON field, value FROM extdataregular_transactions"
      }
    ],
    "def": null
  },
  {
    "name": "extdataregular_users",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataregular_users_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataregular_users_index ON extdataregular_users USING btree (index)"
      },
      {
        "name": "pk_extdataregular_users",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataregular_users ON extdataregular_users USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdataregular_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdataregular_users",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataregular_users",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_users",
        "def": "CREATE TRIGGER ti_extdataregular_users BEFORE INSERT ON extdataregular_users FOR EACH ROW EXECUTE FUNCTION ftiu_extdataregular_users()"
      },
      {
        "name": "tu_extdataregular_users",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_users",
        "def": "CREATE TRIGGER tu_extdataregular_users BEFORE UPDATE OF field, index ON extdataregular_users FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataregular_users()"
      }
    ],
    "rules": [],
    "statistics": [
      {
        "name": "st_extdataregular_users_field_value",
        "def": "CREATE STATISTICS st_extdataregular_users_field_value ON field, value FROM extdataregular_users"
      }
    ],
    "def": null
  },
  {
    "name": "extdataregular_weblets",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdataregular_weblets_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdataregular_weblets_index ON extdataregular_weblets USING btree (index)"
      },
      {
        "name": "pk_extdataregular_weblets",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdataregular_weblets ON extdataregular_weblets USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_extdataregular_value",
        "type": "check",
        "domain": false,
        "def": "CHECK (value <> ALL (ARRAY[''::text, '0'::text]))"
      },
      {
        "name": "pk_extdataregular_weblets",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdataregular_weblets",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_weblets",
        "def": "CREATE TRIGGER ti_extdataregular_weblets BEFORE INSERT ON extdataregular_weblets FOR EACH ROW EXECUTE FUNCTION ftiu_extdataregular_weblets()"
      },
      {
        "name": "tu_extdataregular_weblets",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdataregular_weblets",
        "def": "CREATE TRIGGER tu_extdataregular_weblets BEFORE UPDATE OF field, index ON extdataregular_weblets FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdataregular_weblets()"
      }
    ],
    "rules": [],
    "statistics": [
      {
        "name": "st_extdataregular_weblets_field_value",
        "def": "CREATE STATISTICS st_extdataregular_weblets_field_value ON field, value FROM extdataregular_weblets"
      }
    ],
    "def": null
  },
  {
    "name": "extdatavalues",
    "type": "view",
    "fields": [
      {
        "name": "entity",
        "type": "t_entity",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [],
    "constraints": [],
    "triggers": [
      {
        "name": "td_extdatavalues",
        "type": "instead_of",
        "events": [
          "delete"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftd_extdatavalues",
        "def": "CREATE TRIGGER td_extdatavalues INSTEAD OF DELETE ON extdatavalues FOR EACH ROW EXECUTE FUNCTION ftd_extdatavalues()"
      },
      {
        "name": "ti_extdatavalues",
        "type": "instead_of",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "fti_extdatavalues",
        "def": "CREATE TRIGGER ti_extdatavalues INSTEAD OF INSERT ON extdatavalues FOR EACH ROW EXECUTE FUNCTION fti_extdatavalues()"
      },
      {
        "name": "tu_extdatavalues",
        "type": "instead_of",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftu_extdatavalues",
        "def": "CREATE TRIGGER tu_extdatavalues INSTEAD OF UPDATE ON extdatavalues FOR EACH ROW EXECUTE FUNCTION ftu_extdatavalues()"
      }
    ],
    "rules": [
      {
        "name": "_RETURN",
        "type": "select",
        "instead": true,
        "def": "CREATE RULE \"_RETURN\" AS\n    ON SELECT TO extdatavalues DO INSTEAD  SELECT 'accounts'::t_entity AS entity,\n    extdatavalues_accounts.field,\n    extdatavalues_accounts.index,\n    extdatavalues_accounts.value,\n    extdatavalues_accounts.number\n   FROM extdatavalues_accounts\nUNION ALL\n SELECT 'actionsteps'::t_entity AS entity,\n    extdatavalues_actionsteps.field,\n    extdatavalues_actionsteps.index,\n    extdatavalues_actionsteps.value,\n    extdatavalues_actionsteps.number\n   FROM extdatavalues_actionsteps\nUNION ALL\n SELECT 'applications'::t_entity AS entity,\n    extdatavalues_applications.field,\n    extdatavalues_applications.index,\n    extdatavalues_applications.value,\n    extdatavalues_applications.number\n   FROM extdatavalues_applications\nUNION ALL\n SELECT 'appointments'::t_entity AS entity,\n    extdatavalues_appointments.field,\n    extdatavalues_appointments.index,\n    extdatavalues_appointments.value,\n    extdatavalues_appointments.number\n   FROM extdatavalues_appointments\nUNION ALL\n SELECT 'campaigns'::t_entity AS entity,\n    extdatavalues_campaigns.field,\n    extdatavalues_campaigns.index,\n    extdatavalues_campaigns.value,\n    extdatavalues_campaigns.number\n   FROM extdatavalues_campaigns\nUNION ALL\n SELECT 'channels'::t_entity AS entity,\n    extdatavalues_channels.field,\n    extdatavalues_channels.index,\n    extdatavalues_channels.value,\n    extdatavalues_channels.number\n   FROM extdatavalues_channels\nUNION ALL\n SELECT 'contacts'::t_entity AS entity,\n    extdatavalues_contacts.field,\n    extdatavalues_contacts.index,\n    extdatavalues_contacts.value,\n    extdatavalues_contacts.number\n   FROM extdatavalues_contacts\nUNION ALL\n SELECT 'contracts'::t_entity AS entity,\n    extdatavalues_contracts.field,\n    extdatavalues_contracts.index,\n    extdatavalues_contracts.value,\n    extdatavalues_contracts.number\n   FROM extdatavalues_contracts\nUNION ALL\n SELECT 'couponcodes'::t_entity AS entity,\n    extdatavalues_couponcodes.field,\n    extdatavalues_couponcodes.index,\n    extdatavalues_couponcodes.value,\n    extdatavalues_couponcodes.number\n   FROM extdatavalues_couponcodes\nUNION ALL\n SELECT 'coupons'::t_entity AS entity,\n    extdatavalues_coupons.field,\n    extdatavalues_coupons.index,\n    extdatavalues_coupons.value,\n    extdatavalues_coupons.number\n   FROM extdatavalues_coupons\nUNION ALL\n SELECT 'customfields'::t_entity AS entity,\n    extdatavalues_customfields.field,\n    extdatavalues_customfields.index,\n    extdatavalues_customfields.value,\n    extdatavalues_customfields.number\n   FROM extdatavalues_customfields\nUNION ALL\n SELECT 'davservers'::t_entity AS entity,\n    extdatavalues_davservers.field,\n    extdatavalues_davservers.index,\n    extdatavalues_davservers.value,\n    extdatavalues_davservers.number\n   FROM extdatavalues_davservers\nUNION ALL\n SELECT 'devices'::t_entity AS entity,\n    extdatavalues_devices.field,\n    extdatavalues_devices.index,\n    extdatavalues_devices.value,\n    extdatavalues_devices.number\n   FROM extdatavalues_devices\nUNION ALL\n SELECT 'documents'::t_entity AS entity,\n    extdatavalues_documents.field,\n    extdatavalues_documents.index,\n    extdatavalues_documents.value,\n    extdatavalues_documents.number\n   FROM extdatavalues_documents\nUNION ALL\n SELECT 'dunning'::t_entity AS entity,\n    extdatavalues_dunning.field,\n    extdatavalues_dunning.index,\n    extdatavalues_dunning.value,\n    extdatavalues_dunning.number\n   FROM extdatavalues_dunning\nUNION ALL\n SELECT 'feedservers'::t_entity AS entity,\n    extdatavalues_feedservers.field,\n    extdatavalues_feedservers.index,\n    extdatavalues_feedservers.value,\n    extdatavalues_feedservers.number\n   FROM extdatavalues_feedservers\nUNION ALL\n SELECT 'forks'::t_entity AS entity,\n    extdatavalues_forks.field,\n    extdatavalues_forks.index,\n    extdatavalues_forks.value,\n    extdatavalues_forks.number\n   FROM extdatavalues_forks\nUNION ALL\n SELECT 'groups'::t_entity AS entity,\n    extdatavalues_groups.field,\n    extdatavalues_groups.index,\n    extdatavalues_groups.value,\n    extdatavalues_groups.number\n   FROM extdatavalues_groups\nUNION ALL\n SELECT 'items'::t_entity AS entity,\n    extdatavalues_items.field,\n    extdatavalues_items.index,\n    extdatavalues_items.value,\n    extdatavalues_items.number\n   FROM extdatavalues_items\nUNION ALL\n SELECT 'ledgers'::t_entity AS entity,\n    extdatavalues_ledgers.field,\n    extdatavalues_ledgers.index,\n    extdatavalues_ledgers.value,\n    extdatavalues_ledgers.number\n   FROM extdatavalues_ledgers\nUNION ALL\n SELECT 'links'::t_entity AS entity,\n    extdatavalues_links.field,\n    extdatavalues_links.index,\n    extdatavalues_links.value,\n    extdatavalues_links.number\n   FROM extdatavalues_links\nUNION ALL\n SELECT 'mailinglists'::t_entity AS entity,\n    extdatavalues_mailinglists.field,\n    extdatavalues_mailinglists.index,\n    extdatavalues_mailinglists.value,\n    extdatavalues_mailinglists.number\n   FROM extdatavalues_mailinglists\nUNION ALL\n SELECT 'mailservers'::t_entity AS entity,\n    extdatavalues_mailservers.field,\n    extdatavalues_mailservers.index,\n    extdatavalues_mailservers.value,\n    extdatavalues_mailservers.number\n   FROM extdatavalues_mailservers\nUNION ALL\n SELECT 'messages'::t_entity AS entity,\n    extdatavalues_messages.field,\n    extdatavalues_messages.index,\n    extdatavalues_messages.value,\n    extdatavalues_messages.number\n   FROM extdatavalues_messages\nUNION ALL\n SELECT 'notes'::t_entity AS entity,\n    extdatavalues_notes.field,\n    extdatavalues_notes.index,\n    extdatavalues_notes.value,\n    extdatavalues_notes.number\n   FROM extdatavalues_notes\nUNION ALL\n SELECT 'objects'::t_entity AS entity,\n    extdatavalues_objects.field,\n    extdatavalues_objects.index,\n    extdatavalues_objects.value,\n    extdatavalues_objects.number\n   FROM extdatavalues_objects\nUNION ALL\n SELECT 'opportunities'::t_entity AS entity,\n    extdatavalues_opportunities.field,\n    extdatavalues_opportunities.index,\n    extdatavalues_opportunities.value,\n    extdatavalues_opportunities.number\n   FROM extdatavalues_opportunities\nUNION ALL\n SELECT 'participants'::t_entity AS entity,\n    extdatavalues_participants.field,\n    extdatavalues_participants.index,\n    extdatavalues_participants.value,\n    extdatavalues_participants.number\n   FROM extdatavalues_participants\nUNION ALL\n SELECT 'payments'::t_entity AS entity,\n    extdatavalues_payments.field,\n    extdatavalues_payments.index,\n    extdatavalues_payments.value,\n    extdatavalues_payments.number\n   FROM extdatavalues_payments\nUNION ALL\n SELECT 'pricelists'::t_entity AS entity,\n    extdatavalues_pricelists.field,\n    extdatavalues_pricelists.index,\n    extdatavalues_pricelists.value,\n    extdatavalues_pricelists.number\n   FROM extdatavalues_pricelists\nUNION ALL\n SELECT 'projects'::t_entity AS entity,\n    extdatavalues_projects.field,\n    extdatavalues_projects.index,\n    extdatavalues_projects.value,\n    extdatavalues_projects.number\n   FROM extdatavalues_projects\nUNION ALL\n SELECT 'resources'::t_entity AS entity,\n    extdatavalues_resources.field,\n    extdatavalues_resources.index,\n    extdatavalues_resources.value,\n    extdatavalues_resources.number\n   FROM extdatavalues_resources\nUNION ALL\n SELECT 'services'::t_entity AS entity,\n    extdatavalues_services.field,\n    extdatavalues_services.index,\n    extdatavalues_services.value,\n    extdatavalues_services.number\n   FROM extdatavalues_services\nUNION ALL\n SELECT 'stocktransactions'::t_entity AS entity,\n    extdatavalues_stocktransactions.field,\n    extdatavalues_stocktransactions.index,\n    extdatavalues_stocktransactions.value,\n    extdatavalues_stocktransactions.number\n   FROM extdatavalues_stocktransactions\nUNION ALL\n SELECT 'storages'::t_entity AS entity,\n    extdatavalues_storages.field,\n    extdatavalues_storages.index,\n    extdatavalues_storages.value,\n    extdatavalues_storages.number\n   FROM extdatavalues_storages\nUNION ALL\n SELECT 'tasks'::t_entity AS entity,\n    extdatavalues_tasks.field,\n    extdatavalues_tasks.index,\n    extdatavalues_tasks.value,\n    extdatavalues_tasks.number\n   FROM extdatavalues_tasks\nUNION ALL\n SELECT 'tickets'::t_entity AS entity,\n    extdatavalues_tickets.field,\n    extdatavalues_tickets.index,\n    extdatavalues_tickets.value,\n    extdatavalues_tickets.number\n   FROM extdatavalues_tickets\nUNION ALL\n SELECT 'transactions'::t_entity AS entity,\n    extdatavalues_transactions.field,\n    extdatavalues_transactions.index,\n    extdatavalues_transactions.value,\n    extdatavalues_transactions.number\n   FROM extdatavalues_transactions\nUNION ALL\n SELECT 'users'::t_entity AS entity,\n    extdatavalues_users.field,\n    extdatavalues_users.index,\n    extdatavalues_users.value,\n    extdatavalues_users.number\n   FROM extdatavalues_users\nUNION ALL\n SELECT 'weblets'::t_entity AS entity,\n    extdatavalues_weblets.field,\n    extdatavalues_weblets.index,\n    extdatavalues_weblets.value,\n    extdatavalues_weblets.number\n   FROM extdatavalues_weblets;"
      }
    ],
    "statistics": [],
    "def": "SELECT 'accounts'::t_entity AS entity,\n    extdatavalues_accounts.field,\n    extdatavalues_accounts.index,\n    extdatavalues_accounts.value,\n    extdatavalues_accounts.number\n   FROM extdatavalues_accounts\nUNION ALL\n SELECT 'actionsteps'::t_entity AS entity,\n    extdatavalues_actionsteps.field,\n    extdatavalues_actionsteps.index,\n    extdatavalues_actionsteps.value,\n    extdatavalues_actionsteps.number\n   FROM extdatavalues_actionsteps\nUNION ALL\n SELECT 'applications'::t_entity AS entity,\n    extdatavalues_applications.field,\n    extdatavalues_applications.index,\n    extdatavalues_applications.value,\n    extdatavalues_applications.number\n   FROM extdatavalues_applications\nUNION ALL\n SELECT 'appointments'::t_entity AS entity,\n    extdatavalues_appointments.field,\n    extdatavalues_appointments.index,\n    extdatavalues_appointments.value,\n    extdatavalues_appointments.number\n   FROM extdatavalues_appointments\nUNION ALL\n SELECT 'campaigns'::t_entity AS entity,\n    extdatavalues_campaigns.field,\n    extdatavalues_campaigns.index,\n    extdatavalues_campaigns.value,\n    extdatavalues_campaigns.number\n   FROM extdatavalues_campaigns\nUNION ALL\n SELECT 'channels'::t_entity AS entity,\n    extdatavalues_channels.field,\n    extdatavalues_channels.index,\n    extdatavalues_channels.value,\n    extdatavalues_channels.number\n   FROM extdatavalues_channels\nUNION ALL\n SELECT 'contacts'::t_entity AS entity,\n    extdatavalues_contacts.field,\n    extdatavalues_contacts.index,\n    extdatavalues_contacts.value,\n    extdatavalues_contacts.number\n   FROM extdatavalues_contacts\nUNION ALL\n SELECT 'contracts'::t_entity AS entity,\n    extdatavalues_contracts.field,\n    extdatavalues_contracts.index,\n    extdatavalues_contracts.value,\n    extdatavalues_contracts.number\n   FROM extdatavalues_contracts\nUNION ALL\n SELECT 'couponcodes'::t_entity AS entity,\n    extdatavalues_couponcodes.field,\n    extdatavalues_couponcodes.index,\n    extdatavalues_couponcodes.value,\n    extdatavalues_couponcodes.number\n   FROM extdatavalues_couponcodes\nUNION ALL\n SELECT 'coupons'::t_entity AS entity,\n    extdatavalues_coupons.field,\n    extdatavalues_coupons.index,\n    extdatavalues_coupons.value,\n    extdatavalues_coupons.number\n   FROM extdatavalues_coupons\nUNION ALL\n SELECT 'customfields'::t_entity AS entity,\n    extdatavalues_customfields.field,\n    extdatavalues_customfields.index,\n    extdatavalues_customfields.value,\n    extdatavalues_customfields.number\n   FROM extdatavalues_customfields\nUNION ALL\n SELECT 'davservers'::t_entity AS entity,\n    extdatavalues_davservers.field,\n    extdatavalues_davservers.index,\n    extdatavalues_davservers.value,\n    extdatavalues_davservers.number\n   FROM extdatavalues_davservers\nUNION ALL\n SELECT 'devices'::t_entity AS entity,\n    extdatavalues_devices.field,\n    extdatavalues_devices.index,\n    extdatavalues_devices.value,\n    extdatavalues_devices.number\n   FROM extdatavalues_devices\nUNION ALL\n SELECT 'documents'::t_entity AS entity,\n    extdatavalues_documents.field,\n    extdatavalues_documents.index,\n    extdatavalues_documents.value,\n    extdatavalues_documents.number\n   FROM extdatavalues_documents\nUNION ALL\n SELECT 'dunning'::t_entity AS entity,\n    extdatavalues_dunning.field,\n    extdatavalues_dunning.index,\n    extdatavalues_dunning.value,\n    extdatavalues_dunning.number\n   FROM extdatavalues_dunning\nUNION ALL\n SELECT 'feedservers'::t_entity AS entity,\n    extdatavalues_feedservers.field,\n    extdatavalues_feedservers.index,\n    extdatavalues_feedservers.value,\n    extdatavalues_feedservers.number\n   FROM extdatavalues_feedservers\nUNION ALL\n SELECT 'forks'::t_entity AS entity,\n    extdatavalues_forks.field,\n    extdatavalues_forks.index,\n    extdatavalues_forks.value,\n    extdatavalues_forks.number\n   FROM extdatavalues_forks\nUNION ALL\n SELECT 'groups'::t_entity AS entity,\n    extdatavalues_groups.field,\n    extdatavalues_groups.index,\n    extdatavalues_groups.value,\n    extdatavalues_groups.number\n   FROM extdatavalues_groups\nUNION ALL\n SELECT 'items'::t_entity AS entity,\n    extdatavalues_items.field,\n    extdatavalues_items.index,\n    extdatavalues_items.value,\n    extdatavalues_items.number\n   FROM extdatavalues_items\nUNION ALL\n SELECT 'ledgers'::t_entity AS entity,\n    extdatavalues_ledgers.field,\n    extdatavalues_ledgers.index,\n    extdatavalues_ledgers.value,\n    extdatavalues_ledgers.number\n   FROM extdatavalues_ledgers\nUNION ALL\n SELECT 'links'::t_entity AS entity,\n    extdatavalues_links.field,\n    extdatavalues_links.index,\n    extdatavalues_links.value,\n    extdatavalues_links.number\n   FROM extdatavalues_links\nUNION ALL\n SELECT 'mailinglists'::t_entity AS entity,\n    extdatavalues_mailinglists.field,\n    extdatavalues_mailinglists.index,\n    extdatavalues_mailinglists.value,\n    extdatavalues_mailinglists.number\n   FROM extdatavalues_mailinglists\nUNION ALL\n SELECT 'mailservers'::t_entity AS entity,\n    extdatavalues_mailservers.field,\n    extdatavalues_mailservers.index,\n    extdatavalues_mailservers.value,\n    extdatavalues_mailservers.number\n   FROM extdatavalues_mailservers\nUNION ALL\n SELECT 'messages'::t_entity AS entity,\n    extdatavalues_messages.field,\n    extdatavalues_messages.index,\n    extdatavalues_messages.value,\n    extdatavalues_messages.number\n   FROM extdatavalues_messages\nUNION ALL\n SELECT 'notes'::t_entity AS entity,\n    extdatavalues_notes.field,\n    extdatavalues_notes.index,\n    extdatavalues_notes.value,\n    extdatavalues_notes.number\n   FROM extdatavalues_notes\nUNION ALL\n SELECT 'objects'::t_entity AS entity,\n    extdatavalues_objects.field,\n    extdatavalues_objects.index,\n    extdatavalues_objects.value,\n    extdatavalues_objects.number\n   FROM extdatavalues_objects\nUNION ALL\n SELECT 'opportunities'::t_entity AS entity,\n    extdatavalues_opportunities.field,\n    extdatavalues_opportunities.index,\n    extdatavalues_opportunities.value,\n    extdatavalues_opportunities.number\n   FROM extdatavalues_opportunities\nUNION ALL\n SELECT 'participants'::t_entity AS entity,\n    extdatavalues_participants.field,\n    extdatavalues_participants.index,\n    extdatavalues_participants.value,\n    extdatavalues_participants.number\n   FROM extdatavalues_participants\nUNION ALL\n SELECT 'payments'::t_entity AS entity,\n    extdatavalues_payments.field,\n    extdatavalues_payments.index,\n    extdatavalues_payments.value,\n    extdatavalues_payments.number\n   FROM extdatavalues_payments\nUNION ALL\n SELECT 'pricelists'::t_entity AS entity,\n    extdatavalues_pricelists.field,\n    extdatavalues_pricelists.index,\n    extdatavalues_pricelists.value,\n    extdatavalues_pricelists.number\n   FROM extdatavalues_pricelists\nUNION ALL\n SELECT 'projects'::t_entity AS entity,\n    extdatavalues_projects.field,\n    extdatavalues_projects.index,\n    extdatavalues_projects.value,\n    extdatavalues_projects.number\n   FROM extdatavalues_projects\nUNION ALL\n SELECT 'resources'::t_entity AS entity,\n    extdatavalues_resources.field,\n    extdatavalues_resources.index,\n    extdatavalues_resources.value,\n    extdatavalues_resources.number\n   FROM extdatavalues_resources\nUNION ALL\n SELECT 'services'::t_entity AS entity,\n    extdatavalues_services.field,\n    extdatavalues_services.index,\n    extdatavalues_services.value,\n    extdatavalues_services.number\n   FROM extdatavalues_services\nUNION ALL\n SELECT 'stocktransactions'::t_entity AS entity,\n    extdatavalues_stocktransactions.field,\n    extdatavalues_stocktransactions.index,\n    extdatavalues_stocktransactions.value,\n    extdatavalues_stocktransactions.number\n   FROM extdatavalues_stocktransactions\nUNION ALL\n SELECT 'storages'::t_entity AS entity,\n    extdatavalues_storages.field,\n    extdatavalues_storages.index,\n    extdatavalues_storages.value,\n    extdatavalues_storages.number\n   FROM extdatavalues_storages\nUNION ALL\n SELECT 'tasks'::t_entity AS entity,\n    extdatavalues_tasks.field,\n    extdatavalues_tasks.index,\n    extdatavalues_tasks.value,\n    extdatavalues_tasks.number\n   FROM extdatavalues_tasks\nUNION ALL\n SELECT 'tickets'::t_entity AS entity,\n    extdatavalues_tickets.field,\n    extdatavalues_tickets.index,\n    extdatavalues_tickets.value,\n    extdatavalues_tickets.number\n   FROM extdatavalues_tickets\nUNION ALL\n SELECT 'transactions'::t_entity AS entity,\n    extdatavalues_transactions.field,\n    extdatavalues_transactions.index,\n    extdatavalues_transactions.value,\n    extdatavalues_transactions.number\n   FROM extdatavalues_transactions\nUNION ALL\n SELECT 'users'::t_entity AS entity,\n    extdatavalues_users.field,\n    extdatavalues_users.index,\n    extdatavalues_users.value,\n    extdatavalues_users.number\n   FROM extdatavalues_users\nUNION ALL\n SELECT 'weblets'::t_entity AS entity,\n    extdatavalues_weblets.field,\n    extdatavalues_weblets.index,\n    extdatavalues_weblets.value,\n    extdatavalues_weblets.number\n   FROM extdatavalues_weblets;"
  },
  {
    "name": "extdatavalues_accounts",
    "type": "view",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [],
    "constraints": [],
    "triggers": [],
    "rules": [
      {
        "name": "_RETURN",
        "type": "select",
        "instead": true,
        "def": "CREATE RULE \"_RETURN\" AS\n    ON SELECT TO extdatavalues_accounts DO INSTEAD  SELECT extdataregular_accounts.field,\n    extdataregular_accounts.index,\n    extdataregular_accounts.value,\n    NULL::numeric AS number\n   FROM extdataregular_accounts\nUNION ALL\n SELECT extdatanumeric_accounts.field,\n    extdatanumeric_accounts.index,\n    COALESCE(extdatanumeric_accounts.value, extdatanumeric_accounts.number::text) AS value,\n    extdatanumeric_accounts.number\n   FROM extdatanumeric_accounts\nUNION ALL\n SELECT extdataempty_accounts.field,\n    extdataempty_accounts.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_accounts\nUNION ALL\n SELECT extdatazero_accounts.field,\n    extdatazero_accounts.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_accounts;"
      }
    ],
    "statistics": [],
    "def": "SELECT extdataregular_accounts.field,\n    extdataregular_accounts.index,\n    extdataregular_accounts.value,\n    NULL::numeric AS number\n   FROM extdataregular_accounts\nUNION ALL\n SELECT extdatanumeric_accounts.field,\n    extdatanumeric_accounts.index,\n    COALESCE(extdatanumeric_accounts.value, extdatanumeric_accounts.number::text) AS value,\n    extdatanumeric_accounts.number\n   FROM extdatanumeric_accounts\nUNION ALL\n SELECT extdataempty_accounts.field,\n    extdataempty_accounts.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_accounts\nUNION ALL\n SELECT extdatazero_accounts.field,\n    extdatazero_accounts.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_accounts;"
  },
  {
    "name": "extdatavalues_actionsteps",
    "type": "view",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [],
    "constraints": [],
    "triggers": [],
    "rules": [
      {
        "name": "_RETURN",
        "type": "select",
        "instead": true,
        "def": "CREATE RULE \"_RETURN\" AS\n    ON SELECT TO extdatavalues_actionsteps DO INSTEAD  SELECT extdataregular_actionsteps.field,\n    extdataregular_actionsteps.index,\n    extdataregular_actionsteps.value,\n    NULL::numeric AS number\n   FROM extdataregular_actionsteps\nUNION ALL\n SELECT extdatanumeric_actionsteps.field,\n    extdatanumeric_actionsteps.index,\n    COALESCE(extdatanumeric_actionsteps.value, extdatanumeric_actionsteps.number::text) AS value,\n    extdatanumeric_actionsteps.number\n   FROM extdatanumeric_actionsteps\nUNION ALL\n SELECT extdataempty_actionsteps.field,\n    extdataempty_actionsteps.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_actionsteps\nUNION ALL\n SELECT extdatazero_actionsteps.field,\n    extdatazero_actionsteps.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_actionsteps;"
      }
    ],
    "statistics": [],
    "def": "SELECT extdataregular_actionsteps.field,\n    extdataregular_actionsteps.index,\n    extdataregular_actionsteps.value,\n    NULL::numeric AS number\n   FROM extdataregular_actionsteps\nUNION ALL\n SELECT extdatanumeric_actionsteps.field,\n    extdatanumeric_actionsteps.index,\n    COALESCE(extdatanumeric_actionsteps.value, extdatanumeric_actionsteps.number::text) AS value,\n    extdatanumeric_actionsteps.number\n   FROM extdatanumeric_actionsteps\nUNION ALL\n SELECT extdataempty_actionsteps.field,\n    extdataempty_actionsteps.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_actionsteps\nUNION ALL\n SELECT extdatazero_actionsteps.field,\n    extdatazero_actionsteps.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_actionsteps;"
  },
  {
    "name": "extdatavalues_applications",
    "type": "view",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [],
    "constraints": [],
    "triggers": [],
    "rules": [
      {
        "name": "_RETURN",
        "type": "select",
        "instead": true,
        "def": "CREATE RULE \"_RETURN\" AS\n    ON SELECT TO extdatavalues_applications DO INSTEAD  SELECT extdataregular_applications.field,\n    extdataregular_applications.index,\n    extdataregular_applications.value,\n    NULL::numeric AS number\n   FROM extdataregular_applications\nUNION ALL\n SELECT extdatanumeric_applications.field,\n    extdatanumeric_applications.index,\n    COALESCE(extdatanumeric_applications.value, extdatanumeric_applications.number::text) AS value,\n    extdatanumeric_applications.number\n   FROM extdatanumeric_applications\nUNION ALL\n SELECT extdataempty_applications.field,\n    extdataempty_applications.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_applications\nUNION ALL\n SELECT extdatazero_applications.field,\n    extdatazero_applications.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_applications;"
      }
    ],
    "statistics": [],
    "def": "SELECT extdataregular_applications.field,\n    extdataregular_applications.index,\n    extdataregular_applications.value,\n    NULL::numeric AS number\n   FROM extdataregular_applications\nUNION ALL\n SELECT extdatanumeric_applications.field,\n    extdatanumeric_applications.index,\n    COALESCE(extdatanumeric_applications.value, extdatanumeric_applications.number::text) AS value,\n    extdatanumeric_applications.number\n   FROM extdatanumeric_applications\nUNION ALL\n SELECT extdataempty_applications.field,\n    extdataempty_applications.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_applications\nUNION ALL\n SELECT extdatazero_applications.field,\n    extdatazero_applications.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_applications;"
  },
  {
    "name": "extdatavalues_appointments",
    "type": "view",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [],
    "constraints": [],
    "triggers": [],
    "rules": [
      {
        "name": "_RETURN",
        "type": "select",
        "instead": true,
        "def": "CREATE RULE \"_RETURN\" AS\n    ON SELECT TO extdatavalues_appointments DO INSTEAD  SELECT extdataregular_appointments.field,\n    extdataregular_appointments.index,\n    extdataregular_appointments.value,\n    NULL::numeric AS number\n   FROM extdataregular_appointments\nUNION ALL\n SELECT extdatanumeric_appointments.field,\n    extdatanumeric_appointments.index,\n    COALESCE(extdatanumeric_appointments.value, extdatanumeric_appointments.number::text) AS value,\n    extdatanumeric_appointments.number\n   FROM extdatanumeric_appointments\nUNION ALL\n SELECT extdataempty_appointments.field,\n    extdataempty_appointments.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_appointments\nUNION ALL\n SELECT extdatazero_appointments.field,\n    extdatazero_appointments.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_appointments;"
      }
    ],
    "statistics": [],
    "def": "SELECT extdataregular_appointments.field,\n    extdataregular_appointments.index,\n    extdataregular_appointments.value,\n    NULL::numeric AS number\n   FROM extdataregular_appointments\nUNION ALL\n SELECT extdatanumeric_appointments.field,\n    extdatanumeric_appointments.index,\n    COALESCE(extdatanumeric_appointments.value, extdatanumeric_appointments.number::text) AS value,\n    extdatanumeric_appointments.number\n   FROM extdatanumeric_appointments\nUNION ALL\n SELECT extdataempty_appointments.field,\n    extdataempty_appointments.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_appointments\nUNION ALL\n SELECT extdatazero_appointments.field,\n    extdatazero_appointments.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_appointments;"
  },
  {
    "name": "extdatavalues_campaigns",
    "type": "view",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [],
    "constraints": [],
    "triggers": [],
    "rules": [
      {
        "name": "_RETURN",
        "type": "select",
        "instead": true,
        "def": "CREATE RULE \"_RETURN\" AS\n    ON SELECT TO extdatavalues_campaigns DO INSTEAD  SELECT extdataregular_campaigns.field,\n    extdataregular_campaigns.index,\n    extdataregular_campaigns.value,\n    NULL::numeric AS number\n   FROM extdataregular_campaigns\nUNION ALL\n SELECT extdatanumeric_campaigns.field,\n    extdatanumeric_campaigns.index,\n    COALESCE(extdatanumeric_campaigns.value, extdatanumeric_campaigns.number::text) AS value,\n    extdatanumeric_campaigns.number\n   FROM extdatanumeric_campaigns\nUNION ALL\n SELECT extdataempty_campaigns.field,\n    extdataempty_campaigns.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_campaigns\nUNION ALL\n SELECT extdatazero_campaigns.field,\n    extdatazero_campaigns.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_campaigns;"
      }
    ],
    "statistics": [],
    "def": "SELECT extdataregular_campaigns.field,\n    extdataregular_campaigns.index,\n    extdataregular_campaigns.value,\n    NULL::numeric AS number\n   FROM extdataregular_campaigns\nUNION ALL\n SELECT extdatanumeric_campaigns.field,\n    extdatanumeric_campaigns.index,\n    COALESCE(extdatanumeric_campaigns.value, extdatanumeric_campaigns.number::text) AS value,\n    extdatanumeric_campaigns.number\n   FROM extdatanumeric_campaigns\nUNION ALL\n SELECT extdataempty_campaigns.field,\n    extdataempty_campaigns.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_campaigns\nUNION ALL\n SELECT extdatazero_campaigns.field,\n    extdatazero_campaigns.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_campaigns;"
  },
  {
    "name": "extdatavalues_channels",
    "type": "view",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [],
    "constraints": [],
    "triggers": [],
    "rules": [
      {
        "name": "_RETURN",
        "type": "select",
        "instead": true,
        "def": "CREATE RULE \"_RETURN\" AS\n    ON SELECT TO extdatavalues_channels DO INSTEAD  SELECT extdataregular_channels.field,\n    extdataregular_channels.index,\n    extdataregular_channels.value,\n    NULL::numeric AS number\n   FROM extdataregular_channels\nUNION ALL\n SELECT extdatanumeric_channels.field,\n    extdatanumeric_channels.index,\n    COALESCE(extdatanumeric_channels.value, extdatanumeric_channels.number::text) AS value,\n    extdatanumeric_channels.number\n   FROM extdatanumeric_channels\nUNION ALL\n SELECT extdataempty_channels.field,\n    extdataempty_channels.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_channels\nUNION ALL\n SELECT extdatazero_channels.field,\n    extdatazero_channels.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_channels;"
      }
    ],
    "statistics": [],
    "def": "SELECT extdataregular_channels.field,\n    extdataregular_channels.index,\n    extdataregular_channels.value,\n    NULL::numeric AS number\n   FROM extdataregular_channels\nUNION ALL\n SELECT extdatanumeric_channels.field,\n    extdatanumeric_channels.index,\n    COALESCE(extdatanumeric_channels.value, extdatanumeric_channels.number::text) AS value,\n    extdatanumeric_channels.number\n   FROM extdatanumeric_channels\nUNION ALL\n SELECT extdataempty_channels.field,\n    extdataempty_channels.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_channels\nUNION ALL\n SELECT extdatazero_channels.field,\n    extdatazero_channels.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_channels;"
  },
  {
    "name": "extdatavalues_contacts",
    "type": "view",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [],
    "constraints": [],
    "triggers": [],
    "rules": [
      {
        "name": "_RETURN",
        "type": "select",
        "instead": true,
        "def": "CREATE RULE \"_RETURN\" AS\n    ON SELECT TO extdatavalues_contacts DO INSTEAD  SELECT extdataregular_contacts.field,\n    extdataregular_contacts.index,\n    extdataregular_contacts.value,\n    NULL::numeric AS number\n   FROM extdataregular_contacts\nUNION ALL\n SELECT extdatanumeric_contacts.field,\n    extdatanumeric_contacts.index,\n    COALESCE(extdatanumeric_contacts.value, extdatanumeric_contacts.number::text) AS value,\n    extdatanumeric_contacts.number\n   FROM extdatanumeric_contacts\nUNION ALL\n SELECT extdataempty_contacts.field,\n    extdataempty_contacts.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_contacts\nUNION ALL\n SELECT extdatazero_contacts.field,\n    extdatazero_contacts.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_contacts;"
      }
    ],
    "statistics": [],
    "def": "SELECT extdataregular_contacts.field,\n    extdataregular_contacts.index,\n    extdataregular_contacts.value,\n    NULL::numeric AS number\n   FROM extdataregular_contacts\nUNION ALL\n SELECT extdatanumeric_contacts.field,\n    extdatanumeric_contacts.index,\n    COALESCE(extdatanumeric_contacts.value, extdatanumeric_contacts.number::text) AS value,\n    extdatanumeric_contacts.number\n   FROM extdatanumeric_contacts\nUNION ALL\n SELECT extdataempty_contacts.field,\n    extdataempty_contacts.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_contacts\nUNION ALL\n SELECT extdatazero_contacts.field,\n    extdatazero_contacts.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_contacts;"
  },
  {
    "name": "extdatavalues_contracts",
    "type": "view",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [],
    "constraints": [],
    "triggers": [],
    "rules": [
      {
        "name": "_RETURN",
        "type": "select",
        "instead": true,
        "def": "CREATE RULE \"_RETURN\" AS\n    ON SELECT TO extdatavalues_contracts DO INSTEAD  SELECT extdataregular_contracts.field,\n    extdataregular_contracts.index,\n    extdataregular_contracts.value,\n    NULL::numeric AS number\n   FROM extdataregular_contracts\nUNION ALL\n SELECT extdatanumeric_contracts.field,\n    extdatanumeric_contracts.index,\n    COALESCE(extdatanumeric_contracts.value, extdatanumeric_contracts.number::text) AS value,\n    extdatanumeric_contracts.number\n   FROM extdatanumeric_contracts\nUNION ALL\n SELECT extdataempty_contracts.field,\n    extdataempty_contracts.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_contracts\nUNION ALL\n SELECT extdatazero_contracts.field,\n    extdatazero_contracts.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_contracts;"
      }
    ],
    "statistics": [],
    "def": "SELECT extdataregular_contracts.field,\n    extdataregular_contracts.index,\n    extdataregular_contracts.value,\n    NULL::numeric AS number\n   FROM extdataregular_contracts\nUNION ALL\n SELECT extdatanumeric_contracts.field,\n    extdatanumeric_contracts.index,\n    COALESCE(extdatanumeric_contracts.value, extdatanumeric_contracts.number::text) AS value,\n    extdatanumeric_contracts.number\n   FROM extdatanumeric_contracts\nUNION ALL\n SELECT extdataempty_contracts.field,\n    extdataempty_contracts.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_contracts\nUNION ALL\n SELECT extdatazero_contracts.field,\n    extdatazero_contracts.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_contracts;"
  },
  {
    "name": "extdatavalues_couponcodes",
    "type": "view",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [],
    "constraints": [],
    "triggers": [],
    "rules": [
      {
        "name": "_RETURN",
        "type": "select",
        "instead": true,
        "def": "CREATE RULE \"_RETURN\" AS\n    ON SELECT TO extdatavalues_couponcodes DO INSTEAD  SELECT extdataregular_couponcodes.field,\n    extdataregular_couponcodes.index,\n    extdataregular_couponcodes.value,\n    NULL::numeric AS number\n   FROM extdataregular_couponcodes\nUNION ALL\n SELECT extdatanumeric_couponcodes.field,\n    extdatanumeric_couponcodes.index,\n    COALESCE(extdatanumeric_couponcodes.value, extdatanumeric_couponcodes.number::text) AS value,\n    extdatanumeric_couponcodes.number\n   FROM extdatanumeric_couponcodes\nUNION ALL\n SELECT extdataempty_couponcodes.field,\n    extdataempty_couponcodes.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_couponcodes\nUNION ALL\n SELECT extdatazero_couponcodes.field,\n    extdatazero_couponcodes.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_couponcodes;"
      }
    ],
    "statistics": [],
    "def": "SELECT extdataregular_couponcodes.field,\n    extdataregular_couponcodes.index,\n    extdataregular_couponcodes.value,\n    NULL::numeric AS number\n   FROM extdataregular_couponcodes\nUNION ALL\n SELECT extdatanumeric_couponcodes.field,\n    extdatanumeric_couponcodes.index,\n    COALESCE(extdatanumeric_couponcodes.value, extdatanumeric_couponcodes.number::text) AS value,\n    extdatanumeric_couponcodes.number\n   FROM extdatanumeric_couponcodes\nUNION ALL\n SELECT extdataempty_couponcodes.field,\n    extdataempty_couponcodes.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_couponcodes\nUNION ALL\n SELECT extdatazero_couponcodes.field,\n    extdatazero_couponcodes.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_couponcodes;"
  },
  {
    "name": "extdatavalues_coupons",
    "type": "view",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [],
    "constraints": [],
    "triggers": [],
    "rules": [
      {
        "name": "_RETURN",
        "type": "select",
        "instead": true,
        "def": "CREATE RULE \"_RETURN\" AS\n    ON SELECT TO extdatavalues_coupons DO INSTEAD  SELECT extdataregular_coupons.field,\n    extdataregular_coupons.index,\n    extdataregular_coupons.value,\n    NULL::numeric AS number\n   FROM extdataregular_coupons\nUNION ALL\n SELECT extdatanumeric_coupons.field,\n    extdatanumeric_coupons.index,\n    COALESCE(extdatanumeric_coupons.value, extdatanumeric_coupons.number::text) AS value,\n    extdatanumeric_coupons.number\n   FROM extdatanumeric_coupons\nUNION ALL\n SELECT extdataempty_coupons.field,\n    extdataempty_coupons.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_coupons\nUNION ALL\n SELECT extdatazero_coupons.field,\n    extdatazero_coupons.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_coupons;"
      }
    ],
    "statistics": [],
    "def": "SELECT extdataregular_coupons.field,\n    extdataregular_coupons.index,\n    extdataregular_coupons.value,\n    NULL::numeric AS number\n   FROM extdataregular_coupons\nUNION ALL\n SELECT extdatanumeric_coupons.field,\n    extdatanumeric_coupons.index,\n    COALESCE(extdatanumeric_coupons.value, extdatanumeric_coupons.number::text) AS value,\n    extdatanumeric_coupons.number\n   FROM extdatanumeric_coupons\nUNION ALL\n SELECT extdataempty_coupons.field,\n    extdataempty_coupons.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_coupons\nUNION ALL\n SELECT extdatazero_coupons.field,\n    extdatazero_coupons.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_coupons;"
  },
  {
    "name": "extdatavalues_customfields",
    "type": "view",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [],
    "constraints": [],
    "triggers": [],
    "rules": [
      {
        "name": "_RETURN",
        "type": "select",
        "instead": true,
        "def": "CREATE RULE \"_RETURN\" AS\n    ON SELECT TO extdatavalues_customfields DO INSTEAD  SELECT extdataregular_customfields.field,\n    extdataregular_customfields.index,\n    extdataregular_customfields.value,\n    NULL::numeric AS number\n   FROM extdataregular_customfields\nUNION ALL\n SELECT extdatanumeric_customfields.field,\n    extdatanumeric_customfields.index,\n    COALESCE(extdatanumeric_customfields.value, extdatanumeric_customfields.number::text) AS value,\n    extdatanumeric_customfields.number\n   FROM extdatanumeric_customfields\nUNION ALL\n SELECT extdataempty_customfields.field,\n    extdataempty_customfields.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_customfields\nUNION ALL\n SELECT extdatazero_customfields.field,\n    extdatazero_customfields.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_customfields;"
      }
    ],
    "statistics": [],
    "def": "SELECT extdataregular_customfields.field,\n    extdataregular_customfields.index,\n    extdataregular_customfields.value,\n    NULL::numeric AS number\n   FROM extdataregular_customfields\nUNION ALL\n SELECT extdatanumeric_customfields.field,\n    extdatanumeric_customfields.index,\n    COALESCE(extdatanumeric_customfields.value, extdatanumeric_customfields.number::text) AS value,\n    extdatanumeric_customfields.number\n   FROM extdatanumeric_customfields\nUNION ALL\n SELECT extdataempty_customfields.field,\n    extdataempty_customfields.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_customfields\nUNION ALL\n SELECT extdatazero_customfields.field,\n    extdatazero_customfields.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_customfields;"
  },
  {
    "name": "extdatavalues_davservers",
    "type": "view",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [],
    "constraints": [],
    "triggers": [],
    "rules": [
      {
        "name": "_RETURN",
        "type": "select",
        "instead": true,
        "def": "CREATE RULE \"_RETURN\" AS\n    ON SELECT TO extdatavalues_davservers DO INSTEAD  SELECT extdataregular_davservers.field,\n    extdataregular_davservers.index,\n    extdataregular_davservers.value,\n    NULL::numeric AS number\n   FROM extdataregular_davservers\nUNION ALL\n SELECT extdatanumeric_davservers.field,\n    extdatanumeric_davservers.index,\n    COALESCE(extdatanumeric_davservers.value, extdatanumeric_davservers.number::text) AS value,\n    extdatanumeric_davservers.number\n   FROM extdatanumeric_davservers\nUNION ALL\n SELECT extdataempty_davservers.field,\n    extdataempty_davservers.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_davservers\nUNION ALL\n SELECT extdatazero_davservers.field,\n    extdatazero_davservers.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_davservers;"
      }
    ],
    "statistics": [],
    "def": "SELECT extdataregular_davservers.field,\n    extdataregular_davservers.index,\n    extdataregular_davservers.value,\n    NULL::numeric AS number\n   FROM extdataregular_davservers\nUNION ALL\n SELECT extdatanumeric_davservers.field,\n    extdatanumeric_davservers.index,\n    COALESCE(extdatanumeric_davservers.value, extdatanumeric_davservers.number::text) AS value,\n    extdatanumeric_davservers.number\n   FROM extdatanumeric_davservers\nUNION ALL\n SELECT extdataempty_davservers.field,\n    extdataempty_davservers.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_davservers\nUNION ALL\n SELECT extdatazero_davservers.field,\n    extdatazero_davservers.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_davservers;"
  },
  {
    "name": "extdatavalues_devices",
    "type": "view",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [],
    "constraints": [],
    "triggers": [],
    "rules": [
      {
        "name": "_RETURN",
        "type": "select",
        "instead": true,
        "def": "CREATE RULE \"_RETURN\" AS\n    ON SELECT TO extdatavalues_devices DO INSTEAD  SELECT extdataregular_devices.field,\n    extdataregular_devices.index,\n    extdataregular_devices.value,\n    NULL::numeric AS number\n   FROM extdataregular_devices\nUNION ALL\n SELECT extdatanumeric_devices.field,\n    extdatanumeric_devices.index,\n    COALESCE(extdatanumeric_devices.value, extdatanumeric_devices.number::text) AS value,\n    extdatanumeric_devices.number\n   FROM extdatanumeric_devices\nUNION ALL\n SELECT extdataempty_devices.field,\n    extdataempty_devices.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_devices\nUNION ALL\n SELECT extdatazero_devices.field,\n    extdatazero_devices.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_devices;"
      }
    ],
    "statistics": [],
    "def": "SELECT extdataregular_devices.field,\n    extdataregular_devices.index,\n    extdataregular_devices.value,\n    NULL::numeric AS number\n   FROM extdataregular_devices\nUNION ALL\n SELECT extdatanumeric_devices.field,\n    extdatanumeric_devices.index,\n    COALESCE(extdatanumeric_devices.value, extdatanumeric_devices.number::text) AS value,\n    extdatanumeric_devices.number\n   FROM extdatanumeric_devices\nUNION ALL\n SELECT extdataempty_devices.field,\n    extdataempty_devices.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_devices\nUNION ALL\n SELECT extdatazero_devices.field,\n    extdatazero_devices.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_devices;"
  },
  {
    "name": "extdatavalues_documents",
    "type": "view",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [],
    "constraints": [],
    "triggers": [],
    "rules": [
      {
        "name": "_RETURN",
        "type": "select",
        "instead": true,
        "def": "CREATE RULE \"_RETURN\" AS\n    ON SELECT TO extdatavalues_documents DO INSTEAD  SELECT extdataregular_documents.field,\n    extdataregular_documents.index,\n    extdataregular_documents.value,\n    NULL::numeric AS number\n   FROM extdataregular_documents\nUNION ALL\n SELECT extdatanumeric_documents.field,\n    extdatanumeric_documents.index,\n    COALESCE(extdatanumeric_documents.value, extdatanumeric_documents.number::text) AS value,\n    extdatanumeric_documents.number\n   FROM extdatanumeric_documents\nUNION ALL\n SELECT extdataempty_documents.field,\n    extdataempty_documents.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_documents\nUNION ALL\n SELECT extdatazero_documents.field,\n    extdatazero_documents.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_documents;"
      }
    ],
    "statistics": [],
    "def": "SELECT extdataregular_documents.field,\n    extdataregular_documents.index,\n    extdataregular_documents.value,\n    NULL::numeric AS number\n   FROM extdataregular_documents\nUNION ALL\n SELECT extdatanumeric_documents.field,\n    extdatanumeric_documents.index,\n    COALESCE(extdatanumeric_documents.value, extdatanumeric_documents.number::text) AS value,\n    extdatanumeric_documents.number\n   FROM extdatanumeric_documents\nUNION ALL\n SELECT extdataempty_documents.field,\n    extdataempty_documents.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_documents\nUNION ALL\n SELECT extdatazero_documents.field,\n    extdatazero_documents.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_documents;"
  },
  {
    "name": "extdatavalues_dunning",
    "type": "view",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [],
    "constraints": [],
    "triggers": [],
    "rules": [
      {
        "name": "_RETURN",
        "type": "select",
        "instead": true,
        "def": "CREATE RULE \"_RETURN\" AS\n    ON SELECT TO extdatavalues_dunning DO INSTEAD  SELECT extdataregular_dunning.field,\n    extdataregular_dunning.index,\n    extdataregular_dunning.value,\n    NULL::numeric AS number\n   FROM extdataregular_dunning\nUNION ALL\n SELECT extdatanumeric_dunning.field,\n    extdatanumeric_dunning.index,\n    COALESCE(extdatanumeric_dunning.value, extdatanumeric_dunning.number::text) AS value,\n    extdatanumeric_dunning.number\n   FROM extdatanumeric_dunning\nUNION ALL\n SELECT extdataempty_dunning.field,\n    extdataempty_dunning.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_dunning\nUNION ALL\n SELECT extdatazero_dunning.field,\n    extdatazero_dunning.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_dunning;"
      }
    ],
    "statistics": [],
    "def": "SELECT extdataregular_dunning.field,\n    extdataregular_dunning.index,\n    extdataregular_dunning.value,\n    NULL::numeric AS number\n   FROM extdataregular_dunning\nUNION ALL\n SELECT extdatanumeric_dunning.field,\n    extdatanumeric_dunning.index,\n    COALESCE(extdatanumeric_dunning.value, extdatanumeric_dunning.number::text) AS value,\n    extdatanumeric_dunning.number\n   FROM extdatanumeric_dunning\nUNION ALL\n SELECT extdataempty_dunning.field,\n    extdataempty_dunning.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_dunning\nUNION ALL\n SELECT extdatazero_dunning.field,\n    extdatazero_dunning.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_dunning;"
  },
  {
    "name": "extdatavalues_feedservers",
    "type": "view",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [],
    "constraints": [],
    "triggers": [],
    "rules": [
      {
        "name": "_RETURN",
        "type": "select",
        "instead": true,
        "def": "CREATE RULE \"_RETURN\" AS\n    ON SELECT TO extdatavalues_feedservers DO INSTEAD  SELECT extdataregular_feedservers.field,\n    extdataregular_feedservers.index,\n    extdataregular_feedservers.value,\n    NULL::numeric AS number\n   FROM extdataregular_feedservers\nUNION ALL\n SELECT extdatanumeric_feedservers.field,\n    extdatanumeric_feedservers.index,\n    COALESCE(extdatanumeric_feedservers.value, extdatanumeric_feedservers.number::text) AS value,\n    extdatanumeric_feedservers.number\n   FROM extdatanumeric_feedservers\nUNION ALL\n SELECT extdataempty_feedservers.field,\n    extdataempty_feedservers.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_feedservers\nUNION ALL\n SELECT extdatazero_feedservers.field,\n    extdatazero_feedservers.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_feedservers;"
      }
    ],
    "statistics": [],
    "def": "SELECT extdataregular_feedservers.field,\n    extdataregular_feedservers.index,\n    extdataregular_feedservers.value,\n    NULL::numeric AS number\n   FROM extdataregular_feedservers\nUNION ALL\n SELECT extdatanumeric_feedservers.field,\n    extdatanumeric_feedservers.index,\n    COALESCE(extdatanumeric_feedservers.value, extdatanumeric_feedservers.number::text) AS value,\n    extdatanumeric_feedservers.number\n   FROM extdatanumeric_feedservers\nUNION ALL\n SELECT extdataempty_feedservers.field,\n    extdataempty_feedservers.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_feedservers\nUNION ALL\n SELECT extdatazero_feedservers.field,\n    extdatazero_feedservers.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_feedservers;"
  },
  {
    "name": "extdatavalues_forks",
    "type": "view",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [],
    "constraints": [],
    "triggers": [],
    "rules": [
      {
        "name": "_RETURN",
        "type": "select",
        "instead": true,
        "def": "CREATE RULE \"_RETURN\" AS\n    ON SELECT TO extdatavalues_forks DO INSTEAD  SELECT extdataregular_forks.field,\n    extdataregular_forks.index,\n    extdataregular_forks.value,\n    NULL::numeric AS number\n   FROM extdataregular_forks\nUNION ALL\n SELECT extdatanumeric_forks.field,\n    extdatanumeric_forks.index,\n    COALESCE(extdatanumeric_forks.value, extdatanumeric_forks.number::text) AS value,\n    extdatanumeric_forks.number\n   FROM extdatanumeric_forks\nUNION ALL\n SELECT extdataempty_forks.field,\n    extdataempty_forks.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_forks\nUNION ALL\n SELECT extdatazero_forks.field,\n    extdatazero_forks.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_forks;"
      }
    ],
    "statistics": [],
    "def": "SELECT extdataregular_forks.field,\n    extdataregular_forks.index,\n    extdataregular_forks.value,\n    NULL::numeric AS number\n   FROM extdataregular_forks\nUNION ALL\n SELECT extdatanumeric_forks.field,\n    extdatanumeric_forks.index,\n    COALESCE(extdatanumeric_forks.value, extdatanumeric_forks.number::text) AS value,\n    extdatanumeric_forks.number\n   FROM extdatanumeric_forks\nUNION ALL\n SELECT extdataempty_forks.field,\n    extdataempty_forks.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_forks\nUNION ALL\n SELECT extdatazero_forks.field,\n    extdatazero_forks.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_forks;"
  },
  {
    "name": "extdatavalues_groups",
    "type": "view",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [],
    "constraints": [],
    "triggers": [],
    "rules": [
      {
        "name": "_RETURN",
        "type": "select",
        "instead": true,
        "def": "CREATE RULE \"_RETURN\" AS\n    ON SELECT TO extdatavalues_groups DO INSTEAD  SELECT extdataregular_groups.field,\n    extdataregular_groups.index,\n    extdataregular_groups.value,\n    NULL::numeric AS number\n   FROM extdataregular_groups\nUNION ALL\n SELECT extdatanumeric_groups.field,\n    extdatanumeric_groups.index,\n    COALESCE(extdatanumeric_groups.value, extdatanumeric_groups.number::text) AS value,\n    extdatanumeric_groups.number\n   FROM extdatanumeric_groups\nUNION ALL\n SELECT extdataempty_groups.field,\n    extdataempty_groups.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_groups\nUNION ALL\n SELECT extdatazero_groups.field,\n    extdatazero_groups.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_groups;"
      }
    ],
    "statistics": [],
    "def": "SELECT extdataregular_groups.field,\n    extdataregular_groups.index,\n    extdataregular_groups.value,\n    NULL::numeric AS number\n   FROM extdataregular_groups\nUNION ALL\n SELECT extdatanumeric_groups.field,\n    extdatanumeric_groups.index,\n    COALESCE(extdatanumeric_groups.value, extdatanumeric_groups.number::text) AS value,\n    extdatanumeric_groups.number\n   FROM extdatanumeric_groups\nUNION ALL\n SELECT extdataempty_groups.field,\n    extdataempty_groups.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_groups\nUNION ALL\n SELECT extdatazero_groups.field,\n    extdatazero_groups.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_groups;"
  },
  {
    "name": "extdatavalues_items",
    "type": "view",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [],
    "constraints": [],
    "triggers": [],
    "rules": [
      {
        "name": "_RETURN",
        "type": "select",
        "instead": true,
        "def": "CREATE RULE \"_RETURN\" AS\n    ON SELECT TO extdatavalues_items DO INSTEAD  SELECT extdataregular_items.field,\n    extdataregular_items.index,\n    extdataregular_items.value,\n    NULL::numeric AS number\n   FROM extdataregular_items\nUNION ALL\n SELECT extdatanumeric_items.field,\n    extdatanumeric_items.index,\n    COALESCE(extdatanumeric_items.value, extdatanumeric_items.number::text) AS value,\n    extdatanumeric_items.number\n   FROM extdatanumeric_items\nUNION ALL\n SELECT extdataempty_items.field,\n    extdataempty_items.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_items\nUNION ALL\n SELECT extdatazero_items.field,\n    extdatazero_items.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_items;"
      }
    ],
    "statistics": [],
    "def": "SELECT extdataregular_items.field,\n    extdataregular_items.index,\n    extdataregular_items.value,\n    NULL::numeric AS number\n   FROM extdataregular_items\nUNION ALL\n SELECT extdatanumeric_items.field,\n    extdatanumeric_items.index,\n    COALESCE(extdatanumeric_items.value, extdatanumeric_items.number::text) AS value,\n    extdatanumeric_items.number\n   FROM extdatanumeric_items\nUNION ALL\n SELECT extdataempty_items.field,\n    extdataempty_items.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_items\nUNION ALL\n SELECT extdatazero_items.field,\n    extdatazero_items.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_items;"
  },
  {
    "name": "extdatavalues_ledgers",
    "type": "view",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [],
    "constraints": [],
    "triggers": [],
    "rules": [
      {
        "name": "_RETURN",
        "type": "select",
        "instead": true,
        "def": "CREATE RULE \"_RETURN\" AS\n    ON SELECT TO extdatavalues_ledgers DO INSTEAD  SELECT extdataregular_ledgers.field,\n    extdataregular_ledgers.index,\n    extdataregular_ledgers.value,\n    NULL::numeric AS number\n   FROM extdataregular_ledgers\nUNION ALL\n SELECT extdatanumeric_ledgers.field,\n    extdatanumeric_ledgers.index,\n    COALESCE(extdatanumeric_ledgers.value, extdatanumeric_ledgers.number::text) AS value,\n    extdatanumeric_ledgers.number\n   FROM extdatanumeric_ledgers\nUNION ALL\n SELECT extdataempty_ledgers.field,\n    extdataempty_ledgers.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_ledgers\nUNION ALL\n SELECT extdatazero_ledgers.field,\n    extdatazero_ledgers.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_ledgers;"
      }
    ],
    "statistics": [],
    "def": "SELECT extdataregular_ledgers.field,\n    extdataregular_ledgers.index,\n    extdataregular_ledgers.value,\n    NULL::numeric AS number\n   FROM extdataregular_ledgers\nUNION ALL\n SELECT extdatanumeric_ledgers.field,\n    extdatanumeric_ledgers.index,\n    COALESCE(extdatanumeric_ledgers.value, extdatanumeric_ledgers.number::text) AS value,\n    extdatanumeric_ledgers.number\n   FROM extdatanumeric_ledgers\nUNION ALL\n SELECT extdataempty_ledgers.field,\n    extdataempty_ledgers.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_ledgers\nUNION ALL\n SELECT extdatazero_ledgers.field,\n    extdatazero_ledgers.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_ledgers;"
  },
  {
    "name": "extdatavalues_links",
    "type": "view",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [],
    "constraints": [],
    "triggers": [],
    "rules": [
      {
        "name": "_RETURN",
        "type": "select",
        "instead": true,
        "def": "CREATE RULE \"_RETURN\" AS\n    ON SELECT TO extdatavalues_links DO INSTEAD  SELECT extdataregular_links.field,\n    extdataregular_links.index,\n    extdataregular_links.value,\n    NULL::numeric AS number\n   FROM extdataregular_links\nUNION ALL\n SELECT extdatanumeric_links.field,\n    extdatanumeric_links.index,\n    COALESCE(extdatanumeric_links.value, extdatanumeric_links.number::text) AS value,\n    extdatanumeric_links.number\n   FROM extdatanumeric_links\nUNION ALL\n SELECT extdataempty_links.field,\n    extdataempty_links.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_links\nUNION ALL\n SELECT extdatazero_links.field,\n    extdatazero_links.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_links;"
      }
    ],
    "statistics": [],
    "def": "SELECT extdataregular_links.field,\n    extdataregular_links.index,\n    extdataregular_links.value,\n    NULL::numeric AS number\n   FROM extdataregular_links\nUNION ALL\n SELECT extdatanumeric_links.field,\n    extdatanumeric_links.index,\n    COALESCE(extdatanumeric_links.value, extdatanumeric_links.number::text) AS value,\n    extdatanumeric_links.number\n   FROM extdatanumeric_links\nUNION ALL\n SELECT extdataempty_links.field,\n    extdataempty_links.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_links\nUNION ALL\n SELECT extdatazero_links.field,\n    extdatazero_links.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_links;"
  },
  {
    "name": "extdatavalues_mailinglists",
    "type": "view",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [],
    "constraints": [],
    "triggers": [],
    "rules": [
      {
        "name": "_RETURN",
        "type": "select",
        "instead": true,
        "def": "CREATE RULE \"_RETURN\" AS\n    ON SELECT TO extdatavalues_mailinglists DO INSTEAD  SELECT extdataregular_mailinglists.field,\n    extdataregular_mailinglists.index,\n    extdataregular_mailinglists.value,\n    NULL::numeric AS number\n   FROM extdataregular_mailinglists\nUNION ALL\n SELECT extdatanumeric_mailinglists.field,\n    extdatanumeric_mailinglists.index,\n    COALESCE(extdatanumeric_mailinglists.value, extdatanumeric_mailinglists.number::text) AS value,\n    extdatanumeric_mailinglists.number\n   FROM extdatanumeric_mailinglists\nUNION ALL\n SELECT extdataempty_mailinglists.field,\n    extdataempty_mailinglists.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_mailinglists\nUNION ALL\n SELECT extdatazero_mailinglists.field,\n    extdatazero_mailinglists.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_mailinglists;"
      }
    ],
    "statistics": [],
    "def": "SELECT extdataregular_mailinglists.field,\n    extdataregular_mailinglists.index,\n    extdataregular_mailinglists.value,\n    NULL::numeric AS number\n   FROM extdataregular_mailinglists\nUNION ALL\n SELECT extdatanumeric_mailinglists.field,\n    extdatanumeric_mailinglists.index,\n    COALESCE(extdatanumeric_mailinglists.value, extdatanumeric_mailinglists.number::text) AS value,\n    extdatanumeric_mailinglists.number\n   FROM extdatanumeric_mailinglists\nUNION ALL\n SELECT extdataempty_mailinglists.field,\n    extdataempty_mailinglists.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_mailinglists\nUNION ALL\n SELECT extdatazero_mailinglists.field,\n    extdatazero_mailinglists.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_mailinglists;"
  },
  {
    "name": "extdatavalues_mailservers",
    "type": "view",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [],
    "constraints": [],
    "triggers": [],
    "rules": [
      {
        "name": "_RETURN",
        "type": "select",
        "instead": true,
        "def": "CREATE RULE \"_RETURN\" AS\n    ON SELECT TO extdatavalues_mailservers DO INSTEAD  SELECT extdataregular_mailservers.field,\n    extdataregular_mailservers.index,\n    extdataregular_mailservers.value,\n    NULL::numeric AS number\n   FROM extdataregular_mailservers\nUNION ALL\n SELECT extdatanumeric_mailservers.field,\n    extdatanumeric_mailservers.index,\n    COALESCE(extdatanumeric_mailservers.value, extdatanumeric_mailservers.number::text) AS value,\n    extdatanumeric_mailservers.number\n   FROM extdatanumeric_mailservers\nUNION ALL\n SELECT extdataempty_mailservers.field,\n    extdataempty_mailservers.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_mailservers\nUNION ALL\n SELECT extdatazero_mailservers.field,\n    extdatazero_mailservers.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_mailservers;"
      }
    ],
    "statistics": [],
    "def": "SELECT extdataregular_mailservers.field,\n    extdataregular_mailservers.index,\n    extdataregular_mailservers.value,\n    NULL::numeric AS number\n   FROM extdataregular_mailservers\nUNION ALL\n SELECT extdatanumeric_mailservers.field,\n    extdatanumeric_mailservers.index,\n    COALESCE(extdatanumeric_mailservers.value, extdatanumeric_mailservers.number::text) AS value,\n    extdatanumeric_mailservers.number\n   FROM extdatanumeric_mailservers\nUNION ALL\n SELECT extdataempty_mailservers.field,\n    extdataempty_mailservers.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_mailservers\nUNION ALL\n SELECT extdatazero_mailservers.field,\n    extdatazero_mailservers.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_mailservers;"
  },
  {
    "name": "extdatavalues_messages",
    "type": "view",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [],
    "constraints": [],
    "triggers": [],
    "rules": [
      {
        "name": "_RETURN",
        "type": "select",
        "instead": true,
        "def": "CREATE RULE \"_RETURN\" AS\n    ON SELECT TO extdatavalues_messages DO INSTEAD  SELECT extdataregular_messages.field,\n    extdataregular_messages.index,\n    extdataregular_messages.value,\n    NULL::numeric AS number\n   FROM extdataregular_messages\nUNION ALL\n SELECT extdatanumeric_messages.field,\n    extdatanumeric_messages.index,\n    COALESCE(extdatanumeric_messages.value, extdatanumeric_messages.number::text) AS value,\n    extdatanumeric_messages.number\n   FROM extdatanumeric_messages\nUNION ALL\n SELECT extdataempty_messages.field,\n    extdataempty_messages.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_messages\nUNION ALL\n SELECT extdatazero_messages.field,\n    extdatazero_messages.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_messages;"
      }
    ],
    "statistics": [],
    "def": "SELECT extdataregular_messages.field,\n    extdataregular_messages.index,\n    extdataregular_messages.value,\n    NULL::numeric AS number\n   FROM extdataregular_messages\nUNION ALL\n SELECT extdatanumeric_messages.field,\n    extdatanumeric_messages.index,\n    COALESCE(extdatanumeric_messages.value, extdatanumeric_messages.number::text) AS value,\n    extdatanumeric_messages.number\n   FROM extdatanumeric_messages\nUNION ALL\n SELECT extdataempty_messages.field,\n    extdataempty_messages.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_messages\nUNION ALL\n SELECT extdatazero_messages.field,\n    extdatazero_messages.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_messages;"
  },
  {
    "name": "extdatavalues_notes",
    "type": "view",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [],
    "constraints": [],
    "triggers": [],
    "rules": [
      {
        "name": "_RETURN",
        "type": "select",
        "instead": true,
        "def": "CREATE RULE \"_RETURN\" AS\n    ON SELECT TO extdatavalues_notes DO INSTEAD  SELECT extdataregular_notes.field,\n    extdataregular_notes.index,\n    extdataregular_notes.value,\n    NULL::numeric AS number\n   FROM extdataregular_notes\nUNION ALL\n SELECT extdatanumeric_notes.field,\n    extdatanumeric_notes.index,\n    COALESCE(extdatanumeric_notes.value, extdatanumeric_notes.number::text) AS value,\n    extdatanumeric_notes.number\n   FROM extdatanumeric_notes\nUNION ALL\n SELECT extdataempty_notes.field,\n    extdataempty_notes.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_notes\nUNION ALL\n SELECT extdatazero_notes.field,\n    extdatazero_notes.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_notes;"
      }
    ],
    "statistics": [],
    "def": "SELECT extdataregular_notes.field,\n    extdataregular_notes.index,\n    extdataregular_notes.value,\n    NULL::numeric AS number\n   FROM extdataregular_notes\nUNION ALL\n SELECT extdatanumeric_notes.field,\n    extdatanumeric_notes.index,\n    COALESCE(extdatanumeric_notes.value, extdatanumeric_notes.number::text) AS value,\n    extdatanumeric_notes.number\n   FROM extdatanumeric_notes\nUNION ALL\n SELECT extdataempty_notes.field,\n    extdataempty_notes.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_notes\nUNION ALL\n SELECT extdatazero_notes.field,\n    extdatazero_notes.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_notes;"
  },
  {
    "name": "extdatavalues_objects",
    "type": "view",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [],
    "constraints": [],
    "triggers": [],
    "rules": [
      {
        "name": "_RETURN",
        "type": "select",
        "instead": true,
        "def": "CREATE RULE \"_RETURN\" AS\n    ON SELECT TO extdatavalues_objects DO INSTEAD  SELECT extdataregular_objects.field,\n    extdataregular_objects.index,\n    extdataregular_objects.value,\n    NULL::numeric AS number\n   FROM extdataregular_objects\nUNION ALL\n SELECT extdatanumeric_objects.field,\n    extdatanumeric_objects.index,\n    COALESCE(extdatanumeric_objects.value, extdatanumeric_objects.number::text) AS value,\n    extdatanumeric_objects.number\n   FROM extdatanumeric_objects\nUNION ALL\n SELECT extdataempty_objects.field,\n    extdataempty_objects.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_objects\nUNION ALL\n SELECT extdatazero_objects.field,\n    extdatazero_objects.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_objects;"
      }
    ],
    "statistics": [],
    "def": "SELECT extdataregular_objects.field,\n    extdataregular_objects.index,\n    extdataregular_objects.value,\n    NULL::numeric AS number\n   FROM extdataregular_objects\nUNION ALL\n SELECT extdatanumeric_objects.field,\n    extdatanumeric_objects.index,\n    COALESCE(extdatanumeric_objects.value, extdatanumeric_objects.number::text) AS value,\n    extdatanumeric_objects.number\n   FROM extdatanumeric_objects\nUNION ALL\n SELECT extdataempty_objects.field,\n    extdataempty_objects.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_objects\nUNION ALL\n SELECT extdatazero_objects.field,\n    extdatazero_objects.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_objects;"
  },
  {
    "name": "extdatavalues_opportunities",
    "type": "view",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [],
    "constraints": [],
    "triggers": [],
    "rules": [
      {
        "name": "_RETURN",
        "type": "select",
        "instead": true,
        "def": "CREATE RULE \"_RETURN\" AS\n    ON SELECT TO extdatavalues_opportunities DO INSTEAD  SELECT extdataregular_opportunities.field,\n    extdataregular_opportunities.index,\n    extdataregular_opportunities.value,\n    NULL::numeric AS number\n   FROM extdataregular_opportunities\nUNION ALL\n SELECT extdatanumeric_opportunities.field,\n    extdatanumeric_opportunities.index,\n    COALESCE(extdatanumeric_opportunities.value, extdatanumeric_opportunities.number::text) AS value,\n    extdatanumeric_opportunities.number\n   FROM extdatanumeric_opportunities\nUNION ALL\n SELECT extdataempty_opportunities.field,\n    extdataempty_opportunities.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_opportunities\nUNION ALL\n SELECT extdatazero_opportunities.field,\n    extdatazero_opportunities.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_opportunities;"
      }
    ],
    "statistics": [],
    "def": "SELECT extdataregular_opportunities.field,\n    extdataregular_opportunities.index,\n    extdataregular_opportunities.value,\n    NULL::numeric AS number\n   FROM extdataregular_opportunities\nUNION ALL\n SELECT extdatanumeric_opportunities.field,\n    extdatanumeric_opportunities.index,\n    COALESCE(extdatanumeric_opportunities.value, extdatanumeric_opportunities.number::text) AS value,\n    extdatanumeric_opportunities.number\n   FROM extdatanumeric_opportunities\nUNION ALL\n SELECT extdataempty_opportunities.field,\n    extdataempty_opportunities.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_opportunities\nUNION ALL\n SELECT extdatazero_opportunities.field,\n    extdatazero_opportunities.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_opportunities;"
  },
  {
    "name": "extdatavalues_participants",
    "type": "view",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [],
    "constraints": [],
    "triggers": [],
    "rules": [
      {
        "name": "_RETURN",
        "type": "select",
        "instead": true,
        "def": "CREATE RULE \"_RETURN\" AS\n    ON SELECT TO extdatavalues_participants DO INSTEAD  SELECT extdataregular_participants.field,\n    extdataregular_participants.index,\n    extdataregular_participants.value,\n    NULL::numeric AS number\n   FROM extdataregular_participants\nUNION ALL\n SELECT extdatanumeric_participants.field,\n    extdatanumeric_participants.index,\n    COALESCE(extdatanumeric_participants.value, extdatanumeric_participants.number::text) AS value,\n    extdatanumeric_participants.number\n   FROM extdatanumeric_participants\nUNION ALL\n SELECT extdataempty_participants.field,\n    extdataempty_participants.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_participants\nUNION ALL\n SELECT extdatazero_participants.field,\n    extdatazero_participants.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_participants;"
      }
    ],
    "statistics": [],
    "def": "SELECT extdataregular_participants.field,\n    extdataregular_participants.index,\n    extdataregular_participants.value,\n    NULL::numeric AS number\n   FROM extdataregular_participants\nUNION ALL\n SELECT extdatanumeric_participants.field,\n    extdatanumeric_participants.index,\n    COALESCE(extdatanumeric_participants.value, extdatanumeric_participants.number::text) AS value,\n    extdatanumeric_participants.number\n   FROM extdatanumeric_participants\nUNION ALL\n SELECT extdataempty_participants.field,\n    extdataempty_participants.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_participants\nUNION ALL\n SELECT extdatazero_participants.field,\n    extdatazero_participants.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_participants;"
  },
  {
    "name": "extdatavalues_payments",
    "type": "view",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [],
    "constraints": [],
    "triggers": [],
    "rules": [
      {
        "name": "_RETURN",
        "type": "select",
        "instead": true,
        "def": "CREATE RULE \"_RETURN\" AS\n    ON SELECT TO extdatavalues_payments DO INSTEAD  SELECT extdataregular_payments.field,\n    extdataregular_payments.index,\n    extdataregular_payments.value,\n    NULL::numeric AS number\n   FROM extdataregular_payments\nUNION ALL\n SELECT extdatanumeric_payments.field,\n    extdatanumeric_payments.index,\n    COALESCE(extdatanumeric_payments.value, extdatanumeric_payments.number::text) AS value,\n    extdatanumeric_payments.number\n   FROM extdatanumeric_payments\nUNION ALL\n SELECT extdataempty_payments.field,\n    extdataempty_payments.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_payments\nUNION ALL\n SELECT extdatazero_payments.field,\n    extdatazero_payments.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_payments;"
      }
    ],
    "statistics": [],
    "def": "SELECT extdataregular_payments.field,\n    extdataregular_payments.index,\n    extdataregular_payments.value,\n    NULL::numeric AS number\n   FROM extdataregular_payments\nUNION ALL\n SELECT extdatanumeric_payments.field,\n    extdatanumeric_payments.index,\n    COALESCE(extdatanumeric_payments.value, extdatanumeric_payments.number::text) AS value,\n    extdatanumeric_payments.number\n   FROM extdatanumeric_payments\nUNION ALL\n SELECT extdataempty_payments.field,\n    extdataempty_payments.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_payments\nUNION ALL\n SELECT extdatazero_payments.field,\n    extdatazero_payments.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_payments;"
  },
  {
    "name": "extdatavalues_pricelists",
    "type": "view",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [],
    "constraints": [],
    "triggers": [],
    "rules": [
      {
        "name": "_RETURN",
        "type": "select",
        "instead": true,
        "def": "CREATE RULE \"_RETURN\" AS\n    ON SELECT TO extdatavalues_pricelists DO INSTEAD  SELECT extdataregular_pricelists.field,\n    extdataregular_pricelists.index,\n    extdataregular_pricelists.value,\n    NULL::numeric AS number\n   FROM extdataregular_pricelists\nUNION ALL\n SELECT extdatanumeric_pricelists.field,\n    extdatanumeric_pricelists.index,\n    COALESCE(extdatanumeric_pricelists.value, extdatanumeric_pricelists.number::text) AS value,\n    extdatanumeric_pricelists.number\n   FROM extdatanumeric_pricelists\nUNION ALL\n SELECT extdataempty_pricelists.field,\n    extdataempty_pricelists.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_pricelists\nUNION ALL\n SELECT extdatazero_pricelists.field,\n    extdatazero_pricelists.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_pricelists;"
      }
    ],
    "statistics": [],
    "def": "SELECT extdataregular_pricelists.field,\n    extdataregular_pricelists.index,\n    extdataregular_pricelists.value,\n    NULL::numeric AS number\n   FROM extdataregular_pricelists\nUNION ALL\n SELECT extdatanumeric_pricelists.field,\n    extdatanumeric_pricelists.index,\n    COALESCE(extdatanumeric_pricelists.value, extdatanumeric_pricelists.number::text) AS value,\n    extdatanumeric_pricelists.number\n   FROM extdatanumeric_pricelists\nUNION ALL\n SELECT extdataempty_pricelists.field,\n    extdataempty_pricelists.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_pricelists\nUNION ALL\n SELECT extdatazero_pricelists.field,\n    extdatazero_pricelists.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_pricelists;"
  },
  {
    "name": "extdatavalues_projects",
    "type": "view",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [],
    "constraints": [],
    "triggers": [],
    "rules": [
      {
        "name": "_RETURN",
        "type": "select",
        "instead": true,
        "def": "CREATE RULE \"_RETURN\" AS\n    ON SELECT TO extdatavalues_projects DO INSTEAD  SELECT extdataregular_projects.field,\n    extdataregular_projects.index,\n    extdataregular_projects.value,\n    NULL::numeric AS number\n   FROM extdataregular_projects\nUNION ALL\n SELECT extdatanumeric_projects.field,\n    extdatanumeric_projects.index,\n    COALESCE(extdatanumeric_projects.value, extdatanumeric_projects.number::text) AS value,\n    extdatanumeric_projects.number\n   FROM extdatanumeric_projects\nUNION ALL\n SELECT extdataempty_projects.field,\n    extdataempty_projects.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_projects\nUNION ALL\n SELECT extdatazero_projects.field,\n    extdatazero_projects.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_projects;"
      }
    ],
    "statistics": [],
    "def": "SELECT extdataregular_projects.field,\n    extdataregular_projects.index,\n    extdataregular_projects.value,\n    NULL::numeric AS number\n   FROM extdataregular_projects\nUNION ALL\n SELECT extdatanumeric_projects.field,\n    extdatanumeric_projects.index,\n    COALESCE(extdatanumeric_projects.value, extdatanumeric_projects.number::text) AS value,\n    extdatanumeric_projects.number\n   FROM extdatanumeric_projects\nUNION ALL\n SELECT extdataempty_projects.field,\n    extdataempty_projects.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_projects\nUNION ALL\n SELECT extdatazero_projects.field,\n    extdatazero_projects.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_projects;"
  },
  {
    "name": "extdatavalues_resources",
    "type": "view",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [],
    "constraints": [],
    "triggers": [],
    "rules": [
      {
        "name": "_RETURN",
        "type": "select",
        "instead": true,
        "def": "CREATE RULE \"_RETURN\" AS\n    ON SELECT TO extdatavalues_resources DO INSTEAD  SELECT extdataregular_resources.field,\n    extdataregular_resources.index,\n    extdataregular_resources.value,\n    NULL::numeric AS number\n   FROM extdataregular_resources\nUNION ALL\n SELECT extdatanumeric_resources.field,\n    extdatanumeric_resources.index,\n    COALESCE(extdatanumeric_resources.value, extdatanumeric_resources.number::text) AS value,\n    extdatanumeric_resources.number\n   FROM extdatanumeric_resources\nUNION ALL\n SELECT extdataempty_resources.field,\n    extdataempty_resources.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_resources\nUNION ALL\n SELECT extdatazero_resources.field,\n    extdatazero_resources.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_resources;"
      }
    ],
    "statistics": [],
    "def": "SELECT extdataregular_resources.field,\n    extdataregular_resources.index,\n    extdataregular_resources.value,\n    NULL::numeric AS number\n   FROM extdataregular_resources\nUNION ALL\n SELECT extdatanumeric_resources.field,\n    extdatanumeric_resources.index,\n    COALESCE(extdatanumeric_resources.value, extdatanumeric_resources.number::text) AS value,\n    extdatanumeric_resources.number\n   FROM extdatanumeric_resources\nUNION ALL\n SELECT extdataempty_resources.field,\n    extdataempty_resources.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_resources\nUNION ALL\n SELECT extdatazero_resources.field,\n    extdatazero_resources.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_resources;"
  },
  {
    "name": "extdatavalues_services",
    "type": "view",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [],
    "constraints": [],
    "triggers": [],
    "rules": [
      {
        "name": "_RETURN",
        "type": "select",
        "instead": true,
        "def": "CREATE RULE \"_RETURN\" AS\n    ON SELECT TO extdatavalues_services DO INSTEAD  SELECT extdataregular_services.field,\n    extdataregular_services.index,\n    extdataregular_services.value,\n    NULL::numeric AS number\n   FROM extdataregular_services\nUNION ALL\n SELECT extdatanumeric_services.field,\n    extdatanumeric_services.index,\n    COALESCE(extdatanumeric_services.value, extdatanumeric_services.number::text) AS value,\n    extdatanumeric_services.number\n   FROM extdatanumeric_services\nUNION ALL\n SELECT extdataempty_services.field,\n    extdataempty_services.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_services\nUNION ALL\n SELECT extdatazero_services.field,\n    extdatazero_services.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_services;"
      }
    ],
    "statistics": [],
    "def": "SELECT extdataregular_services.field,\n    extdataregular_services.index,\n    extdataregular_services.value,\n    NULL::numeric AS number\n   FROM extdataregular_services\nUNION ALL\n SELECT extdatanumeric_services.field,\n    extdatanumeric_services.index,\n    COALESCE(extdatanumeric_services.value, extdatanumeric_services.number::text) AS value,\n    extdatanumeric_services.number\n   FROM extdatanumeric_services\nUNION ALL\n SELECT extdataempty_services.field,\n    extdataempty_services.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_services\nUNION ALL\n SELECT extdatazero_services.field,\n    extdatazero_services.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_services;"
  },
  {
    "name": "extdatavalues_stocktransactions",
    "type": "view",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [],
    "constraints": [],
    "triggers": [],
    "rules": [
      {
        "name": "_RETURN",
        "type": "select",
        "instead": true,
        "def": "CREATE RULE \"_RETURN\" AS\n    ON SELECT TO extdatavalues_stocktransactions DO INSTEAD  SELECT extdataregular_stocktransactions.field,\n    extdataregular_stocktransactions.index,\n    extdataregular_stocktransactions.value,\n    NULL::numeric AS number\n   FROM extdataregular_stocktransactions\nUNION ALL\n SELECT extdatanumeric_stocktransactions.field,\n    extdatanumeric_stocktransactions.index,\n    COALESCE(extdatanumeric_stocktransactions.value, extdatanumeric_stocktransactions.number::text) AS value,\n    extdatanumeric_stocktransactions.number\n   FROM extdatanumeric_stocktransactions\nUNION ALL\n SELECT extdataempty_stocktransactions.field,\n    extdataempty_stocktransactions.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_stocktransactions\nUNION ALL\n SELECT extdatazero_stocktransactions.field,\n    extdatazero_stocktransactions.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_stocktransactions;"
      }
    ],
    "statistics": [],
    "def": "SELECT extdataregular_stocktransactions.field,\n    extdataregular_stocktransactions.index,\n    extdataregular_stocktransactions.value,\n    NULL::numeric AS number\n   FROM extdataregular_stocktransactions\nUNION ALL\n SELECT extdatanumeric_stocktransactions.field,\n    extdatanumeric_stocktransactions.index,\n    COALESCE(extdatanumeric_stocktransactions.value, extdatanumeric_stocktransactions.number::text) AS value,\n    extdatanumeric_stocktransactions.number\n   FROM extdatanumeric_stocktransactions\nUNION ALL\n SELECT extdataempty_stocktransactions.field,\n    extdataempty_stocktransactions.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_stocktransactions\nUNION ALL\n SELECT extdatazero_stocktransactions.field,\n    extdatazero_stocktransactions.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_stocktransactions;"
  },
  {
    "name": "extdatavalues_storages",
    "type": "view",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [],
    "constraints": [],
    "triggers": [],
    "rules": [
      {
        "name": "_RETURN",
        "type": "select",
        "instead": true,
        "def": "CREATE RULE \"_RETURN\" AS\n    ON SELECT TO extdatavalues_storages DO INSTEAD  SELECT extdataregular_storages.field,\n    extdataregular_storages.index,\n    extdataregular_storages.value,\n    NULL::numeric AS number\n   FROM extdataregular_storages\nUNION ALL\n SELECT extdatanumeric_storages.field,\n    extdatanumeric_storages.index,\n    COALESCE(extdatanumeric_storages.value, extdatanumeric_storages.number::text) AS value,\n    extdatanumeric_storages.number\n   FROM extdatanumeric_storages\nUNION ALL\n SELECT extdataempty_storages.field,\n    extdataempty_storages.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_storages\nUNION ALL\n SELECT extdatazero_storages.field,\n    extdatazero_storages.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_storages;"
      }
    ],
    "statistics": [],
    "def": "SELECT extdataregular_storages.field,\n    extdataregular_storages.index,\n    extdataregular_storages.value,\n    NULL::numeric AS number\n   FROM extdataregular_storages\nUNION ALL\n SELECT extdatanumeric_storages.field,\n    extdatanumeric_storages.index,\n    COALESCE(extdatanumeric_storages.value, extdatanumeric_storages.number::text) AS value,\n    extdatanumeric_storages.number\n   FROM extdatanumeric_storages\nUNION ALL\n SELECT extdataempty_storages.field,\n    extdataempty_storages.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_storages\nUNION ALL\n SELECT extdatazero_storages.field,\n    extdatazero_storages.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_storages;"
  },
  {
    "name": "extdatavalues_tasks",
    "type": "view",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [],
    "constraints": [],
    "triggers": [],
    "rules": [
      {
        "name": "_RETURN",
        "type": "select",
        "instead": true,
        "def": "CREATE RULE \"_RETURN\" AS\n    ON SELECT TO extdatavalues_tasks DO INSTEAD  SELECT extdataregular_tasks.field,\n    extdataregular_tasks.index,\n    extdataregular_tasks.value,\n    NULL::numeric AS number\n   FROM extdataregular_tasks\nUNION ALL\n SELECT extdatanumeric_tasks.field,\n    extdatanumeric_tasks.index,\n    COALESCE(extdatanumeric_tasks.value, extdatanumeric_tasks.number::text) AS value,\n    extdatanumeric_tasks.number\n   FROM extdatanumeric_tasks\nUNION ALL\n SELECT extdataempty_tasks.field,\n    extdataempty_tasks.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_tasks\nUNION ALL\n SELECT extdatazero_tasks.field,\n    extdatazero_tasks.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_tasks;"
      }
    ],
    "statistics": [],
    "def": "SELECT extdataregular_tasks.field,\n    extdataregular_tasks.index,\n    extdataregular_tasks.value,\n    NULL::numeric AS number\n   FROM extdataregular_tasks\nUNION ALL\n SELECT extdatanumeric_tasks.field,\n    extdatanumeric_tasks.index,\n    COALESCE(extdatanumeric_tasks.value, extdatanumeric_tasks.number::text) AS value,\n    extdatanumeric_tasks.number\n   FROM extdatanumeric_tasks\nUNION ALL\n SELECT extdataempty_tasks.field,\n    extdataempty_tasks.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_tasks\nUNION ALL\n SELECT extdatazero_tasks.field,\n    extdatazero_tasks.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_tasks;"
  },
  {
    "name": "extdatavalues_tickets",
    "type": "view",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [],
    "constraints": [],
    "triggers": [],
    "rules": [
      {
        "name": "_RETURN",
        "type": "select",
        "instead": true,
        "def": "CREATE RULE \"_RETURN\" AS\n    ON SELECT TO extdatavalues_tickets DO INSTEAD  SELECT extdataregular_tickets.field,\n    extdataregular_tickets.index,\n    extdataregular_tickets.value,\n    NULL::numeric AS number\n   FROM extdataregular_tickets\nUNION ALL\n SELECT extdatanumeric_tickets.field,\n    extdatanumeric_tickets.index,\n    COALESCE(extdatanumeric_tickets.value, extdatanumeric_tickets.number::text) AS value,\n    extdatanumeric_tickets.number\n   FROM extdatanumeric_tickets\nUNION ALL\n SELECT extdataempty_tickets.field,\n    extdataempty_tickets.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_tickets\nUNION ALL\n SELECT extdatazero_tickets.field,\n    extdatazero_tickets.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_tickets;"
      }
    ],
    "statistics": [],
    "def": "SELECT extdataregular_tickets.field,\n    extdataregular_tickets.index,\n    extdataregular_tickets.value,\n    NULL::numeric AS number\n   FROM extdataregular_tickets\nUNION ALL\n SELECT extdatanumeric_tickets.field,\n    extdatanumeric_tickets.index,\n    COALESCE(extdatanumeric_tickets.value, extdatanumeric_tickets.number::text) AS value,\n    extdatanumeric_tickets.number\n   FROM extdatanumeric_tickets\nUNION ALL\n SELECT extdataempty_tickets.field,\n    extdataempty_tickets.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_tickets\nUNION ALL\n SELECT extdatazero_tickets.field,\n    extdatazero_tickets.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_tickets;"
  },
  {
    "name": "extdatavalues_transactions",
    "type": "view",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [],
    "constraints": [],
    "triggers": [],
    "rules": [
      {
        "name": "_RETURN",
        "type": "select",
        "instead": true,
        "def": "CREATE RULE \"_RETURN\" AS\n    ON SELECT TO extdatavalues_transactions DO INSTEAD  SELECT extdataregular_transactions.field,\n    extdataregular_transactions.index,\n    extdataregular_transactions.value,\n    NULL::numeric AS number\n   FROM extdataregular_transactions\nUNION ALL\n SELECT extdatanumeric_transactions.field,\n    extdatanumeric_transactions.index,\n    COALESCE(extdatanumeric_transactions.value, extdatanumeric_transactions.number::text) AS value,\n    extdatanumeric_transactions.number\n   FROM extdatanumeric_transactions\nUNION ALL\n SELECT extdataempty_transactions.field,\n    extdataempty_transactions.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_transactions\nUNION ALL\n SELECT extdatazero_transactions.field,\n    extdatazero_transactions.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_transactions;"
      }
    ],
    "statistics": [],
    "def": "SELECT extdataregular_transactions.field,\n    extdataregular_transactions.index,\n    extdataregular_transactions.value,\n    NULL::numeric AS number\n   FROM extdataregular_transactions\nUNION ALL\n SELECT extdatanumeric_transactions.field,\n    extdatanumeric_transactions.index,\n    COALESCE(extdatanumeric_transactions.value, extdatanumeric_transactions.number::text) AS value,\n    extdatanumeric_transactions.number\n   FROM extdatanumeric_transactions\nUNION ALL\n SELECT extdataempty_transactions.field,\n    extdataempty_transactions.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_transactions\nUNION ALL\n SELECT extdatazero_transactions.field,\n    extdatazero_transactions.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_transactions;"
  },
  {
    "name": "extdatavalues_users",
    "type": "view",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [],
    "constraints": [],
    "triggers": [],
    "rules": [
      {
        "name": "_RETURN",
        "type": "select",
        "instead": true,
        "def": "CREATE RULE \"_RETURN\" AS\n    ON SELECT TO extdatavalues_users DO INSTEAD  SELECT extdataregular_users.field,\n    extdataregular_users.index,\n    extdataregular_users.value,\n    NULL::numeric AS number\n   FROM extdataregular_users\nUNION ALL\n SELECT extdatanumeric_users.field,\n    extdatanumeric_users.index,\n    COALESCE(extdatanumeric_users.value, extdatanumeric_users.number::text) AS value,\n    extdatanumeric_users.number\n   FROM extdatanumeric_users\nUNION ALL\n SELECT extdataempty_users.field,\n    extdataempty_users.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_users\nUNION ALL\n SELECT extdatazero_users.field,\n    extdatazero_users.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_users;"
      }
    ],
    "statistics": [],
    "def": "SELECT extdataregular_users.field,\n    extdataregular_users.index,\n    extdataregular_users.value,\n    NULL::numeric AS number\n   FROM extdataregular_users\nUNION ALL\n SELECT extdatanumeric_users.field,\n    extdatanumeric_users.index,\n    COALESCE(extdatanumeric_users.value, extdatanumeric_users.number::text) AS value,\n    extdatanumeric_users.number\n   FROM extdatanumeric_users\nUNION ALL\n SELECT extdataempty_users.field,\n    extdataempty_users.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_users\nUNION ALL\n SELECT extdatazero_users.field,\n    extdatazero_users.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_users;"
  },
  {
    "name": "extdatavalues_weblets",
    "type": "view",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "value",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "number",
        "type": "numeric",
        "storage": "main",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [],
    "constraints": [],
    "triggers": [],
    "rules": [
      {
        "name": "_RETURN",
        "type": "select",
        "instead": true,
        "def": "CREATE RULE \"_RETURN\" AS\n    ON SELECT TO extdatavalues_weblets DO INSTEAD  SELECT extdataregular_weblets.field,\n    extdataregular_weblets.index,\n    extdataregular_weblets.value,\n    NULL::numeric AS number\n   FROM extdataregular_weblets\nUNION ALL\n SELECT extdatanumeric_weblets.field,\n    extdatanumeric_weblets.index,\n    COALESCE(extdatanumeric_weblets.value, extdatanumeric_weblets.number::text) AS value,\n    extdatanumeric_weblets.number\n   FROM extdatanumeric_weblets\nUNION ALL\n SELECT extdataempty_weblets.field,\n    extdataempty_weblets.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_weblets\nUNION ALL\n SELECT extdatazero_weblets.field,\n    extdatazero_weblets.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_weblets;"
      }
    ],
    "statistics": [],
    "def": "SELECT extdataregular_weblets.field,\n    extdataregular_weblets.index,\n    extdataregular_weblets.value,\n    NULL::numeric AS number\n   FROM extdataregular_weblets\nUNION ALL\n SELECT extdatanumeric_weblets.field,\n    extdatanumeric_weblets.index,\n    COALESCE(extdatanumeric_weblets.value, extdatanumeric_weblets.number::text) AS value,\n    extdatanumeric_weblets.number\n   FROM extdatanumeric_weblets\nUNION ALL\n SELECT extdataempty_weblets.field,\n    extdataempty_weblets.index,\n    ''::text AS value,\n    NULL::numeric AS number\n   FROM extdataempty_weblets\nUNION ALL\n SELECT extdatazero_weblets.field,\n    extdatazero_weblets.index,\n    '0'::text AS value,\n    0::numeric AS number\n   FROM extdatazero_weblets;"
  },
  {
    "name": "extdatazero_accounts",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatazero_accounts_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatazero_accounts_index ON extdatazero_accounts USING btree (index)"
      },
      {
        "name": "pk_extdatazero_accounts",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatazero_accounts ON extdatazero_accounts USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdatazero_accounts",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdatazero_accounts",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_accounts",
        "def": "CREATE TRIGGER ti_extdatazero_accounts BEFORE INSERT ON extdatazero_accounts FOR EACH ROW EXECUTE FUNCTION ftiu_extdatazero_accounts()"
      },
      {
        "name": "tu_extdatazero_accounts",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_accounts",
        "def": "CREATE TRIGGER tu_extdatazero_accounts BEFORE UPDATE OF field, index ON extdatazero_accounts FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatazero_accounts()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdatazero_actionsteps",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatazero_actionsteps_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatazero_actionsteps_index ON extdatazero_actionsteps USING btree (index)"
      },
      {
        "name": "pk_extdatazero_actionsteps",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatazero_actionsteps ON extdatazero_actionsteps USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdatazero_actionsteps",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdatazero_actionsteps",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_actionsteps",
        "def": "CREATE TRIGGER ti_extdatazero_actionsteps BEFORE INSERT ON extdatazero_actionsteps FOR EACH ROW EXECUTE FUNCTION ftiu_extdatazero_actionsteps()"
      },
      {
        "name": "tu_extdatazero_actionsteps",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_actionsteps",
        "def": "CREATE TRIGGER tu_extdatazero_actionsteps BEFORE UPDATE OF field, index ON extdatazero_actionsteps FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatazero_actionsteps()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdatazero_applications",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatazero_applications_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatazero_applications_index ON extdatazero_applications USING btree (index)"
      },
      {
        "name": "pk_extdatazero_applications",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatazero_applications ON extdatazero_applications USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdatazero_applications",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdatazero_applications",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_applications",
        "def": "CREATE TRIGGER ti_extdatazero_applications BEFORE INSERT ON extdatazero_applications FOR EACH ROW EXECUTE FUNCTION ftiu_extdatazero_applications()"
      },
      {
        "name": "tu_extdatazero_applications",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_applications",
        "def": "CREATE TRIGGER tu_extdatazero_applications BEFORE UPDATE OF field, index ON extdatazero_applications FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatazero_applications()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdatazero_appointments",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatazero_appointments_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatazero_appointments_index ON extdatazero_appointments USING btree (index)"
      },
      {
        "name": "pk_extdatazero_appointments",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatazero_appointments ON extdatazero_appointments USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdatazero_appointments",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdatazero_appointments",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_appointments",
        "def": "CREATE TRIGGER ti_extdatazero_appointments BEFORE INSERT ON extdatazero_appointments FOR EACH ROW EXECUTE FUNCTION ftiu_extdatazero_appointments()"
      },
      {
        "name": "tu_extdatazero_appointments",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_appointments",
        "def": "CREATE TRIGGER tu_extdatazero_appointments BEFORE UPDATE OF field, index ON extdatazero_appointments FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatazero_appointments()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdatazero_campaigns",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatazero_campaigns_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatazero_campaigns_index ON extdatazero_campaigns USING btree (index)"
      },
      {
        "name": "pk_extdatazero_campaigns",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatazero_campaigns ON extdatazero_campaigns USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdatazero_campaigns",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdatazero_campaigns",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_campaigns",
        "def": "CREATE TRIGGER ti_extdatazero_campaigns BEFORE INSERT ON extdatazero_campaigns FOR EACH ROW EXECUTE FUNCTION ftiu_extdatazero_campaigns()"
      },
      {
        "name": "tu_extdatazero_campaigns",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_campaigns",
        "def": "CREATE TRIGGER tu_extdatazero_campaigns BEFORE UPDATE OF field, index ON extdatazero_campaigns FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatazero_campaigns()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdatazero_channels",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatazero_channels_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatazero_channels_index ON extdatazero_channels USING btree (index)"
      },
      {
        "name": "pk_extdatazero_channels",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatazero_channels ON extdatazero_channels USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdatazero_channels",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdatazero_channels",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_channels",
        "def": "CREATE TRIGGER ti_extdatazero_channels BEFORE INSERT ON extdatazero_channels FOR EACH ROW EXECUTE FUNCTION ftiu_extdatazero_channels()"
      },
      {
        "name": "tu_extdatazero_channels",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_channels",
        "def": "CREATE TRIGGER tu_extdatazero_channels BEFORE UPDATE OF field, index ON extdatazero_channels FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatazero_channels()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdatazero_contacts",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatazero_contacts_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatazero_contacts_index ON extdatazero_contacts USING btree (index)"
      },
      {
        "name": "pk_extdatazero_contacts",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatazero_contacts ON extdatazero_contacts USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdatazero_contacts",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdatazero_contacts",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_contacts",
        "def": "CREATE TRIGGER ti_extdatazero_contacts BEFORE INSERT ON extdatazero_contacts FOR EACH ROW EXECUTE FUNCTION ftiu_extdatazero_contacts()"
      },
      {
        "name": "tu_extdatazero_contacts",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_contacts",
        "def": "CREATE TRIGGER tu_extdatazero_contacts BEFORE UPDATE OF field, index ON extdatazero_contacts FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatazero_contacts()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdatazero_contracts",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatazero_contracts_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatazero_contracts_index ON extdatazero_contracts USING btree (index)"
      },
      {
        "name": "pk_extdatazero_contracts",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatazero_contracts ON extdatazero_contracts USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdatazero_contracts",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdatazero_contracts",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_contracts",
        "def": "CREATE TRIGGER ti_extdatazero_contracts BEFORE INSERT ON extdatazero_contracts FOR EACH ROW EXECUTE FUNCTION ftiu_extdatazero_contracts()"
      },
      {
        "name": "tu_extdatazero_contracts",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_contracts",
        "def": "CREATE TRIGGER tu_extdatazero_contracts BEFORE UPDATE OF field, index ON extdatazero_contracts FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatazero_contracts()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdatazero_couponcodes",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatazero_couponcodes_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatazero_couponcodes_index ON extdatazero_couponcodes USING btree (index)"
      },
      {
        "name": "pk_extdatazero_couponcodes",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatazero_couponcodes ON extdatazero_couponcodes USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdatazero_couponcodes",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdatazero_couponcodes",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_couponcodes",
        "def": "CREATE TRIGGER ti_extdatazero_couponcodes BEFORE INSERT ON extdatazero_couponcodes FOR EACH ROW EXECUTE FUNCTION ftiu_extdatazero_couponcodes()"
      },
      {
        "name": "tu_extdatazero_couponcodes",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_couponcodes",
        "def": "CREATE TRIGGER tu_extdatazero_couponcodes BEFORE UPDATE OF field, index ON extdatazero_couponcodes FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatazero_couponcodes()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdatazero_coupons",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatazero_coupons_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatazero_coupons_index ON extdatazero_coupons USING btree (index)"
      },
      {
        "name": "pk_extdatazero_coupons",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatazero_coupons ON extdatazero_coupons USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdatazero_coupons",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdatazero_coupons",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_coupons",
        "def": "CREATE TRIGGER ti_extdatazero_coupons BEFORE INSERT ON extdatazero_coupons FOR EACH ROW EXECUTE FUNCTION ftiu_extdatazero_coupons()"
      },
      {
        "name": "tu_extdatazero_coupons",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_coupons",
        "def": "CREATE TRIGGER tu_extdatazero_coupons BEFORE UPDATE OF field, index ON extdatazero_coupons FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatazero_coupons()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdatazero_customfields",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatazero_customfields_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatazero_customfields_index ON extdatazero_customfields USING btree (index)"
      },
      {
        "name": "pk_extdatazero_customfields",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatazero_customfields ON extdatazero_customfields USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdatazero_customfields",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdatazero_customfields",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_customfields",
        "def": "CREATE TRIGGER ti_extdatazero_customfields BEFORE INSERT ON extdatazero_customfields FOR EACH ROW EXECUTE FUNCTION ftiu_extdatazero_customfields()"
      },
      {
        "name": "tu_extdatazero_customfields",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_customfields",
        "def": "CREATE TRIGGER tu_extdatazero_customfields BEFORE UPDATE OF field, index ON extdatazero_customfields FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatazero_customfields()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdatazero_davservers",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatazero_davservers_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatazero_davservers_index ON extdatazero_davservers USING btree (index)"
      },
      {
        "name": "pk_extdatazero_davservers",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatazero_davservers ON extdatazero_davservers USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdatazero_davservers",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdatazero_davservers",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_davservers",
        "def": "CREATE TRIGGER ti_extdatazero_davservers BEFORE INSERT ON extdatazero_davservers FOR EACH ROW EXECUTE FUNCTION ftiu_extdatazero_davservers()"
      },
      {
        "name": "tu_extdatazero_davservers",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_davservers",
        "def": "CREATE TRIGGER tu_extdatazero_davservers BEFORE UPDATE OF field, index ON extdatazero_davservers FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatazero_davservers()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdatazero_devices",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatazero_devices_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatazero_devices_index ON extdatazero_devices USING btree (index)"
      },
      {
        "name": "pk_extdatazero_devices",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatazero_devices ON extdatazero_devices USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdatazero_devices",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdatazero_devices",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_devices",
        "def": "CREATE TRIGGER ti_extdatazero_devices BEFORE INSERT ON extdatazero_devices FOR EACH ROW EXECUTE FUNCTION ftiu_extdatazero_devices()"
      },
      {
        "name": "tu_extdatazero_devices",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_devices",
        "def": "CREATE TRIGGER tu_extdatazero_devices BEFORE UPDATE OF field, index ON extdatazero_devices FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatazero_devices()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdatazero_documents",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatazero_documents_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatazero_documents_index ON extdatazero_documents USING btree (index)"
      },
      {
        "name": "pk_extdatazero_documents",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatazero_documents ON extdatazero_documents USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdatazero_documents",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdatazero_documents",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_documents",
        "def": "CREATE TRIGGER ti_extdatazero_documents BEFORE INSERT ON extdatazero_documents FOR EACH ROW EXECUTE FUNCTION ftiu_extdatazero_documents()"
      },
      {
        "name": "tu_extdatazero_documents",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_documents",
        "def": "CREATE TRIGGER tu_extdatazero_documents BEFORE UPDATE OF field, index ON extdatazero_documents FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatazero_documents()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdatazero_dunning",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatazero_dunning_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatazero_dunning_index ON extdatazero_dunning USING btree (index)"
      },
      {
        "name": "pk_extdatazero_dunning",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatazero_dunning ON extdatazero_dunning USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdatazero_dunning",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdatazero_dunning",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_dunning",
        "def": "CREATE TRIGGER ti_extdatazero_dunning BEFORE INSERT ON extdatazero_dunning FOR EACH ROW EXECUTE FUNCTION ftiu_extdatazero_dunning()"
      },
      {
        "name": "tu_extdatazero_dunning",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_dunning",
        "def": "CREATE TRIGGER tu_extdatazero_dunning BEFORE UPDATE OF field, index ON extdatazero_dunning FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatazero_dunning()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdatazero_feedservers",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatazero_feedservers_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatazero_feedservers_index ON extdatazero_feedservers USING btree (index)"
      },
      {
        "name": "pk_extdatazero_feedservers",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatazero_feedservers ON extdatazero_feedservers USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdatazero_feedservers",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdatazero_feedservers",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_feedservers",
        "def": "CREATE TRIGGER ti_extdatazero_feedservers BEFORE INSERT ON extdatazero_feedservers FOR EACH ROW EXECUTE FUNCTION ftiu_extdatazero_feedservers()"
      },
      {
        "name": "tu_extdatazero_feedservers",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_feedservers",
        "def": "CREATE TRIGGER tu_extdatazero_feedservers BEFORE UPDATE OF field, index ON extdatazero_feedservers FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatazero_feedservers()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdatazero_forks",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatazero_forks_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatazero_forks_index ON extdatazero_forks USING btree (index)"
      },
      {
        "name": "pk_extdatazero_forks",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatazero_forks ON extdatazero_forks USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdatazero_forks",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdatazero_forks",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_forks",
        "def": "CREATE TRIGGER ti_extdatazero_forks BEFORE INSERT ON extdatazero_forks FOR EACH ROW EXECUTE FUNCTION ftiu_extdatazero_forks()"
      },
      {
        "name": "tu_extdatazero_forks",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_forks",
        "def": "CREATE TRIGGER tu_extdatazero_forks BEFORE UPDATE OF field, index ON extdatazero_forks FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatazero_forks()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdatazero_groups",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatazero_groups_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatazero_groups_index ON extdatazero_groups USING btree (index)"
      },
      {
        "name": "pk_extdatazero_groups",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatazero_groups ON extdatazero_groups USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdatazero_groups",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdatazero_groups",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_groups",
        "def": "CREATE TRIGGER ti_extdatazero_groups BEFORE INSERT ON extdatazero_groups FOR EACH ROW EXECUTE FUNCTION ftiu_extdatazero_groups()"
      },
      {
        "name": "tu_extdatazero_groups",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_groups",
        "def": "CREATE TRIGGER tu_extdatazero_groups BEFORE UPDATE OF field, index ON extdatazero_groups FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatazero_groups()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdatazero_items",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatazero_items_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatazero_items_index ON extdatazero_items USING btree (index)"
      },
      {
        "name": "pk_extdatazero_items",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatazero_items ON extdatazero_items USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdatazero_items",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdatazero_items",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_items",
        "def": "CREATE TRIGGER ti_extdatazero_items BEFORE INSERT ON extdatazero_items FOR EACH ROW EXECUTE FUNCTION ftiu_extdatazero_items()"
      },
      {
        "name": "tu_extdatazero_items",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_items",
        "def": "CREATE TRIGGER tu_extdatazero_items BEFORE UPDATE OF field, index ON extdatazero_items FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatazero_items()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdatazero_ledgers",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatazero_ledgers_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatazero_ledgers_index ON extdatazero_ledgers USING btree (index)"
      },
      {
        "name": "pk_extdatazero_ledgers",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatazero_ledgers ON extdatazero_ledgers USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdatazero_ledgers",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdatazero_ledgers",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_ledgers",
        "def": "CREATE TRIGGER ti_extdatazero_ledgers BEFORE INSERT ON extdatazero_ledgers FOR EACH ROW EXECUTE FUNCTION ftiu_extdatazero_ledgers()"
      },
      {
        "name": "tu_extdatazero_ledgers",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_ledgers",
        "def": "CREATE TRIGGER tu_extdatazero_ledgers BEFORE UPDATE OF field, index ON extdatazero_ledgers FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatazero_ledgers()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdatazero_links",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatazero_links_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatazero_links_index ON extdatazero_links USING btree (index)"
      },
      {
        "name": "pk_extdatazero_links",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatazero_links ON extdatazero_links USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdatazero_links",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdatazero_links",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_links",
        "def": "CREATE TRIGGER ti_extdatazero_links BEFORE INSERT ON extdatazero_links FOR EACH ROW EXECUTE FUNCTION ftiu_extdatazero_links()"
      },
      {
        "name": "tu_extdatazero_links",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_links",
        "def": "CREATE TRIGGER tu_extdatazero_links BEFORE UPDATE OF field, index ON extdatazero_links FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatazero_links()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdatazero_mailinglists",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatazero_mailinglists_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatazero_mailinglists_index ON extdatazero_mailinglists USING btree (index)"
      },
      {
        "name": "pk_extdatazero_mailinglists",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatazero_mailinglists ON extdatazero_mailinglists USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdatazero_mailinglists",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdatazero_mailinglists",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_mailinglists",
        "def": "CREATE TRIGGER ti_extdatazero_mailinglists BEFORE INSERT ON extdatazero_mailinglists FOR EACH ROW EXECUTE FUNCTION ftiu_extdatazero_mailinglists()"
      },
      {
        "name": "tu_extdatazero_mailinglists",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_mailinglists",
        "def": "CREATE TRIGGER tu_extdatazero_mailinglists BEFORE UPDATE OF field, index ON extdatazero_mailinglists FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatazero_mailinglists()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdatazero_mailservers",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatazero_mailservers_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatazero_mailservers_index ON extdatazero_mailservers USING btree (index)"
      },
      {
        "name": "pk_extdatazero_mailservers",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatazero_mailservers ON extdatazero_mailservers USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdatazero_mailservers",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdatazero_mailservers",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_mailservers",
        "def": "CREATE TRIGGER ti_extdatazero_mailservers BEFORE INSERT ON extdatazero_mailservers FOR EACH ROW EXECUTE FUNCTION ftiu_extdatazero_mailservers()"
      },
      {
        "name": "tu_extdatazero_mailservers",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_mailservers",
        "def": "CREATE TRIGGER tu_extdatazero_mailservers BEFORE UPDATE OF field, index ON extdatazero_mailservers FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatazero_mailservers()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdatazero_messages",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatazero_messages_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatazero_messages_index ON extdatazero_messages USING btree (index)"
      },
      {
        "name": "pk_extdatazero_messages",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatazero_messages ON extdatazero_messages USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdatazero_messages",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdatazero_messages",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_messages",
        "def": "CREATE TRIGGER ti_extdatazero_messages BEFORE INSERT ON extdatazero_messages FOR EACH ROW EXECUTE FUNCTION ftiu_extdatazero_messages()"
      },
      {
        "name": "tu_extdatazero_messages",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_messages",
        "def": "CREATE TRIGGER tu_extdatazero_messages BEFORE UPDATE OF field, index ON extdatazero_messages FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatazero_messages()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdatazero_notes",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatazero_notes_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatazero_notes_index ON extdatazero_notes USING btree (index)"
      },
      {
        "name": "pk_extdatazero_notes",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatazero_notes ON extdatazero_notes USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdatazero_notes",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdatazero_notes",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_notes",
        "def": "CREATE TRIGGER ti_extdatazero_notes BEFORE INSERT ON extdatazero_notes FOR EACH ROW EXECUTE FUNCTION ftiu_extdatazero_notes()"
      },
      {
        "name": "tu_extdatazero_notes",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_notes",
        "def": "CREATE TRIGGER tu_extdatazero_notes BEFORE UPDATE OF field, index ON extdatazero_notes FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatazero_notes()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdatazero_objects",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatazero_objects_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatazero_objects_index ON extdatazero_objects USING btree (index)"
      },
      {
        "name": "pk_extdatazero_objects",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatazero_objects ON extdatazero_objects USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdatazero_objects",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdatazero_objects",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_objects",
        "def": "CREATE TRIGGER ti_extdatazero_objects BEFORE INSERT ON extdatazero_objects FOR EACH ROW EXECUTE FUNCTION ftiu_extdatazero_objects()"
      },
      {
        "name": "tu_extdatazero_objects",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_objects",
        "def": "CREATE TRIGGER tu_extdatazero_objects BEFORE UPDATE OF field, index ON extdatazero_objects FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatazero_objects()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdatazero_opportunities",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatazero_opportunities_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatazero_opportunities_index ON extdatazero_opportunities USING btree (index)"
      },
      {
        "name": "pk_extdatazero_opportunities",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatazero_opportunities ON extdatazero_opportunities USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdatazero_opportunities",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdatazero_opportunities",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_opportunities",
        "def": "CREATE TRIGGER ti_extdatazero_opportunities BEFORE INSERT ON extdatazero_opportunities FOR EACH ROW EXECUTE FUNCTION ftiu_extdatazero_opportunities()"
      },
      {
        "name": "tu_extdatazero_opportunities",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_opportunities",
        "def": "CREATE TRIGGER tu_extdatazero_opportunities BEFORE UPDATE OF field, index ON extdatazero_opportunities FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatazero_opportunities()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdatazero_participants",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatazero_participants_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatazero_participants_index ON extdatazero_participants USING btree (index)"
      },
      {
        "name": "pk_extdatazero_participants",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatazero_participants ON extdatazero_participants USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdatazero_participants",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdatazero_participants",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_participants",
        "def": "CREATE TRIGGER ti_extdatazero_participants BEFORE INSERT ON extdatazero_participants FOR EACH ROW EXECUTE FUNCTION ftiu_extdatazero_participants()"
      },
      {
        "name": "tu_extdatazero_participants",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_participants",
        "def": "CREATE TRIGGER tu_extdatazero_participants BEFORE UPDATE OF field, index ON extdatazero_participants FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatazero_participants()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdatazero_payments",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatazero_payments_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatazero_payments_index ON extdatazero_payments USING btree (index)"
      },
      {
        "name": "pk_extdatazero_payments",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatazero_payments ON extdatazero_payments USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdatazero_payments",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdatazero_payments",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_payments",
        "def": "CREATE TRIGGER ti_extdatazero_payments BEFORE INSERT ON extdatazero_payments FOR EACH ROW EXECUTE FUNCTION ftiu_extdatazero_payments()"
      },
      {
        "name": "tu_extdatazero_payments",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_payments",
        "def": "CREATE TRIGGER tu_extdatazero_payments BEFORE UPDATE OF field, index ON extdatazero_payments FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatazero_payments()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdatazero_pricelists",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatazero_pricelists_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatazero_pricelists_index ON extdatazero_pricelists USING btree (index)"
      },
      {
        "name": "pk_extdatazero_pricelists",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatazero_pricelists ON extdatazero_pricelists USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdatazero_pricelists",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdatazero_pricelists",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_pricelists",
        "def": "CREATE TRIGGER ti_extdatazero_pricelists BEFORE INSERT ON extdatazero_pricelists FOR EACH ROW EXECUTE FUNCTION ftiu_extdatazero_pricelists()"
      },
      {
        "name": "tu_extdatazero_pricelists",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_pricelists",
        "def": "CREATE TRIGGER tu_extdatazero_pricelists BEFORE UPDATE OF field, index ON extdatazero_pricelists FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatazero_pricelists()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdatazero_projects",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatazero_projects_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatazero_projects_index ON extdatazero_projects USING btree (index)"
      },
      {
        "name": "pk_extdatazero_projects",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatazero_projects ON extdatazero_projects USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdatazero_projects",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdatazero_projects",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_projects",
        "def": "CREATE TRIGGER ti_extdatazero_projects BEFORE INSERT ON extdatazero_projects FOR EACH ROW EXECUTE FUNCTION ftiu_extdatazero_projects()"
      },
      {
        "name": "tu_extdatazero_projects",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_projects",
        "def": "CREATE TRIGGER tu_extdatazero_projects BEFORE UPDATE OF field, index ON extdatazero_projects FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatazero_projects()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdatazero_resources",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatazero_resources_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatazero_resources_index ON extdatazero_resources USING btree (index)"
      },
      {
        "name": "pk_extdatazero_resources",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatazero_resources ON extdatazero_resources USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdatazero_resources",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdatazero_resources",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_resources",
        "def": "CREATE TRIGGER ti_extdatazero_resources BEFORE INSERT ON extdatazero_resources FOR EACH ROW EXECUTE FUNCTION ftiu_extdatazero_resources()"
      },
      {
        "name": "tu_extdatazero_resources",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_resources",
        "def": "CREATE TRIGGER tu_extdatazero_resources BEFORE UPDATE OF field, index ON extdatazero_resources FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatazero_resources()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdatazero_services",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatazero_services_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatazero_services_index ON extdatazero_services USING btree (index)"
      },
      {
        "name": "pk_extdatazero_services",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatazero_services ON extdatazero_services USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdatazero_services",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdatazero_services",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_services",
        "def": "CREATE TRIGGER ti_extdatazero_services BEFORE INSERT ON extdatazero_services FOR EACH ROW EXECUTE FUNCTION ftiu_extdatazero_services()"
      },
      {
        "name": "tu_extdatazero_services",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_services",
        "def": "CREATE TRIGGER tu_extdatazero_services BEFORE UPDATE OF field, index ON extdatazero_services FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatazero_services()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdatazero_stocktransactions",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatazero_stocktransactions_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatazero_stocktransactions_index ON extdatazero_stocktransactions USING btree (index)"
      },
      {
        "name": "pk_extdatazero_stocktransactions",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatazero_stocktransactions ON extdatazero_stocktransactions USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdatazero_stocktransactions",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdatazero_stocktransactions",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_stocktransactions",
        "def": "CREATE TRIGGER ti_extdatazero_stocktransactions BEFORE INSERT ON extdatazero_stocktransactions FOR EACH ROW EXECUTE FUNCTION ftiu_extdatazero_stocktransactions()"
      },
      {
        "name": "tu_extdatazero_stocktransactions",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_stocktransactions",
        "def": "CREATE TRIGGER tu_extdatazero_stocktransactions BEFORE UPDATE OF field, index ON extdatazero_stocktransactions FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatazero_stocktransactions()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdatazero_storages",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatazero_storages_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatazero_storages_index ON extdatazero_storages USING btree (index)"
      },
      {
        "name": "pk_extdatazero_storages",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatazero_storages ON extdatazero_storages USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdatazero_storages",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdatazero_storages",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_storages",
        "def": "CREATE TRIGGER ti_extdatazero_storages BEFORE INSERT ON extdatazero_storages FOR EACH ROW EXECUTE FUNCTION ftiu_extdatazero_storages()"
      },
      {
        "name": "tu_extdatazero_storages",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_storages",
        "def": "CREATE TRIGGER tu_extdatazero_storages BEFORE UPDATE OF field, index ON extdatazero_storages FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatazero_storages()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdatazero_tasks",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatazero_tasks_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatazero_tasks_index ON extdatazero_tasks USING btree (index)"
      },
      {
        "name": "pk_extdatazero_tasks",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatazero_tasks ON extdatazero_tasks USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdatazero_tasks",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdatazero_tasks",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_tasks",
        "def": "CREATE TRIGGER ti_extdatazero_tasks BEFORE INSERT ON extdatazero_tasks FOR EACH ROW EXECUTE FUNCTION ftiu_extdatazero_tasks()"
      },
      {
        "name": "tu_extdatazero_tasks",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_tasks",
        "def": "CREATE TRIGGER tu_extdatazero_tasks BEFORE UPDATE OF field, index ON extdatazero_tasks FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatazero_tasks()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdatazero_tickets",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatazero_tickets_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatazero_tickets_index ON extdatazero_tickets USING btree (index)"
      },
      {
        "name": "pk_extdatazero_tickets",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatazero_tickets ON extdatazero_tickets USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdatazero_tickets",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdatazero_tickets",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_tickets",
        "def": "CREATE TRIGGER ti_extdatazero_tickets BEFORE INSERT ON extdatazero_tickets FOR EACH ROW EXECUTE FUNCTION ftiu_extdatazero_tickets()"
      },
      {
        "name": "tu_extdatazero_tickets",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_tickets",
        "def": "CREATE TRIGGER tu_extdatazero_tickets BEFORE UPDATE OF field, index ON extdatazero_tickets FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatazero_tickets()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdatazero_transactions",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatazero_transactions_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatazero_transactions_index ON extdatazero_transactions USING btree (index)"
      },
      {
        "name": "pk_extdatazero_transactions",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatazero_transactions ON extdatazero_transactions USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdatazero_transactions",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdatazero_transactions",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_transactions",
        "def": "CREATE TRIGGER ti_extdatazero_transactions BEFORE INSERT ON extdatazero_transactions FOR EACH ROW EXECUTE FUNCTION ftiu_extdatazero_transactions()"
      },
      {
        "name": "tu_extdatazero_transactions",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_transactions",
        "def": "CREATE TRIGGER tu_extdatazero_transactions BEFORE UPDATE OF field, index ON extdatazero_transactions FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatazero_transactions()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdatazero_users",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatazero_users_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatazero_users_index ON extdatazero_users USING btree (index)"
      },
      {
        "name": "pk_extdatazero_users",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatazero_users ON extdatazero_users USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdatazero_users",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdatazero_users",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_users",
        "def": "CREATE TRIGGER ti_extdatazero_users BEFORE INSERT ON extdatazero_users FOR EACH ROW EXECUTE FUNCTION ftiu_extdatazero_users()"
      },
      {
        "name": "tu_extdatazero_users",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_users",
        "def": "CREATE TRIGGER tu_extdatazero_users BEFORE UPDATE OF field, index ON extdatazero_users FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatazero_users()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "extdatazero_weblets",
    "type": "table",
    "fields": [
      {
        "name": "field",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_extdatazero_weblets_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_extdatazero_weblets_index ON extdatazero_weblets USING btree (index)"
      },
      {
        "name": "pk_extdatazero_weblets",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "field",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_extdatazero_weblets ON extdatazero_weblets USING btree (field, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_extdatazero_weblets",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (field, index)"
      }
    ],
    "triggers": [
      {
        "name": "ti_extdatazero_weblets",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_weblets",
        "def": "CREATE TRIGGER ti_extdatazero_weblets BEFORE INSERT ON extdatazero_weblets FOR EACH ROW EXECUTE FUNCTION ftiu_extdatazero_weblets()"
      },
      {
        "name": "tu_extdatazero_weblets",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_extdatazero_weblets",
        "def": "CREATE TRIGGER tu_extdatazero_weblets BEFORE UPDATE OF field, index ON extdatazero_weblets FOR EACH ROW WHEN (old.field <> new.field OR old.index <> new.index) EXECUTE FUNCTION ftiu_extdatazero_weblets()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "feedids",
    "type": "table",
    "fields": [
      {
        "name": "feedserver",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_feedids_feedserver",
            "table": "feedservers",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": null
      },
      {
        "name": "record",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_feedids_record",
            "table": "records",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": null
      },
      {
        "name": "uuid",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "pk_feedids",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "feedserver",
          "uuid"
        ],
        "def": "CREATE UNIQUE INDEX pk_feedids ON feedids USING btree (feedserver, uuid)"
      },
      {
        "name": "u_feedids_record",
        "unique": true,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "record"
        ],
        "def": "CREATE UNIQUE INDEX u_feedids_record ON feedids USING btree (record) WHERE record IS NOT NULL"
      }
    ],
    "constraints": [
      {
        "name": "dc_feedids_uuid",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE <> ''::text)"
      },
      {
        "name": "fk_feedids_feedserver",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (feedserver) REFERENCES feedservers(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_feedids_record",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (record) REFERENCES records(\"ID\") ON DELETE SET NULL DEFERRABLE"
      },
      {
        "name": "pk_feedids",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (feedserver, uuid)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "feedservers",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": true,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Feed server ID"
      },
      {
        "name": "owneruser",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_feedservers_owneruser",
            "table": "users",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Owner user ID (PUBLIC if `owneruser`=`null` and `ownergroup`=`null`)"
      },
      {
        "name": "ownergroup",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_feedservers_ownergroup",
            "table": "groups",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Owner group ID (PUBLIC if `owneruser`=`null` and `ownergroup`=`null`)"
      },
      {
        "name": "creator",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creator user ID (defaults to authenticated user on creation)"
      },
      {
        "name": "creationdate",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creation date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (defaults to current date and time on creation)"
      },
      {
        "name": "lastmodified",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Last modification date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (auto-reset on modification)"
      },
      {
        "name": "recipientuser",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [
          {
            "name": "fk_feedservers_recipientuser",
            "table": "users",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Recipient user ID (PUBLIC if `recipientuser`=`null` and `recipientgroup`=`null`)"
      },
      {
        "name": "recipientgroup",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [
          {
            "name": "fk_feedservers_recipientgroup",
            "table": "groups",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Recipient group ID (PUBLIC if `recipientuser`=`null` and `recipientgroup`=`null`)"
      },
      {
        "name": "channel",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [
          {
            "name": "fk_feedservers_channel",
            "table": "channels",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Channel ID"
      },
      {
        "name": "activity",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Activity (`0`=ACTIVE, `1`=DEACTIVATED, `2`=DELETED)"
      },
      {
        "name": "name",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Name"
      },
      {
        "name": "url",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Feed URL"
      },
      {
        "name": "username",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Username"
      },
      {
        "name": "notify",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Notify about new records"
      },
      {
        "name": "etag",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Entity tag (ETag) ([RFC 7232](https://tools.ietf.org/html/rfc7232#section-2.3))"
      },
      {
        "name": "description",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Detailed general description"
      },
      {
        "name": "password",
        "type": "bytea",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "fk_feedservers_ownergroup",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "ownergroup"
        ],
        "def": "CREATE INDEX fk_feedservers_ownergroup ON feedservers USING gin (ownergroup) WHERE ownergroup IS NOT NULL"
      },
      {
        "name": "fk_feedservers_owneruser",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "owneruser"
        ],
        "def": "CREATE INDEX fk_feedservers_owneruser ON feedservers USING gin (owneruser) WHERE owneruser IS NOT NULL"
      },
      {
        "name": "i_feedservers_noowner",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "ownergroup"
        ],
        "def": "CREATE INDEX i_feedservers_noowner ON feedservers USING gin (ownergroup) WHERE owneruser IS NULL AND ownergroup IS NULL"
      },
      {
        "name": "pk_feedservers",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_feedservers ON feedservers USING btree (\"ID\")"
      },
      {
        "name": "s_feedservers_name",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "name"
        ],
        "def": "CREATE INDEX s_feedservers_name ON feedservers USING gin (name gin_trgm_ops)"
      },
      {
        "name": "s_feedservers_url",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "url"
        ],
        "def": "CREATE INDEX s_feedservers_url ON feedservers USING gin (url gin_trgm_ops)"
      }
    ],
    "constraints": [
      {
        "name": "c_feedservers_owner",
        "type": "check",
        "domain": false,
        "def": "CHECK (owneruser IS NULL OR ownergroup IS NULL)"
      },
      {
        "name": "c_feedservers_recipient",
        "type": "check",
        "domain": false,
        "def": "CHECK (recipientuser IS NULL OR recipientgroup IS NULL)"
      },
      {
        "name": "dc_feedservers_activity",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0 AND VALUE <= 2)"
      },
      {
        "name": "dc_feedservers_description",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v\\r\\n]|[ \\t\\v\\r\\n]$'::text)"
      },
      {
        "name": "dc_feedservers_name",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^$|^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_feedservers_url",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^$|^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_feedservers_username",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "fk_feedservers_channel",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (channel) REFERENCES channels(\"ID\") ON DELETE SET NULL DEFERRABLE"
      },
      {
        "name": "fk_feedservers_ownergroup",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (ownergroup) REFERENCES groups(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_feedservers_owneruser",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (owneruser) REFERENCES users(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_feedservers_recipientgroup",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (recipientgroup) REFERENCES groups(\"ID\") ON DELETE SET NULL DEFERRABLE"
      },
      {
        "name": "fk_feedservers_recipientuser",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (recipientuser) REFERENCES users(\"ID\") ON DELETE SET NULL DEFERRABLE"
      },
      {
        "name": "pk_feedservers",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "files",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": true,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "File ID"
      },
      {
        "name": "creator",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creator user ID (defaults to authenticated user on creation)"
      },
      {
        "name": "creationdate",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creation date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (defaults to current date and time on creation)"
      },
      {
        "name": "lastmodified",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "EXTRACT(epoch FROM now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Last modification date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (auto-reset on modification)"
      },
      {
        "name": "record",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_files_record",
            "table": "records",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Record ID (**dependency**); is mutually exclusive to `comment` (either one is required)"
      },
      {
        "name": "comment",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_files_comment",
            "table": "comments",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Comment ID (**dependency**); is mutually exclusive to `record` (either one is required)"
      },
      {
        "name": "binfile",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_files_binfile",
            "table": "binfiles",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Binary file ID; is read-only (not for `PUT` or `PATCH`)"
      },
      {
        "name": "filename",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Filename"
      },
      {
        "name": "mimetype",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": "'application/octet-stream'",
        "indexed": false,
        "fkeys": [],
        "pattern": "^[a-z]+/[^ \\t\\v\\r\\n]+$",
        "description": "[MIME type](https://en.wikipedia.org/wiki/Media_type) ([RFC 2045](https://tools.ietf.org/html/rfc2045))"
      }
    ],
    "indexes": [
      {
        "name": "fk_files_binfile",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "binfile"
        ],
        "def": "CREATE INDEX fk_files_binfile ON files USING btree (binfile) WHERE binfile IS NOT NULL"
      },
      {
        "name": "fk_files_comment",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "comment"
        ],
        "def": "CREATE INDEX fk_files_comment ON files USING btree (comment) WHERE comment IS NOT NULL"
      },
      {
        "name": "fk_files_record",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "record"
        ],
        "def": "CREATE INDEX fk_files_record ON files USING btree (record) WHERE record IS NOT NULL"
      },
      {
        "name": "pk_files",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_files ON files USING btree (\"ID\")"
      },
      {
        "name": "s_files_filename",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "filename"
        ],
        "def": "CREATE INDEX s_files_filename ON files USING gin (filename gin_trgm_ops) WHERE filename::text <> ''::text"
      }
    ],
    "constraints": [
      {
        "name": "c_files_association",
        "type": "check",
        "domain": false,
        "def": "CHECK (num_nonnulls(record, comment) = 1)"
      },
      {
        "name": "dc_files_filename",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v\\r\\n]|[ \\t\\v\\r\\n]$'::text)"
      },
      {
        "name": "dc_files_mimetype",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE ~ '^[a-z]+\\/[^ \\t\\v\\r\\n]+$'::text)"
      },
      {
        "name": "fk_files_binfile",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (binfile) REFERENCES binfiles(\"ID\") DEFERRABLE"
      },
      {
        "name": "fk_files_comment",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (comment) REFERENCES comments(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_files_record",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (record) REFERENCES records(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "pk_files",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "follows",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": true,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Follow ID"
      },
      {
        "name": "creator",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_follows_creator",
            "table": "users",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Creator user ID (defaults to authenticated user on creation)"
      },
      {
        "name": "creationdate",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creation date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (defaults to current date and time on creation)"
      },
      {
        "name": "lastmodified",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "EXTRACT(epoch FROM now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Last modification date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (auto-reset on modification)"
      },
      {
        "name": "entity",
        "type": "t_entity",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Canonical entity"
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Entity ID"
      }
    ],
    "indexes": [
      {
        "name": "pk_follows",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_follows ON follows USING btree (\"ID\")"
      },
      {
        "name": "u_follows_entity_creator_index",
        "unique": true,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "entity",
          "creator",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX u_follows_entity_creator_index ON follows USING btree (entity, creator, index)"
      }
    ],
    "constraints": [
      {
        "name": "c_follows_entity",
        "type": "check",
        "domain": false,
        "def": "CHECK (entity <> ALL (ARRAY['couponcodes'::t_entity, 'participants'::t_entity, 'stocktransactions'::t_entity]))"
      },
      {
        "name": "fk_follows_creator",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (creator) REFERENCES users(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "pk_follows",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      },
      {
        "name": "u_follows_entity_creator_index",
        "type": "unique",
        "domain": false,
        "def": "UNIQUE (entity, creator, index)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "forks",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": true,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Fork ID"
      },
      {
        "name": "creator",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creator user ID (defaults to authenticated user on creation)"
      },
      {
        "name": "creationdate",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "EXTRACT(epoch FROM now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creation date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (defaults to current date and time on creation)"
      },
      {
        "name": "lastmodified",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "EXTRACT(epoch FROM now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Last modification date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (auto-reset on modification)"
      },
      {
        "name": "group",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [
          {
            "name": "fk_forks_group",
            "table": "groups",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Group ID"
      },
      {
        "name": "activity",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Activity (`0`=ACTIVE, `1`=DEACTIVATED, `2`=DELETED)"
      },
      {
        "name": "name",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Name"
      },
      {
        "name": "identifier",
        "type": "character varying(200)",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": "^[a-zA-Z0-9]([a-zA-Z0-9_.-]*[a-zA-Z0-9])?$",
        "description": "Unique fork identifier"
      },
      {
        "name": "module",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Canonical module identifier"
      },
      {
        "name": "color",
        "type": "character varying(6)",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": "^([A-F0-9]{3}){0,2}$",
        "description": "Color code (CSS-style hexadecimal without `#`)"
      },
      {
        "name": "langaliases",
        "type": "json",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "[JSON](https://tools.ietf.org/html/rfc7159)-encoded language-specific aliases (object); use language code as object key"
      },
      {
        "name": "description",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "settings",
        "type": "json",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "pk_forks",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_forks ON forks USING btree (\"ID\")"
      },
      {
        "name": "s_forks_identifier",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "identifier"
        ],
        "def": "CREATE INDEX s_forks_identifier ON forks USING gin (identifier gin_trgm_ops)"
      },
      {
        "name": "s_forks_name",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "name"
        ],
        "def": "CREATE INDEX s_forks_name ON forks USING gin (name gin_trgm_ops)"
      },
      {
        "name": "u_forks_identifier",
        "unique": true,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "identifier"
        ],
        "def": "CREATE UNIQUE INDEX u_forks_identifier ON forks USING btree (identifier)"
      }
    ],
    "constraints": [
      {
        "name": "dc_forks_activity",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0 AND VALUE <= 2)"
      },
      {
        "name": "dc_forks_color",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE::text ~ '^([A-F0-9]{3}){0,2}$'::text)"
      },
      {
        "name": "dc_forks_description",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v\\r\\n]|[ \\t\\v\\r\\n]$'::text)"
      },
      {
        "name": "dc_forks_identifier",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE::text ~ '^[a-zA-Z0-9]([a-zA-Z0-9_.-]*[a-zA-Z0-9])?$'::text)"
      },
      {
        "name": "dc_forks_langaliases",
        "type": "check",
        "domain": true,
        "def": "CHECK (json_typeof(VALUE) = 'object'::text)"
      },
      {
        "name": "dc_forks_module",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE = ANY (ARRAY['accounts'::text, 'actionsteps'::text, 'billing'::text, 'calendar'::text, 'campaigns'::text, 'collection'::text, 'contacts'::text, 'contracts'::text, 'coupons'::text, 'documents'::text, 'inventory'::text, 'links'::text, 'mailinglists'::text, 'messages'::text, 'notes'::text, 'objects'::text, 'opportunities'::text, 'payments'::text, 'pricelists'::text, 'procurement'::text, 'production'::text, 'projects'::text, 'tasks'::text, 'tickets'::text]))"
      },
      {
        "name": "dc_forks_name",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^$|^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_forks_settings",
        "type": "check",
        "domain": true,
        "def": "CHECK (json_typeof(VALUE) = 'object'::text)"
      },
      {
        "name": "fk_forks_group",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (\"group\") REFERENCES groups(\"ID\") ON DELETE SET NULL DEFERRABLE"
      },
      {
        "name": "pk_forks",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      },
      {
        "name": "u_forks_identifier",
        "type": "unique",
        "domain": false,
        "def": "UNIQUE (identifier)"
      }
    ],
    "triggers": [
      {
        "name": "tu_forks_module",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ft_integrity",
        "def": "CREATE TRIGGER tu_forks_module BEFORE UPDATE OF module ON forks FOR EACH ROW WHEN (old.module::text <> new.module::text) EXECUTE FUNCTION ft_integrity()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "groups",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": true,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Group ID"
      },
      {
        "name": "creator",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creator user ID (defaults to authenticated user on creation)"
      },
      {
        "name": "creationdate",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creation date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (defaults to current date and time on creation)"
      },
      {
        "name": "lastmodified",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Last modification date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (auto-reset on modification)"
      },
      {
        "name": "leader",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [
          {
            "name": "fk_groups_leader",
            "table": "users",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Leader user ID"
      },
      {
        "name": "activity",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Activity (`0`=ACTIVE, `1`=DEACTIVATED, `2`=DELETED)"
      },
      {
        "name": "name",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Name (case-insensitively unique)"
      },
      {
        "name": "description",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "pk_groups",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_groups ON groups USING btree (\"ID\")"
      },
      {
        "name": "s_groups_name",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "name"
        ],
        "def": "CREATE INDEX s_groups_name ON groups USING gin (name gin_trgm_ops)"
      },
      {
        "name": "u_groups_name",
        "unique": true,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "lower(name)"
        ],
        "def": "CREATE UNIQUE INDEX u_groups_name ON groups USING btree (lower(name::text))"
      }
    ],
    "constraints": [
      {
        "name": "dc_groups_activity",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0 AND VALUE <= 2)"
      },
      {
        "name": "dc_groups_description",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v\\r\\n]|[ \\t\\v\\r\\n]$'::text)"
      },
      {
        "name": "dc_groups_name",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^$|^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "fk_groups_leader",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (leader) REFERENCES users(\"ID\") ON DELETE SET NULL DEFERRABLE"
      },
      {
        "name": "pk_groups",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "groups2users",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": true,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Group-to-user ID"
      },
      {
        "name": "creator",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creator user ID (defaults to authenticated user on creation)"
      },
      {
        "name": "creationdate",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creation date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (defaults to current date and time on creation)"
      },
      {
        "name": "lastmodified",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Last modification date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (auto-reset on modification)"
      },
      {
        "name": "group",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_groups2users_group",
            "table": "groups",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Group ID (**dependency**)"
      },
      {
        "name": "user",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_groups2users_user",
            "table": "users",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "User ID (**dependency**)"
      },
      {
        "name": "writable",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Allow writing of group-owned data by user"
      }
    ],
    "indexes": [
      {
        "name": "fk_groups2users_user",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "user"
        ],
        "def": "CREATE INDEX fk_groups2users_user ON groups2users USING btree (\"user\")"
      },
      {
        "name": "pk_groups2users",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_groups2users ON groups2users USING btree (\"ID\")"
      },
      {
        "name": "u_groups2users_group_user",
        "unique": true,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "group",
          "user"
        ],
        "def": "CREATE UNIQUE INDEX u_groups2users_group_user ON groups2users USING btree (\"group\", \"user\")"
      }
    ],
    "constraints": [
      {
        "name": "fk_groups2users_group",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (\"group\") REFERENCES groups(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_groups2users_user",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (\"user\") REFERENCES users(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "pk_groups2users",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      },
      {
        "name": "u_groups2users_group_user",
        "type": "unique",
        "domain": false,
        "def": "UNIQUE (\"group\", \"user\")"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "imapids",
    "type": "table",
    "fields": [
      {
        "name": "mailserver",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_imapids_mailserver",
            "table": "mailservers",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": null
      },
      {
        "name": "message",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_imapids_message",
            "table": "messages",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": null
      },
      {
        "name": "uidvalidity",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "uid",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "size",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "date",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "mailbox",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "u_imapids_mailserver_size_date",
        "unique": true,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "mailserver",
          "size",
          "date"
        ],
        "def": "CREATE UNIQUE INDEX u_imapids_mailserver_size_date ON imapids USING btree (mailserver, size, date) WHERE size::integer <> 0"
      },
      {
        "name": "u_imapids_mailserver_uidvalidity_mailbox_uid",
        "unique": true,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "mailserver",
          "uidvalidity",
          "mailbox",
          "uid"
        ],
        "def": "CREATE UNIQUE INDEX u_imapids_mailserver_uidvalidity_mailbox_uid ON imapids USING btree (mailserver, uidvalidity, mailbox, uid DESC)"
      },
      {
        "name": "u_imapids_message",
        "unique": true,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "message"
        ],
        "def": "CREATE UNIQUE INDEX u_imapids_message ON imapids USING btree (message) WHERE message IS NOT NULL"
      }
    ],
    "constraints": [
      {
        "name": "dc_imapid_size",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0)"
      },
      {
        "name": "dc_imapids_mailbox",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE <> ''::text)"
      },
      {
        "name": "dc_imapids_uid",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE > 0)"
      },
      {
        "name": "dc_imapids_uidvalidity",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE > 0)"
      },
      {
        "name": "fk_imapids_mailserver",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (mailserver) REFERENCES mailservers(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_imapids_message",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (message) REFERENCES messages(\"ID\") ON DELETE SET NULL DEFERRABLE"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "imports",
    "type": "table",
    "fields": [
      {
        "name": "user",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_imports_user",
            "table": "users",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": null
      },
      {
        "name": "date",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "name",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "settings",
        "type": "json",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "entity",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "pk_imports",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "user",
          "entity",
          "name"
        ],
        "def": "CREATE UNIQUE INDEX pk_imports ON imports USING btree (\"user\", entity, name)"
      }
    ],
    "constraints": [
      {
        "name": "dc_imports_entity",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^$|^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_imports_name",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^$|^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_imports_settings",
        "type": "check",
        "domain": true,
        "def": "CHECK (json_typeof(VALUE) = 'object'::text)"
      },
      {
        "name": "fk_imports_user",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (\"user\") REFERENCES users(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "pk_imports",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"user\", entity, name)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "invitations",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": true,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Invitation ID"
      },
      {
        "name": "creator",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creator user ID (defaults to authenticated user on creation)"
      },
      {
        "name": "creationdate",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creation date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (defaults to current date and time on creation)"
      },
      {
        "name": "lastmodified",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Last modification date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (auto-reset on modification)"
      },
      {
        "name": "appointment",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_invitations_appointment",
            "table": "appointments",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Appointment ID (**dependency**)"
      },
      {
        "name": "contact",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_invitations_contact",
            "table": "contacts",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Contact ID"
      },
      {
        "name": "name",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Name"
      },
      {
        "name": "email",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "E-mail address"
      },
      {
        "name": "flag",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Flag (`0`=UNANSWERED, `1`=CONFIRMED, `2`=REJECTED)"
      }
    ],
    "indexes": [
      {
        "name": "fk_invitations_appointment",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "appointment"
        ],
        "def": "CREATE INDEX fk_invitations_appointment ON invitations USING btree (appointment)"
      },
      {
        "name": "fk_invitations_contact",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "contact"
        ],
        "def": "CREATE INDEX fk_invitations_contact ON invitations USING btree (contact) WHERE contact IS NOT NULL"
      },
      {
        "name": "pk_invitations",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_invitations ON invitations USING btree (\"ID\")"
      }
    ],
    "constraints": [
      {
        "name": "dc_invitations_email",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_invitations_flag",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0 AND VALUE <= 2)"
      },
      {
        "name": "dc_invitations_name",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^$|^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "fk_invitations_appointment",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (appointment) REFERENCES appointments(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_invitations_contact",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (contact) REFERENCES contacts(\"ID\") ON DELETE SET NULL DEFERRABLE"
      },
      {
        "name": "pk_invitations",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "items",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": true,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Item ID"
      },
      {
        "name": "fork",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_items_fork",
            "table": "forks",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Fork ID (`null` for base module)"
      },
      {
        "name": "ownergroup",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_items_ownergroup",
            "table": "groups",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Owner group ID (`null`=PUBLIC)"
      },
      {
        "name": "creator",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creator user ID (defaults to authenticated user on creation)"
      },
      {
        "name": "creationdate",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creation date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (defaults to current date and time on creation)"
      },
      {
        "name": "lastmodified",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Last modification date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (auto-reset on modification)"
      },
      {
        "name": "model",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_items_model",
            "table": "items",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Model item ID; only for non-MODEL"
      },
      {
        "name": "picbinfile",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_items_picbinfile",
            "table": "binfiles",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Binary file ID; is read-only (not for `PUT` or `PATCH`)"
      },
      {
        "name": "visibility",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Visibility (`0`=REGULAR, `1`=ARCHIVED, `2`=DELETED)"
      },
      {
        "name": "name",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Product name"
      },
      {
        "name": "manufacturer",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Manufacturer (brand or company name)"
      },
      {
        "name": "itemnum",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Item number (SKU)"
      },
      {
        "name": "barcode",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Barcode (e.g. GTIN, EAN or UPC code)"
      },
      {
        "name": "type",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Item type (`0`=SIMPLE, `1`=SERIALS, `2`=CHARGES, `3`=SERIALSANDCHARGES, `4`=SET, `5`=CONTAINER, `6`=NOSTOCK, `7`=MODEL)"
      },
      {
        "name": "forcestock",
        "type": "smallint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Force stock check on depletion (`0`=STORAGE, `1`=LOCATION)"
      },
      {
        "name": "applicability",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Applicability (`0`=ALWAYS, `1`=NEVER, `2`=BILLINGONLY, `3`=PROCUREMENTONLY)"
      },
      {
        "name": "unit",
        "type": "character varying(3)",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Unit code as defined by ([UN/CEFACT Recommendation 20](https://unece.org/trade/uncefact/cl-recommendations))"
      },
      {
        "name": "sellingprice",
        "type": "double precision",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Default selling price per unit"
      },
      {
        "name": "purchaseprice",
        "type": "double precision",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Default purchase price per unit"
      },
      {
        "name": "taxrate",
        "type": "double precision",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Tax rate in percent"
      },
      {
        "name": "weight",
        "type": "double precision",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Shipping weight per unit in kilograms"
      },
      {
        "name": "classcode",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Product classification code (e.g. GPC, CPV or UNSPSC code)"
      },
      {
        "name": "tariffcode",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Tariff code (e.g. HS, CN or HTS code)"
      },
      {
        "name": "origin",
        "type": "character varying(2)",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": "^([A-Z]{2})?$",
        "description": "Origin country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2))"
      },
      {
        "name": "description",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Detailed general description"
      },
      {
        "name": "foreigntaxrates",
        "type": "json",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Country-specific tax rates in percent; use country code as object key"
      }
    ],
    "indexes": [
      {
        "name": "fk_items_fork",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "fork"
        ],
        "def": "CREATE INDEX fk_items_fork ON items USING gin (fork) WHERE fork IS NOT NULL"
      },
      {
        "name": "fk_items_model",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "model"
        ],
        "def": "CREATE INDEX fk_items_model ON items USING btree (model) WHERE model IS NOT NULL"
      },
      {
        "name": "fk_items_ownergroup",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "ownergroup"
        ],
        "def": "CREATE INDEX fk_items_ownergroup ON items USING gin (ownergroup)"
      },
      {
        "name": "fk_items_picbinfile",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "picbinfile"
        ],
        "def": "CREATE INDEX fk_items_picbinfile ON items USING btree (picbinfile) WHERE picbinfile IS NOT NULL"
      },
      {
        "name": "i_items_barcode",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "barcode"
        ],
        "def": "CREATE INDEX i_items_barcode ON items USING btree (barcode) WHERE barcode::text <> ''::text"
      },
      {
        "name": "i_items_itemnum",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "itemnum"
        ],
        "def": "CREATE INDEX i_items_itemnum ON items USING btree (itemnum) WHERE itemnum::text <> ''::text"
      },
      {
        "name": "i_items_name",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "name"
        ],
        "def": "CREATE INDEX i_items_name ON items USING btree (name)"
      },
      {
        "name": "i_items_nofork",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "fork"
        ],
        "def": "CREATE INDEX i_items_nofork ON items USING gin (fork) WHERE fork IS NULL"
      },
      {
        "name": "i_items_noowner",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "ownergroup"
        ],
        "def": "CREATE INDEX i_items_noowner ON items USING gin (ownergroup) WHERE ownergroup IS NULL"
      },
      {
        "name": "pk_items",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_items ON items USING btree (\"ID\")"
      },
      {
        "name": "s_items_barcode",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "barcode"
        ],
        "def": "CREATE INDEX s_items_barcode ON items USING gin (barcode gin_trgm_ops) WHERE barcode::text <> ''::text"
      },
      {
        "name": "s_items_itemnum",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "itemnum"
        ],
        "def": "CREATE INDEX s_items_itemnum ON items USING gin (itemnum gin_trgm_ops) WHERE itemnum::text <> ''::text"
      },
      {
        "name": "s_items_manufacturer",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "manufacturer"
        ],
        "def": "CREATE INDEX s_items_manufacturer ON items USING gin (manufacturer gin_trgm_ops) WHERE manufacturer::text <> ''::text"
      },
      {
        "name": "s_items_name",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "name"
        ],
        "def": "CREATE INDEX s_items_name ON items USING gin (name gin_trgm_ops)"
      }
    ],
    "constraints": [
      {
        "name": "c_items_type",
        "type": "check",
        "domain": false,
        "def": "CHECK (model IS NULL OR type::smallint <> 7)"
      },
      {
        "name": "dc_items_applicability",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0 AND VALUE <= 3)"
      },
      {
        "name": "dc_items_barcode",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_items_classcode",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_items_description",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v\\r\\n]|[ \\t\\v\\r\\n]$'::text)"
      },
      {
        "name": "dc_items_forcestock",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0 AND VALUE <= 1)"
      },
      {
        "name": "dc_items_foreigntaxrates",
        "type": "check",
        "domain": true,
        "def": "CHECK (json_typeof(VALUE) = 'object'::text)"
      },
      {
        "name": "dc_items_itemnum",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_items_manufacturer",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_items_name",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^$|^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_items_origin",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE::text ~ '^([A-Z]{2})?$'::text)"
      },
      {
        "name": "dc_items_tariffcode",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_items_taxrate",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0::double precision AND VALUE <= 100::double precision)"
      },
      {
        "name": "dc_items_type",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0 AND VALUE <= 7)"
      },
      {
        "name": "dc_items_visibility",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0 AND VALUE <= 2)"
      },
      {
        "name": "dc_items_weight",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0::double precision)"
      },
      {
        "name": "fk_items_fork",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (fork) REFERENCES forks(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_items_model",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (model) REFERENCES items(\"ID\") ON DELETE SET NULL DEFERRABLE"
      },
      {
        "name": "fk_items_ownergroup",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (ownergroup) REFERENCES groups(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_items_picbinfile",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (picbinfile) REFERENCES binfiles(\"ID\") DEFERRABLE"
      },
      {
        "name": "pk_items",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      }
    ],
    "triggers": [
      {
        "name": "ti_items_model",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_items_model",
        "def": "CREATE TRIGGER ti_items_model BEFORE INSERT ON items FOR EACH ROW WHEN (new.model IS NOT NULL) EXECUTE FUNCTION ftiu_items_model()"
      },
      {
        "name": "tu_items_model",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_items_model",
        "def": "CREATE TRIGGER tu_items_model BEFORE UPDATE OF model ON items FOR EACH ROW WHEN (new.model IS NOT NULL AND old.model IS DISTINCT FROM new.model) EXECUTE FUNCTION ftiu_items_model()"
      },
      {
        "name": "tu_items_type",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ft_integrity",
        "def": "CREATE TRIGGER tu_items_type BEFORE UPDATE OF type ON items FOR EACH ROW WHEN (old.type::smallint <> new.type::smallint) EXECUTE FUNCTION ft_integrity()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "ledgers",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": true,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Ledger ID"
      },
      {
        "name": "fork",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_ledgers_fork",
            "table": "forks",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Fork ID (`null` for base module)"
      },
      {
        "name": "ownergroup",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_ledgers_ownergroup",
            "table": "groups",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Owner group ID (`null`=PUBLIC)"
      },
      {
        "name": "creator",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creator user ID (defaults to authenticated user on creation)"
      },
      {
        "name": "creationdate",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creation date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (defaults to current date and time on creation)"
      },
      {
        "name": "lastmodified",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Last modification date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (auto-reset on modification)"
      },
      {
        "name": "visibility",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Visibility (`0`=REGULAR, `1`=ARCHIVED, `2`=DELETED)"
      },
      {
        "name": "name",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Name"
      },
      {
        "name": "description",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Detailed general description"
      }
    ],
    "indexes": [
      {
        "name": "fk_ledgers_fork",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "fork"
        ],
        "def": "CREATE INDEX fk_ledgers_fork ON ledgers USING gin (fork) WHERE fork IS NOT NULL"
      },
      {
        "name": "fk_ledgers_ownergroup",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "ownergroup"
        ],
        "def": "CREATE INDEX fk_ledgers_ownergroup ON ledgers USING gin (ownergroup)"
      },
      {
        "name": "i_ledgers_nofork",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "fork"
        ],
        "def": "CREATE INDEX i_ledgers_nofork ON ledgers USING gin (fork) WHERE fork IS NULL"
      },
      {
        "name": "i_ledgers_noowner",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "ownergroup"
        ],
        "def": "CREATE INDEX i_ledgers_noowner ON ledgers USING gin (ownergroup) WHERE ownergroup IS NULL"
      },
      {
        "name": "pk_ledgers",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_ledgers ON ledgers USING btree (\"ID\")"
      },
      {
        "name": "s_ledgers_name",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "name"
        ],
        "def": "CREATE INDEX s_ledgers_name ON ledgers USING gin (name gin_trgm_ops)"
      }
    ],
    "constraints": [
      {
        "name": "dc_ledgers_description",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v\\r\\n]|[ \\t\\v\\r\\n]$'::text)"
      },
      {
        "name": "dc_ledgers_name",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^$|^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_ledgers_visibility",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0 AND VALUE <= 2)"
      },
      {
        "name": "fk_ledgers_fork",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (fork) REFERENCES forks(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_ledgers_ownergroup",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (ownergroup) REFERENCES groups(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "pk_ledgers",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "likes",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": true,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Like ID"
      },
      {
        "name": "creator",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_likes_creator",
            "table": "users",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Creator user ID (defaults to authenticated user on creation)"
      },
      {
        "name": "creationdate",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creation date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (defaults to current date and time on creation)"
      },
      {
        "name": "lastmodified",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "EXTRACT(epoch FROM now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Last modification date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (auto-reset on modification)"
      },
      {
        "name": "record",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_likes_record",
            "table": "records",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Record ID (**dependency**)"
      }
    ],
    "indexes": [
      {
        "name": "pk_likes",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_likes ON likes USING btree (\"ID\")"
      },
      {
        "name": "u_likes_record_creator",
        "unique": true,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "record",
          "creator"
        ],
        "def": "CREATE UNIQUE INDEX u_likes_record_creator ON likes USING btree (record, creator)"
      }
    ],
    "constraints": [
      {
        "name": "fk_likes_creator",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (creator) REFERENCES users(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_likes_record",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (record) REFERENCES records(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "pk_likes",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      },
      {
        "name": "u_likes_record_creator",
        "type": "unique",
        "domain": false,
        "def": "UNIQUE (record, creator)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "links",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": true,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Link ID"
      },
      {
        "name": "fork",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_links_fork",
            "table": "forks",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Fork ID (`null` for base module)"
      },
      {
        "name": "owneruser",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_links_owneruser",
            "table": "users",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Owner user ID (PUBLIC if `owneruser`=`null` and `ownergroup`=`null`)"
      },
      {
        "name": "ownergroup",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_links_ownergroup",
            "table": "groups",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Owner group ID (PUBLIC if `owneruser`=`null` and `ownergroup`=`null`)"
      },
      {
        "name": "creator",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creator user ID (defaults to authenticated user on creation)"
      },
      {
        "name": "assigneduser",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_links_assigneduser",
            "table": "users",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Assigned user ID"
      },
      {
        "name": "creationdate",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creation date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (defaults to current date and time on creation)"
      },
      {
        "name": "lastmodified",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Last modification date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (auto-reset on modification)"
      },
      {
        "name": "visibility",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Visibility (`0`=REGULAR, `1`=ARCHIVED, `2`=DELETED)"
      },
      {
        "name": "name",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Name"
      },
      {
        "name": "url",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "URL"
      },
      {
        "name": "expdate",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Expiry date as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time)"
      },
      {
        "name": "username",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Username"
      },
      {
        "name": "password",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Password (empty if encrypted)"
      },
      {
        "name": "visits",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Number of visits"
      },
      {
        "name": "description",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Detailed general description"
      },
      {
        "name": "password_encrypted",
        "type": "bytea",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "otpsecret",
        "type": "bytea",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "fk_links_assigneduser",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "assigneduser"
        ],
        "def": "CREATE INDEX fk_links_assigneduser ON links USING gin (assigneduser) WHERE assigneduser IS NOT NULL"
      },
      {
        "name": "fk_links_fork",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "fork"
        ],
        "def": "CREATE INDEX fk_links_fork ON links USING gin (fork) WHERE fork IS NOT NULL"
      },
      {
        "name": "fk_links_ownergroup",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "ownergroup"
        ],
        "def": "CREATE INDEX fk_links_ownergroup ON links USING gin (ownergroup) WHERE ownergroup IS NOT NULL"
      },
      {
        "name": "fk_links_owneruser",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "owneruser"
        ],
        "def": "CREATE INDEX fk_links_owneruser ON links USING gin (owneruser) WHERE owneruser IS NOT NULL"
      },
      {
        "name": "i_links_nofork",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "fork"
        ],
        "def": "CREATE INDEX i_links_nofork ON links USING gin (fork) WHERE fork IS NULL"
      },
      {
        "name": "i_links_noowner",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "ownergroup"
        ],
        "def": "CREATE INDEX i_links_noowner ON links USING gin (ownergroup) WHERE owneruser IS NULL AND ownergroup IS NULL"
      },
      {
        "name": "pk_links",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_links ON links USING btree (\"ID\")"
      },
      {
        "name": "s_links_name",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "name"
        ],
        "def": "CREATE INDEX s_links_name ON links USING gin (name gin_trgm_ops)"
      },
      {
        "name": "s_links_url",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "url"
        ],
        "def": "CREATE INDEX s_links_url ON links USING gin (url gin_trgm_ops) WHERE url::text <> ''::text"
      }
    ],
    "constraints": [
      {
        "name": "c_links_owner",
        "type": "check",
        "domain": false,
        "def": "CHECK (owneruser IS NULL OR ownergroup IS NULL)"
      },
      {
        "name": "c_links_password",
        "type": "check",
        "domain": false,
        "def": "CHECK (password::text = ''::text OR password_encrypted IS NULL)"
      },
      {
        "name": "dc_links_description",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v\\r\\n]|[ \\t\\v\\r\\n]$'::text)"
      },
      {
        "name": "dc_links_name",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^$|^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_links_url",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_links_username",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_links_visibility",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0 AND VALUE <= 2)"
      },
      {
        "name": "dc_links_visits",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0)"
      },
      {
        "name": "fk_links_assigneduser",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (assigneduser) REFERENCES users(\"ID\") ON DELETE SET NULL DEFERRABLE"
      },
      {
        "name": "fk_links_fork",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (fork) REFERENCES forks(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_links_ownergroup",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (ownergroup) REFERENCES groups(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_links_owneruser",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (owneruser) REFERENCES users(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "pk_links",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "logins",
    "type": "table",
    "fields": [
      {
        "name": "user",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "status",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "date",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "logoutdate",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "sessionid",
        "type": "bytea",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "ip",
        "type": "bytea",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "u_logins_user_date",
        "unique": true,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "user",
          "date"
        ],
        "def": "CREATE UNIQUE INDEX u_logins_user_date ON logins USING btree (\"user\", date DESC)"
      }
    ],
    "constraints": [
      {
        "name": "c_logins_sessionid",
        "type": "check",
        "domain": false,
        "def": "CHECK (\nCASE status\n    WHEN 4 THEN sessionid IS NOT NULL\n    ELSE sessionid IS NULL\nEND)"
      },
      {
        "name": "dc_logins_sessionid",
        "type": "check",
        "domain": true,
        "def": "CHECK (bit_length(VALUE) = 160)"
      },
      {
        "name": "dc_logins_status",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0 AND VALUE <= 4)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "mailinglists",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": true,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Mailing list ID"
      },
      {
        "name": "fork",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_mailinglists_fork",
            "table": "forks",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Fork ID (`null` for base module)"
      },
      {
        "name": "owneruser",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_mailinglists_owneruser",
            "table": "users",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Owner user ID (PUBLIC if `owneruser`=`null` and `ownergroup`=`null`)"
      },
      {
        "name": "ownergroup",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_mailinglists_ownergroup",
            "table": "groups",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Owner group ID (PUBLIC if `owneruser`=`null` and `ownergroup`=`null`)"
      },
      {
        "name": "creator",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creator user ID (defaults to authenticated user on creation)"
      },
      {
        "name": "assigneduser",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_mailinglists_assigneduser",
            "table": "users",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Assigned user ID"
      },
      {
        "name": "creationdate",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creation date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (defaults to current date and time on creation)"
      },
      {
        "name": "lastmodified",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Last modification date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (auto-reset on modification)"
      },
      {
        "name": "campaign",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_mailinglists_campaign",
            "table": "campaigns",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Campaign ID"
      },
      {
        "name": "visibility",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Visibility (`0`=REGULAR, `1`=ARCHIVED, `2`=DELETED)"
      },
      {
        "name": "name",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Name"
      },
      {
        "name": "sender",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Sender name and e-mail address"
      },
      {
        "name": "description",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Detailed general description"
      }
    ],
    "indexes": [
      {
        "name": "fk_mailinglists_assigneduser",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "assigneduser"
        ],
        "def": "CREATE INDEX fk_mailinglists_assigneduser ON mailinglists USING gin (assigneduser) WHERE assigneduser IS NOT NULL"
      },
      {
        "name": "fk_mailinglists_campaign",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "campaign"
        ],
        "def": "CREATE INDEX fk_mailinglists_campaign ON mailinglists USING btree (campaign) WHERE campaign IS NOT NULL"
      },
      {
        "name": "fk_mailinglists_fork",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "fork"
        ],
        "def": "CREATE INDEX fk_mailinglists_fork ON mailinglists USING gin (fork) WHERE fork IS NOT NULL"
      },
      {
        "name": "fk_mailinglists_ownergroup",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "ownergroup"
        ],
        "def": "CREATE INDEX fk_mailinglists_ownergroup ON mailinglists USING gin (ownergroup) WHERE ownergroup IS NOT NULL"
      },
      {
        "name": "fk_mailinglists_owneruser",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "owneruser"
        ],
        "def": "CREATE INDEX fk_mailinglists_owneruser ON mailinglists USING gin (owneruser) WHERE owneruser IS NOT NULL"
      },
      {
        "name": "i_mailinglists_nofork",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "fork"
        ],
        "def": "CREATE INDEX i_mailinglists_nofork ON mailinglists USING gin (fork) WHERE fork IS NULL"
      },
      {
        "name": "i_mailinglists_noowner",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "ownergroup"
        ],
        "def": "CREATE INDEX i_mailinglists_noowner ON mailinglists USING gin (ownergroup) WHERE owneruser IS NULL AND ownergroup IS NULL"
      },
      {
        "name": "pk_mailinglists",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_mailinglists ON mailinglists USING btree (\"ID\")"
      },
      {
        "name": "s_mailinglists_name",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "name"
        ],
        "def": "CREATE INDEX s_mailinglists_name ON mailinglists USING gin (name gin_trgm_ops)"
      },
      {
        "name": "s_mailinglists_sender",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "sender"
        ],
        "def": "CREATE INDEX s_mailinglists_sender ON mailinglists USING gin (sender gin_trgm_ops) WHERE sender::text <> ''::text"
      }
    ],
    "constraints": [
      {
        "name": "c_mailinglists_owner",
        "type": "check",
        "domain": false,
        "def": "CHECK (owneruser IS NULL OR ownergroup IS NULL)"
      },
      {
        "name": "dc_mailinglists_description",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v\\r\\n]|[ \\t\\v\\r\\n]$'::text)"
      },
      {
        "name": "dc_mailinglists_name",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^$|^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_mailinglists_sender",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_mailinglists_visibility",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0 AND VALUE <= 2)"
      },
      {
        "name": "fk_mailinglists_assigneduser",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (assigneduser) REFERENCES users(\"ID\") ON DELETE SET NULL DEFERRABLE"
      },
      {
        "name": "fk_mailinglists_campaign",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (campaign) REFERENCES campaigns(\"ID\") ON DELETE SET NULL DEFERRABLE"
      },
      {
        "name": "fk_mailinglists_fork",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (fork) REFERENCES forks(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_mailinglists_ownergroup",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (ownergroup) REFERENCES groups(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_mailinglists_owneruser",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (owneruser) REFERENCES users(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "pk_mailinglists",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "mailingrecipients",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": true,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Mailing recipient ID"
      },
      {
        "name": "creator",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creator user ID (defaults to authenticated user on creation)"
      },
      {
        "name": "creationdate",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creation date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (defaults to current date and time on creation)"
      },
      {
        "name": "lastmodified",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "EXTRACT(epoch FROM now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Last modification date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (auto-reset on modification)"
      },
      {
        "name": "message",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_mailingrecipients_message",
            "table": "messages",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Message ID (**dependency**)"
      },
      {
        "name": "participant",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_mailingrecipients_participant",
            "table": "participants",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Participant ID"
      },
      {
        "name": "email",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "E-mail address"
      }
    ],
    "indexes": [
      {
        "name": "fk_mailingrecipients_message",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "message"
        ],
        "def": "CREATE INDEX fk_mailingrecipients_message ON mailingrecipients USING btree (message)"
      },
      {
        "name": "pk_mailingrecipients",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_mailingrecipients ON mailingrecipients USING btree (\"ID\")"
      },
      {
        "name": "u_mailingrecipients_participant_message",
        "unique": true,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "participant",
          "message"
        ],
        "def": "CREATE UNIQUE INDEX u_mailingrecipients_participant_message ON mailingrecipients USING btree (participant, message) WHERE participant IS NOT NULL"
      }
    ],
    "constraints": [
      {
        "name": "dc_mailingrecipients_email",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^$|^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "fk_mailingrecipients_message",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (message) REFERENCES messages(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_mailingrecipients_participant",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (participant) REFERENCES participants(\"ID\") ON DELETE SET NULL DEFERRABLE"
      },
      {
        "name": "pk_mailingrecipients",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "mailservers",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": true,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Mail server ID"
      },
      {
        "name": "owneruser",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_mailservers_owneruser",
            "table": "users",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Owner user ID (PUBLIC if `owneruser`=`null` and `ownergroup`=`null`)"
      },
      {
        "name": "ownergroup",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_mailservers_ownergroup",
            "table": "groups",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Owner group ID (PUBLIC if `owneruser`=`null` and `ownergroup`=`null`)"
      },
      {
        "name": "creator",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creator user ID (defaults to authenticated user on creation)"
      },
      {
        "name": "creationdate",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creation date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (defaults to current date and time on creation)"
      },
      {
        "name": "lastmodified",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Last modification date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (auto-reset on modification)"
      },
      {
        "name": "recipientuser",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [
          {
            "name": "fk_mailservers_recipientuser",
            "table": "users",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Recipient user ID (PUBLIC if `recipientuser`=`null` and `recipientgroup`=`null`)"
      },
      {
        "name": "recipientgroup",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [
          {
            "name": "fk_mailservers_recipientgroup",
            "table": "groups",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Recipient group ID (PUBLIC if `recipientuser`=`null` and `recipientgroup`=`null`)"
      },
      {
        "name": "autoreplybinfile",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_mailservers_autoreplybinfile",
            "table": "binfiles",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Binary file ID; is read-only (not for `PUT` or `PATCH`)"
      },
      {
        "name": "signaturebinfile",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_mailservers_signaturebinfile",
            "table": "binfiles",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Binary file ID; is read-only (not for `PUT` or `PATCH`)"
      },
      {
        "name": "activity",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Activity (`0`=ACTIVE, `1`=DEACTIVATED, `2`=DELETED)"
      },
      {
        "name": "name",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Name"
      },
      {
        "name": "sender",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Sender name and e-mail address"
      },
      {
        "name": "serverin",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Server (Inbound)"
      },
      {
        "name": "usernamein",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Username (Inbound)"
      },
      {
        "name": "serverout",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Server (Outbound)"
      },
      {
        "name": "usernameout",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Username (Outbound)"
      },
      {
        "name": "description",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Detailed general description"
      },
      {
        "name": "ticketing",
        "type": "json",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "[JSON](https://tools.ietf.org/html/rfc7159)-encoded ticketing data (object)"
      },
      {
        "name": "folders",
        "type": "json",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "[JSON](https://tools.ietf.org/html/rfc7159)-encoded IMAP folders (object)"
      },
      {
        "name": "passwordin",
        "type": "bytea",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "passwordout",
        "type": "bytea",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "fk_mailservers_autoreplybinfile",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "autoreplybinfile"
        ],
        "def": "CREATE INDEX fk_mailservers_autoreplybinfile ON mailservers USING btree (autoreplybinfile) WHERE autoreplybinfile IS NOT NULL"
      },
      {
        "name": "fk_mailservers_ownergroup",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "ownergroup"
        ],
        "def": "CREATE INDEX fk_mailservers_ownergroup ON mailservers USING gin (ownergroup) WHERE ownergroup IS NOT NULL"
      },
      {
        "name": "fk_mailservers_owneruser",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "owneruser"
        ],
        "def": "CREATE INDEX fk_mailservers_owneruser ON mailservers USING gin (owneruser) WHERE owneruser IS NOT NULL"
      },
      {
        "name": "fk_mailservers_signaturebinfile",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "signaturebinfile"
        ],
        "def": "CREATE INDEX fk_mailservers_signaturebinfile ON mailservers USING btree (signaturebinfile) WHERE signaturebinfile IS NOT NULL"
      },
      {
        "name": "i_mailservers_noowner",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "ownergroup"
        ],
        "def": "CREATE INDEX i_mailservers_noowner ON mailservers USING gin (ownergroup) WHERE owneruser IS NULL AND ownergroup IS NULL"
      },
      {
        "name": "pk_mailservers",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_mailservers ON mailservers USING btree (\"ID\")"
      },
      {
        "name": "s_mailservers_name",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "name"
        ],
        "def": "CREATE INDEX s_mailservers_name ON mailservers USING gin (name gin_trgm_ops)"
      },
      {
        "name": "s_mailservers_sender",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "sender"
        ],
        "def": "CREATE INDEX s_mailservers_sender ON mailservers USING gin (sender gin_trgm_ops) WHERE sender::text <> ''::text"
      },
      {
        "name": "s_mailservers_serverin",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "serverin"
        ],
        "def": "CREATE INDEX s_mailservers_serverin ON mailservers USING gin (serverin gin_trgm_ops) WHERE serverin::text <> ''::text"
      },
      {
        "name": "s_mailservers_serverout",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "serverout"
        ],
        "def": "CREATE INDEX s_mailservers_serverout ON mailservers USING gin (serverout gin_trgm_ops) WHERE serverout::text <> ''::text"
      }
    ],
    "constraints": [
      {
        "name": "c_mailservers_owner",
        "type": "check",
        "domain": false,
        "def": "CHECK (owneruser IS NULL OR ownergroup IS NULL)"
      },
      {
        "name": "c_mailservers_recipient",
        "type": "check",
        "domain": false,
        "def": "CHECK (recipientuser IS NULL OR recipientgroup IS NULL)"
      },
      {
        "name": "dc_mailservers_activity",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0 AND VALUE <= 2)"
      },
      {
        "name": "dc_mailservers_description",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v\\r\\n]|[ \\t\\v\\r\\n]$'::text)"
      },
      {
        "name": "dc_mailservers_folders",
        "type": "check",
        "domain": true,
        "def": "CHECK (json_typeof(VALUE) = 'object'::text)"
      },
      {
        "name": "dc_mailservers_name",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^$|^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_mailservers_sender",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_mailservers_serverin",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_mailservers_serverout",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_mailservers_ticketing",
        "type": "check",
        "domain": true,
        "def": "CHECK (json_typeof(VALUE) = 'object'::text AND VALUE::jsonb <> '{}'::jsonb)"
      },
      {
        "name": "dc_mailservers_usernamein",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_mailservers_usernameout",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "fk_mailservers_autoreplybinfile",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (autoreplybinfile) REFERENCES binfiles(\"ID\") DEFERRABLE"
      },
      {
        "name": "fk_mailservers_ownergroup",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (ownergroup) REFERENCES groups(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_mailservers_owneruser",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (owneruser) REFERENCES users(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_mailservers_recipientgroup",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (recipientgroup) REFERENCES groups(\"ID\") ON DELETE SET NULL DEFERRABLE"
      },
      {
        "name": "fk_mailservers_recipientuser",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (recipientuser) REFERENCES users(\"ID\") ON DELETE SET NULL DEFERRABLE"
      },
      {
        "name": "fk_mailservers_signaturebinfile",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (signaturebinfile) REFERENCES binfiles(\"ID\") DEFERRABLE"
      },
      {
        "name": "pk_mailservers",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "messagereads",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": true,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Message-read ID"
      },
      {
        "name": "creator",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_messagereads_creator",
            "table": "users",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Creator user ID (defaults to authenticated user on creation)"
      },
      {
        "name": "creationdate",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creation date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (defaults to current date and time on creation)"
      },
      {
        "name": "lastmodified",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "EXTRACT(epoch FROM now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Last modification date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (auto-reset on modification)"
      },
      {
        "name": "message",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_messagereads_message",
            "table": "messages",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Message ID (**dependency**)"
      }
    ],
    "indexes": [
      {
        "name": "pk_messagereads",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_messagereads ON messagereads USING btree (\"ID\")"
      },
      {
        "name": "u_messagereads_message_creator",
        "unique": true,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "message",
          "creator"
        ],
        "def": "CREATE UNIQUE INDEX u_messagereads_message_creator ON messagereads USING btree (message, creator)"
      }
    ],
    "constraints": [
      {
        "name": "fk_messagereads_creator",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (creator) REFERENCES users(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_messagereads_message",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (message) REFERENCES messages(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "pk_messagereads",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      },
      {
        "name": "u_messagereads_message_creator",
        "type": "unique",
        "domain": false,
        "def": "UNIQUE (message, creator)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "messages",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": true,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Message ID"
      },
      {
        "name": "fork",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_messages_fork",
            "table": "forks",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Fork ID (`null` for base module)"
      },
      {
        "name": "owneruser",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_messages_owneruser",
            "table": "users",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Owner user ID (PUBLIC if `owneruser`=`null` and `ownergroup`=`null`)"
      },
      {
        "name": "ownergroup",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_messages_ownergroup",
            "table": "groups",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Owner group ID (PUBLIC if `owneruser`=`null` and `ownergroup`=`null`)"
      },
      {
        "name": "creator",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creator user ID (defaults to authenticated user on creation)"
      },
      {
        "name": "creationdate",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creation date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (defaults to current date and time on creation)"
      },
      {
        "name": "lastmodified",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Last modification date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (auto-reset on modification)"
      },
      {
        "name": "mailserver",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_messages_mailserver",
            "table": "mailservers",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Mail server ID"
      },
      {
        "name": "ticket",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_messages_ticket",
            "table": "tickets",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Ticket ID; is mutually exclusive to `opportunity`"
      },
      {
        "name": "opportunity",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_messages_opportunity",
            "table": "opportunities",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Opportunity ID; is mutually exclusive to `ticket`"
      },
      {
        "name": "mailinglist",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_messages_mailinglist",
            "table": "mailinglists",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Mailing list ID"
      },
      {
        "name": "reference",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_messages_reference",
            "table": "messages",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Reference message (reply-to) ID; must be distinct from `ID`"
      },
      {
        "name": "binfile",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_messages_binfile",
            "table": "binfiles",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Binary file ID; is read-only (not for `PUT` or `PATCH`)"
      },
      {
        "name": "mailbox",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Type (`0`=INBOX, `1`=DRAFTS, `2`=SENT, `3`=TEMPLATES, `4`=MAILINGS, `5`=ARCHIVE, `6`=TRASH, `7`=JUNK)"
      },
      {
        "name": "verified",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Verified sender e-mail address"
      },
      {
        "name": "date",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Designated date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (defaults to current date and time on creation)"
      },
      {
        "name": "subject",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Subject"
      },
      {
        "name": "sender",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Sender name and e-mail address"
      },
      {
        "name": "sender_email",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Sender e-mail address"
      },
      {
        "name": "sender_name",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Sender name"
      },
      {
        "name": "to",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "All regular recipient names and e-mail addresses"
      },
      {
        "name": "to_email",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "First regular recipient e-mail address"
      },
      {
        "name": "to_name",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "First regular recipient name"
      },
      {
        "name": "to_count",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Number of regular recipients"
      },
      {
        "name": "cc",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "All carbon copy recipient names and e-mail addresses"
      },
      {
        "name": "bcc",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "All blind carbon copy recipient names and e-mail addresses"
      },
      {
        "name": "contenttype",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Content [MIME type](https://en.wikipedia.org/wiki/Media_type) ([RFC 2045](https://tools.ietf.org/html/rfc2045))"
      },
      {
        "name": "text",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Plain text version of content"
      },
      {
        "name": "attachments",
        "type": "text[]",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "[Array](https://www.postgresql.org/docs/current/arrays.html)-encoded attachments (filenames)"
      },
      {
        "name": "senddate",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Scheduled send date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time)"
      },
      {
        "name": "senderror",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Last error message from failure to send"
      },
      {
        "name": "messageid",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": "''",
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "fk_messages_binfile",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "binfile"
        ],
        "def": "CREATE INDEX fk_messages_binfile ON messages USING btree (binfile) WHERE binfile IS NOT NULL"
      },
      {
        "name": "fk_messages_fork",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "fork"
        ],
        "def": "CREATE INDEX fk_messages_fork ON messages USING gin (fork) WHERE fork IS NOT NULL"
      },
      {
        "name": "fk_messages_mailinglist",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "mailinglist"
        ],
        "def": "CREATE INDEX fk_messages_mailinglist ON messages USING gin (mailinglist) WHERE mailinglist IS NOT NULL"
      },
      {
        "name": "fk_messages_mailserver",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "mailserver"
        ],
        "def": "CREATE INDEX fk_messages_mailserver ON messages USING gin (mailserver) WHERE mailserver IS NOT NULL"
      },
      {
        "name": "fk_messages_opportunity",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "opportunity"
        ],
        "def": "CREATE INDEX fk_messages_opportunity ON messages USING btree (opportunity) WHERE opportunity IS NOT NULL"
      },
      {
        "name": "fk_messages_ownergroup",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "ownergroup"
        ],
        "def": "CREATE INDEX fk_messages_ownergroup ON messages USING gin (ownergroup) WHERE ownergroup IS NOT NULL"
      },
      {
        "name": "fk_messages_owneruser",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "owneruser"
        ],
        "def": "CREATE INDEX fk_messages_owneruser ON messages USING gin (owneruser) WHERE owneruser IS NOT NULL"
      },
      {
        "name": "fk_messages_reference",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "reference"
        ],
        "def": "CREATE INDEX fk_messages_reference ON messages USING btree (reference) WHERE reference IS NOT NULL"
      },
      {
        "name": "fk_messages_ticket",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "ticket"
        ],
        "def": "CREATE INDEX fk_messages_ticket ON messages USING btree (ticket) WHERE ticket IS NOT NULL"
      },
      {
        "name": "i_messages_inbox_date",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "date"
        ],
        "def": "CREATE INDEX i_messages_inbox_date ON messages USING btree (date DESC) WHERE mailbox::smallint = 0"
      },
      {
        "name": "i_messages_messageid",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "messageid"
        ],
        "def": "CREATE INDEX i_messages_messageid ON messages USING btree (messageid) WHERE messageid::text <> ''::text"
      },
      {
        "name": "i_messages_nofork",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "fork"
        ],
        "def": "CREATE INDEX i_messages_nofork ON messages USING gin (fork) WHERE fork IS NULL"
      },
      {
        "name": "i_messages_noowner",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "ownergroup"
        ],
        "def": "CREATE INDEX i_messages_noowner ON messages USING gin (ownergroup) WHERE owneruser IS NULL AND ownergroup IS NULL"
      },
      {
        "name": "i_messages_regular_date",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "date"
        ],
        "def": "CREATE INDEX i_messages_regular_date ON messages USING btree (date DESC) WHERE mailbox::smallint > 0 AND mailbox::smallint < 6"
      },
      {
        "name": "i_messages_sendmail",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "mailserver"
        ],
        "def": "CREATE INDEX i_messages_sendmail ON messages USING btree (mailserver) WHERE mailbox::smallint = 1 AND senddate IS NOT NULL"
      },
      {
        "name": "i_messages_trash_date",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "date"
        ],
        "def": "CREATE INDEX i_messages_trash_date ON messages USING btree (date DESC) WHERE mailbox::smallint > 5"
      },
      {
        "name": "pk_messages",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_messages ON messages USING btree (\"ID\")"
      },
      {
        "name": "s_messages_sender",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "sender"
        ],
        "def": "CREATE INDEX s_messages_sender ON messages USING gin (sender gin_trgm_ops) WHERE sender::text <> ''::text"
      },
      {
        "name": "s_messages_subject",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "subject"
        ],
        "def": "CREATE INDEX s_messages_subject ON messages USING gin (subject gin_trgm_ops) WHERE subject::text <> ''::text"
      },
      {
        "name": "s_messages_to",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "to"
        ],
        "def": "CREATE INDEX s_messages_to ON messages USING gin (\"to\" gin_trgm_ops) WHERE \"to\"::text <> ''::text"
      }
    ],
    "constraints": [
      {
        "name": "c_messages_association",
        "type": "check",
        "domain": false,
        "def": "CHECK (ticket IS NULL OR opportunity IS NULL)"
      },
      {
        "name": "c_messages_owner",
        "type": "check",
        "domain": false,
        "def": "CHECK (owneruser IS NULL OR ownergroup IS NULL)"
      },
      {
        "name": "c_messages_reference",
        "type": "check",
        "domain": false,
        "def": "CHECK (\"ID\" IS DISTINCT FROM reference)"
      },
      {
        "name": "c_messages_senderror",
        "type": "check",
        "domain": false,
        "def": "CHECK (senderror::text = ''::text OR senddate IS NOT NULL)"
      },
      {
        "name": "dc_messages_bcc",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v\\r\\n]|[ \\t\\v\\r\\n]$'::text)"
      },
      {
        "name": "dc_messages_cc",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v\\r\\n]|[ \\t\\v\\r\\n]$'::text)"
      },
      {
        "name": "dc_messages_contenttype",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v\\r\\n]|[ \\t\\v\\r\\n]$'::text)"
      },
      {
        "name": "dc_messages_mailbox",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0 AND VALUE <= 7)"
      },
      {
        "name": "dc_messages_sender",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v\\r\\n]|[ \\t\\v\\r\\n]$'::text)"
      },
      {
        "name": "dc_messages_sender_email",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v\\r\\n]|[ \\t\\v\\r\\n]$'::text)"
      },
      {
        "name": "dc_messages_sender_name",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_messages_senderror",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v\\r\\n]|[ \\t\\v\\r\\n]$'::text)"
      },
      {
        "name": "dc_messages_subject",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v\\r\\n]|[ \\t\\v\\r\\n]$'::text)"
      },
      {
        "name": "dc_messages_text",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '[ \\t\\v\\r\\n]$'::text)"
      },
      {
        "name": "dc_messages_to",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v\\r\\n]|[ \\t\\v\\r\\n]$'::text)"
      },
      {
        "name": "dc_messages_to_count",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0)"
      },
      {
        "name": "dc_messages_to_email",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v\\r\\n]|[ \\t\\v\\r\\n]$'::text)"
      },
      {
        "name": "dc_messages_to_name",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "fk_messages_binfile",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (binfile) REFERENCES binfiles(\"ID\") DEFERRABLE"
      },
      {
        "name": "fk_messages_fork",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (fork) REFERENCES forks(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_messages_mailinglist",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (mailinglist) REFERENCES mailinglists(\"ID\") ON DELETE SET NULL DEFERRABLE"
      },
      {
        "name": "fk_messages_mailserver",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (mailserver) REFERENCES mailservers(\"ID\") ON DELETE SET NULL DEFERRABLE"
      },
      {
        "name": "fk_messages_opportunity",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (opportunity) REFERENCES opportunities(\"ID\") ON DELETE SET NULL DEFERRABLE"
      },
      {
        "name": "fk_messages_ownergroup",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (ownergroup) REFERENCES groups(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_messages_owneruser",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (owneruser) REFERENCES users(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_messages_reference",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (reference) REFERENCES messages(\"ID\") ON DELETE SET NULL DEFERRABLE"
      },
      {
        "name": "fk_messages_ticket",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (ticket) REFERENCES tickets(\"ID\") ON DELETE SET NULL DEFERRABLE"
      },
      {
        "name": "pk_messages",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "meta_cities",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "state",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_meta_cities_state",
            "table": "meta_states",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": null
      },
      {
        "name": "name",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "wikidataid",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "latitude",
        "type": "double precision",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "longitude",
        "type": "double precision",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "fk_meta_cities_state",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "state"
        ],
        "def": "CREATE INDEX fk_meta_cities_state ON meta_cities USING gin (state)"
      },
      {
        "name": "pk_meta_cities",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_meta_cities ON meta_cities USING btree (\"ID\")"
      },
      {
        "name": "s_meta_cities_name",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "name"
        ],
        "def": "CREATE INDEX s_meta_cities_name ON meta_cities USING gin (name gin_trgm_ops)"
      }
    ],
    "constraints": [
      {
        "name": "fk_meta_cities_state",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (state) REFERENCES meta_states(\"ID\") DEFERRABLE"
      },
      {
        "name": "pk_meta_cities",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "meta_countries",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "subregion",
        "type": "smallint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_meta_countries_subregion",
            "table": "meta_subregions",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": null
      },
      {
        "name": "currency",
        "type": "smallint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [
          {
            "name": "fk_meta_countries_currency",
            "table": "meta_currencies",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": null
      },
      {
        "name": "tld",
        "type": "smallint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [
          {
            "name": "fk_meta_countries_tld",
            "table": "meta_tlds",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": null
      },
      {
        "name": "iso_alpha2",
        "type": "character varying(2)",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "iso_alpha3",
        "type": "character varying(3)",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "iso_numeric",
        "type": "character varying(3)",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "edgar",
        "type": "character varying(2)",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "fifa",
        "type": "character varying(4)",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "fips",
        "type": "character varying(4)",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "ioc",
        "type": "character varying(3)",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "itu",
        "type": "character varying(3)",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "m49",
        "type": "character varying(3)",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "marc",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "vri",
        "type": "character varying(3)",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "wmo",
        "type": "character varying(2)",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "geonameid",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "wikidataid",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "independent",
        "type": "boolean",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "un",
        "type": "boolean",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "ldc",
        "type": "boolean",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "lldc",
        "type": "boolean",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "sids",
        "type": "boolean",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "flag",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "latitude",
        "type": "double precision",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "longitude",
        "type": "double precision",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "population",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "area",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "capital",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "callingcodes",
        "type": "text[]",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "fk_meta_countries_subregion",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "subregion"
        ],
        "def": "CREATE INDEX fk_meta_countries_subregion ON meta_countries USING gin (subregion) WHERE subregion IS NOT NULL"
      },
      {
        "name": "pk_meta_countries",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_meta_countries ON meta_countries USING btree (\"ID\")"
      },
      {
        "name": "u_meta_countries_iso_alpha2",
        "unique": true,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "iso_alpha2"
        ],
        "def": "CREATE UNIQUE INDEX u_meta_countries_iso_alpha2 ON meta_countries USING btree (iso_alpha2)"
      },
      {
        "name": "u_meta_countries_iso_alpha3",
        "unique": true,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "iso_alpha3"
        ],
        "def": "CREATE UNIQUE INDEX u_meta_countries_iso_alpha3 ON meta_countries USING btree (iso_alpha3)"
      },
      {
        "name": "u_meta_countries_iso_numeric",
        "unique": true,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "iso_numeric"
        ],
        "def": "CREATE UNIQUE INDEX u_meta_countries_iso_numeric ON meta_countries USING btree (iso_numeric) WHERE iso_numeric::text <> ''::text"
      }
    ],
    "constraints": [
      {
        "name": "fk_meta_countries_currency",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (currency) REFERENCES meta_currencies(\"ID\") DEFERRABLE"
      },
      {
        "name": "fk_meta_countries_subregion",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (subregion) REFERENCES meta_subregions(\"ID\") DEFERRABLE"
      },
      {
        "name": "fk_meta_countries_tld",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (tld) REFERENCES meta_tlds(\"ID\") DEFERRABLE"
      },
      {
        "name": "pk_meta_countries",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      },
      {
        "name": "u_meta_countries_iso_alpha2",
        "type": "unique",
        "domain": false,
        "def": "UNIQUE (iso_alpha2)"
      },
      {
        "name": "u_meta_countries_iso_alpha3",
        "type": "unique",
        "domain": false,
        "def": "UNIQUE (iso_alpha3)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "meta_countries_borders",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_meta_countries_borders_id",
            "table": "meta_countries",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": null
      },
      {
        "name": "country",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_meta_countries_borders_language",
            "table": "meta_countries",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "pk_meta_countries_borders",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID",
          "country"
        ],
        "def": "CREATE UNIQUE INDEX pk_meta_countries_borders ON meta_countries_borders USING btree (\"ID\", country)"
      }
    ],
    "constraints": [
      {
        "name": "fk_meta_countries_borders_id",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (\"ID\") REFERENCES meta_countries(\"ID\") DEFERRABLE"
      },
      {
        "name": "fk_meta_countries_borders_language",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (country) REFERENCES meta_countries(\"ID\") DEFERRABLE"
      },
      {
        "name": "pk_meta_countries_borders",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\", country)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "meta_countries_languages",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_meta_countries_languages_id",
            "table": "meta_countries",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": null
      },
      {
        "name": "language",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_meta_countries_languages_language",
            "table": "meta_languages",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": null
      },
      {
        "name": "priority",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "pk_meta_countries_languages",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID",
          "language"
        ],
        "def": "CREATE UNIQUE INDEX pk_meta_countries_languages ON meta_countries_languages USING btree (\"ID\", language)"
      }
    ],
    "constraints": [
      {
        "name": "fk_meta_countries_languages_id",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (\"ID\") REFERENCES meta_countries(\"ID\") DEFERRABLE"
      },
      {
        "name": "fk_meta_countries_languages_language",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (language) REFERENCES meta_languages(\"ID\") DEFERRABLE"
      },
      {
        "name": "pk_meta_countries_languages",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\", language)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "meta_countries_names",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_meta_countries_names_id",
            "table": "meta_countries",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": null
      },
      {
        "name": "language",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_meta_countries_names_language",
            "table": "meta_languages",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": null
      },
      {
        "name": "name",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "formal",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "pk_meta_countries_names",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID",
          "language"
        ],
        "def": "CREATE UNIQUE INDEX pk_meta_countries_names ON meta_countries_names USING btree (\"ID\", language)"
      },
      {
        "name": "s_meta_countries_names_formal",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "formal"
        ],
        "def": "CREATE INDEX s_meta_countries_names_formal ON meta_countries_names USING gin (formal gin_trgm_ops)"
      },
      {
        "name": "s_meta_countries_names_name",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "name"
        ],
        "def": "CREATE INDEX s_meta_countries_names_name ON meta_countries_names USING gin (name gin_trgm_ops)"
      }
    ],
    "constraints": [
      {
        "name": "fk_meta_countries_names_id",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (\"ID\") REFERENCES meta_countries(\"ID\") DEFERRABLE"
      },
      {
        "name": "fk_meta_countries_names_language",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (language) REFERENCES meta_languages(\"ID\") DEFERRABLE"
      },
      {
        "name": "pk_meta_countries_names",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\", language)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "meta_currencies",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "iso_alpha",
        "type": "character varying(3)",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "iso_numeric",
        "type": "character varying(3)",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "fund",
        "type": "boolean",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "decimals",
        "type": "smallint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "symbol",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "withdrawal",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "pk_meta_currencies",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_meta_currencies ON meta_currencies USING btree (\"ID\")"
      },
      {
        "name": "u_meta_currencies_iso_alpha",
        "unique": true,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "iso_alpha"
        ],
        "def": "CREATE UNIQUE INDEX u_meta_currencies_iso_alpha ON meta_currencies USING btree (iso_alpha)"
      },
      {
        "name": "u_meta_currencies_iso_numeric",
        "unique": true,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "iso_numeric"
        ],
        "def": "CREATE UNIQUE INDEX u_meta_currencies_iso_numeric ON meta_currencies USING btree (iso_numeric) WHERE iso_numeric::text <> ''::text"
      }
    ],
    "constraints": [
      {
        "name": "pk_meta_currencies",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      },
      {
        "name": "u_meta_currencies_iso_alpha",
        "type": "unique",
        "domain": false,
        "def": "UNIQUE (iso_alpha)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "meta_currencies_names",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_meta_currencies_names_id",
            "table": "meta_currencies",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": null
      },
      {
        "name": "language",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_meta_currencies_names_language",
            "table": "meta_languages",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": null
      },
      {
        "name": "name",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "pk_meta_currencies_names",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID",
          "language"
        ],
        "def": "CREATE UNIQUE INDEX pk_meta_currencies_names ON meta_currencies_names USING btree (\"ID\", language)"
      },
      {
        "name": "s_meta_currencies_names_name",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "name"
        ],
        "def": "CREATE INDEX s_meta_currencies_names_name ON meta_currencies_names USING gin (name gin_trgm_ops)"
      }
    ],
    "constraints": [
      {
        "name": "fk_meta_currencies_names_id",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (\"ID\") REFERENCES meta_currencies(\"ID\") DEFERRABLE"
      },
      {
        "name": "fk_meta_currencies_names_language",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (language) REFERENCES meta_languages(\"ID\") DEFERRABLE"
      },
      {
        "name": "pk_meta_currencies_names",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\", language)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "meta_languages",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "iso_alpha2",
        "type": "character varying(2)",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "iso_alpha3t",
        "type": "character varying(3)",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "iso_alpha3b",
        "type": "character varying(3)",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "pk_languages",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_languages ON meta_languages USING btree (\"ID\")"
      },
      {
        "name": "u_languages_iso_alpha2",
        "unique": true,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "iso_alpha2"
        ],
        "def": "CREATE UNIQUE INDEX u_languages_iso_alpha2 ON meta_languages USING btree (iso_alpha2) WHERE iso_alpha2::text <> ''::text"
      },
      {
        "name": "u_languages_iso_alpha3b",
        "unique": true,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "iso_alpha3b"
        ],
        "def": "CREATE UNIQUE INDEX u_languages_iso_alpha3b ON meta_languages USING btree (iso_alpha3b)"
      },
      {
        "name": "u_languages_iso_alpha3t",
        "unique": true,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "iso_alpha3t"
        ],
        "def": "CREATE UNIQUE INDEX u_languages_iso_alpha3t ON meta_languages USING btree (iso_alpha3t)"
      }
    ],
    "constraints": [
      {
        "name": "pk_languages",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      },
      {
        "name": "u_languages_iso_alpha3b",
        "type": "unique",
        "domain": false,
        "def": "UNIQUE (iso_alpha3b)"
      },
      {
        "name": "u_languages_iso_alpha3t",
        "type": "unique",
        "domain": false,
        "def": "UNIQUE (iso_alpha3t)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "meta_languages_names",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_meta_languages_names_id",
            "table": "meta_languages",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": null
      },
      {
        "name": "language",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_meta_languages_names_language",
            "table": "meta_languages",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": null
      },
      {
        "name": "name",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "pk_languages_names",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID",
          "language"
        ],
        "def": "CREATE UNIQUE INDEX pk_languages_names ON meta_languages_names USING btree (\"ID\", language)"
      },
      {
        "name": "s_meta_languages_names_name",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "name"
        ],
        "def": "CREATE INDEX s_meta_languages_names_name ON meta_languages_names USING gin (name gin_trgm_ops)"
      }
    ],
    "constraints": [
      {
        "name": "fk_meta_languages_names_id",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (\"ID\") REFERENCES meta_languages(\"ID\") DEFERRABLE"
      },
      {
        "name": "fk_meta_languages_names_language",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (language) REFERENCES meta_languages(\"ID\") DEFERRABLE"
      },
      {
        "name": "pk_languages_names",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\", language)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "meta_modules",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "umi",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "pk_meta_modules",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_meta_modules ON meta_modules USING btree (\"ID\")"
      },
      {
        "name": "u_meta_modules_umi",
        "unique": true,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "umi"
        ],
        "def": "CREATE UNIQUE INDEX u_meta_modules_umi ON meta_modules USING btree (umi)"
      }
    ],
    "constraints": [
      {
        "name": "pk_meta_modules",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      },
      {
        "name": "u_meta_modules_umi",
        "type": "unique",
        "domain": false,
        "def": "UNIQUE (umi)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "meta_modules_names",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_meta_modules_names_id",
            "table": "meta_modules",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": null
      },
      {
        "name": "language",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_meta_modules_names_language",
            "table": "meta_languages",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": null
      },
      {
        "name": "name",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "pk_meta_modules_names",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID",
          "language"
        ],
        "def": "CREATE UNIQUE INDEX pk_meta_modules_names ON meta_modules_names USING btree (\"ID\", language)"
      },
      {
        "name": "s_meta_modules_name",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "name"
        ],
        "def": "CREATE INDEX s_meta_modules_name ON meta_modules_names USING gin (name gin_trgm_ops)"
      }
    ],
    "constraints": [
      {
        "name": "fk_meta_modules_names_id",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (\"ID\") REFERENCES meta_modules(\"ID\") DEFERRABLE"
      },
      {
        "name": "fk_meta_modules_names_language",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (language) REFERENCES meta_languages(\"ID\") DEFERRABLE"
      },
      {
        "name": "pk_meta_modules_names",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\", language)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "meta_postalcodes",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "country",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_meta_postalcodes_country",
            "table": "meta_countries",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": null
      },
      {
        "name": "state",
        "type": "smallint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_meta_postalcodes_state",
            "table": "meta_states",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": null
      },
      {
        "name": "code",
        "type": "character varying(20)",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "place",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "latitude",
        "type": "double precision",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "longitude",
        "type": "double precision",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "fk_meta_postalcodes_country",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "country"
        ],
        "def": "CREATE INDEX fk_meta_postalcodes_country ON meta_postalcodes USING gin (country)"
      },
      {
        "name": "fk_meta_postalcodes_state",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "state"
        ],
        "def": "CREATE INDEX fk_meta_postalcodes_state ON meta_postalcodes USING gin (state) WHERE state IS NOT NULL"
      },
      {
        "name": "i_meta_postalcodes_code",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "code"
        ],
        "def": "CREATE INDEX i_meta_postalcodes_code ON meta_postalcodes USING btree (code text_pattern_ops)"
      },
      {
        "name": "pk_meta_postalcodes",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_meta_postalcodes ON meta_postalcodes USING btree (\"ID\")"
      },
      {
        "name": "s_meta_postalcodes_place",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "place"
        ],
        "def": "CREATE INDEX s_meta_postalcodes_place ON meta_postalcodes USING gin (place gin_trgm_ops)"
      }
    ],
    "constraints": [
      {
        "name": "fk_meta_postalcodes_country",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (country) REFERENCES meta_countries(\"ID\") DEFERRABLE"
      },
      {
        "name": "fk_meta_postalcodes_state",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (state) REFERENCES meta_states(\"ID\") DEFERRABLE"
      },
      {
        "name": "pk_meta_postalcodes",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "meta_regions",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "wikidataid",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "pk_meta_regions",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_meta_regions ON meta_regions USING btree (\"ID\")"
      }
    ],
    "constraints": [
      {
        "name": "pk_meta_regions",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "meta_regions_names",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_meta_regions_names_id",
            "table": "meta_regions",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": null
      },
      {
        "name": "language",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_meta_regions_names_language",
            "table": "meta_languages",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": null
      },
      {
        "name": "name",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "pk_meta_regions_names",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID",
          "language"
        ],
        "def": "CREATE UNIQUE INDEX pk_meta_regions_names ON meta_regions_names USING btree (\"ID\", language)"
      },
      {
        "name": "s_meta_regions_names_name",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "name"
        ],
        "def": "CREATE INDEX s_meta_regions_names_name ON meta_regions_names USING gin (name gin_trgm_ops)"
      }
    ],
    "constraints": [
      {
        "name": "fk_meta_regions_names_id",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (\"ID\") REFERENCES meta_regions(\"ID\") DEFERRABLE"
      },
      {
        "name": "fk_meta_regions_names_language",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (language) REFERENCES meta_languages(\"ID\") DEFERRABLE"
      },
      {
        "name": "pk_meta_regions_names",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\", language)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "meta_states",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "country",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_meta_states_country",
            "table": "meta_countries",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": null
      },
      {
        "name": "code",
        "type": "character varying(5)",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "name",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "latitude",
        "type": "double precision",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "longitude",
        "type": "double precision",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "fk_meta_states_country",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "country"
        ],
        "def": "CREATE INDEX fk_meta_states_country ON meta_states USING gin (country)"
      },
      {
        "name": "pk_meta_states",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_meta_states ON meta_states USING btree (\"ID\")"
      },
      {
        "name": "s_meta_states_name",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "name"
        ],
        "def": "CREATE INDEX s_meta_states_name ON meta_states USING gin (name gin_trgm_ops)"
      },
      {
        "name": "u_meta_states_country_code",
        "unique": true,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "country",
          "code"
        ],
        "def": "CREATE UNIQUE INDEX u_meta_states_country_code ON meta_states USING btree (country, code) WHERE code::text <> ''::text"
      }
    ],
    "constraints": [
      {
        "name": "fk_meta_states_country",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (country) REFERENCES meta_countries(\"ID\") DEFERRABLE"
      },
      {
        "name": "pk_meta_states",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "meta_subregions",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "region",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_meta_subregions_region",
            "table": "meta_regions",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": null
      },
      {
        "name": "wikidataid",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "fk_meta_subregions_region",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "region"
        ],
        "def": "CREATE INDEX fk_meta_subregions_region ON meta_subregions USING btree (region)"
      },
      {
        "name": "pk_meta_subregions",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_meta_subregions ON meta_subregions USING btree (\"ID\")"
      }
    ],
    "constraints": [
      {
        "name": "fk_meta_subregions_region",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (region) REFERENCES meta_regions(\"ID\") DEFERRABLE"
      },
      {
        "name": "pk_meta_subregions",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "meta_subregions_names",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_meta_subregions_names_id",
            "table": "meta_subregions",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": null
      },
      {
        "name": "language",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_meta_subregions_names_language",
            "table": "meta_languages",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": null
      },
      {
        "name": "name",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "pk_meta_subregions_names",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID",
          "language"
        ],
        "def": "CREATE UNIQUE INDEX pk_meta_subregions_names ON meta_subregions_names USING btree (\"ID\", language)"
      },
      {
        "name": "s_meta_subregions_names_name",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "name"
        ],
        "def": "CREATE INDEX s_meta_subregions_names_name ON meta_subregions_names USING gin (name gin_trgm_ops)"
      }
    ],
    "constraints": [
      {
        "name": "fk_meta_subregions_names_id",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (\"ID\") REFERENCES meta_subregions(\"ID\") DEFERRABLE"
      },
      {
        "name": "fk_meta_subregions_names_language",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (language) REFERENCES meta_languages(\"ID\") DEFERRABLE"
      },
      {
        "name": "pk_meta_subregions_names",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\", language)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "meta_taxonomy_cn",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "parents",
        "type": "smallint[]",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "code",
        "type": "character varying(8)",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "pk_meta_taxonomy_cn",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_meta_taxonomy_cn ON meta_taxonomy_cn USING btree (\"ID\")"
      },
      {
        "name": "u_meta_taxonomy_cn_code",
        "unique": true,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "code"
        ],
        "def": "CREATE UNIQUE INDEX u_meta_taxonomy_cn_code ON meta_taxonomy_cn USING btree (code text_pattern_ops) WHERE code::text <> ''::text"
      }
    ],
    "constraints": [
      {
        "name": "pk_meta_taxonomy_cn",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "meta_taxonomy_cn_names",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_meta_taxonomy_cn_names_id",
            "table": "meta_taxonomy_cn",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": null
      },
      {
        "name": "language",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_meta_taxonomy_cn_names_language",
            "table": "meta_languages",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": null
      },
      {
        "name": "name",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "pk_meta_taxonomy_cn_names",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID",
          "language"
        ],
        "def": "CREATE UNIQUE INDEX pk_meta_taxonomy_cn_names ON meta_taxonomy_cn_names USING btree (\"ID\", language)"
      },
      {
        "name": "s_meta_taxonomy_cn_names_name",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "name"
        ],
        "def": "CREATE INDEX s_meta_taxonomy_cn_names_name ON meta_taxonomy_cn_names USING gin (name gin_trgm_ops)"
      }
    ],
    "constraints": [
      {
        "name": "fk_meta_taxonomy_cn_names_id",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (\"ID\") REFERENCES meta_taxonomy_cn(\"ID\") DEFERRABLE"
      },
      {
        "name": "fk_meta_taxonomy_cn_names_language",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (language) REFERENCES meta_languages(\"ID\") DEFERRABLE"
      },
      {
        "name": "pk_meta_taxonomy_cn_names",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\", language)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "meta_taxonomy_cpv",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "parents",
        "type": "smallint[]",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "code",
        "type": "character varying(10)",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "pk_meta_taxonomy_cpv",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_meta_taxonomy_cpv ON meta_taxonomy_cpv USING btree (\"ID\")"
      },
      {
        "name": "u_meta_taxonomy_cpv_code",
        "unique": true,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "code"
        ],
        "def": "CREATE UNIQUE INDEX u_meta_taxonomy_cpv_code ON meta_taxonomy_cpv USING btree (code text_pattern_ops)"
      }
    ],
    "constraints": [
      {
        "name": "pk_meta_taxonomy_cpv",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "meta_taxonomy_cpv_names",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_meta_taxonomy_cpv_names_id",
            "table": "meta_taxonomy_cpv",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": null
      },
      {
        "name": "language",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_meta_taxonomy_cpv_names_language",
            "table": "meta_languages",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": null
      },
      {
        "name": "name",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "pk_meta_taxonomy_cpv_names",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID",
          "language"
        ],
        "def": "CREATE UNIQUE INDEX pk_meta_taxonomy_cpv_names ON meta_taxonomy_cpv_names USING btree (\"ID\", language)"
      },
      {
        "name": "s_meta_taxonomy_cpv_names_name",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "name"
        ],
        "def": "CREATE INDEX s_meta_taxonomy_cpv_names_name ON meta_taxonomy_cpv_names USING gin (name gin_trgm_ops)"
      }
    ],
    "constraints": [
      {
        "name": "fk_meta_taxonomy_cpv_names_id",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (\"ID\") REFERENCES meta_taxonomy_cpv(\"ID\") DEFERRABLE"
      },
      {
        "name": "fk_meta_taxonomy_cpv_names_language",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (language) REFERENCES meta_languages(\"ID\") DEFERRABLE"
      },
      {
        "name": "pk_meta_taxonomy_cpv_names",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\", language)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "meta_taxonomy_google",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "parents",
        "type": "smallint[]",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "code",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "pk_meta_taxonomy_google",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_meta_taxonomy_google ON meta_taxonomy_google USING btree (\"ID\")"
      },
      {
        "name": "u_meta_taxonomy_google_code",
        "unique": true,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "code"
        ],
        "def": "CREATE UNIQUE INDEX u_meta_taxonomy_google_code ON meta_taxonomy_google USING btree (code)"
      }
    ],
    "constraints": [
      {
        "name": "pk_meta_taxonomy_google",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      },
      {
        "name": "u_meta_taxonomy_google_code",
        "type": "unique",
        "domain": false,
        "def": "UNIQUE (code)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "meta_taxonomy_google_names",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_meta_taxonomy_google_names_id",
            "table": "meta_taxonomy_google",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": null
      },
      {
        "name": "language",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_meta_taxonomy_google_names_language",
            "table": "meta_languages",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": null
      },
      {
        "name": "name",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "pk_meta_taxonomy_google_names",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID",
          "language"
        ],
        "def": "CREATE UNIQUE INDEX pk_meta_taxonomy_google_names ON meta_taxonomy_google_names USING btree (\"ID\", language)"
      },
      {
        "name": "s_meta_taxonomy_google_names_name",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "name"
        ],
        "def": "CREATE INDEX s_meta_taxonomy_google_names_name ON meta_taxonomy_google_names USING gin (name gin_trgm_ops)"
      }
    ],
    "constraints": [
      {
        "name": "fk_meta_taxonomy_google_names_id",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (\"ID\") REFERENCES meta_taxonomy_google(\"ID\") DEFERRABLE"
      },
      {
        "name": "fk_meta_taxonomy_google_names_language",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (language) REFERENCES meta_languages(\"ID\") DEFERRABLE"
      },
      {
        "name": "pk_meta_taxonomy_google_names",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\", language)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "meta_taxonomy_gpc",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "parents",
        "type": "smallint[]",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "code",
        "type": "character varying(17)",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "pk_meta_taxonomy_gpc",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_meta_taxonomy_gpc ON meta_taxonomy_gpc USING btree (\"ID\")"
      },
      {
        "name": "u_meta_taxonomy_gpc_code",
        "unique": true,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "code"
        ],
        "def": "CREATE UNIQUE INDEX u_meta_taxonomy_gpc_code ON meta_taxonomy_gpc USING btree (code text_pattern_ops)"
      }
    ],
    "constraints": [
      {
        "name": "pk_meta_taxonomy_gpc",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "meta_taxonomy_gpc_names",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_meta_taxonomy_gpc_names_id",
            "table": "meta_taxonomy_gpc",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": null
      },
      {
        "name": "language",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_meta_taxonomy_gpc_names_language",
            "table": "meta_languages",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": null
      },
      {
        "name": "name",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "definition",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "pk_meta_taxonomy_gpc_names",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID",
          "language"
        ],
        "def": "CREATE UNIQUE INDEX pk_meta_taxonomy_gpc_names ON meta_taxonomy_gpc_names USING btree (\"ID\", language)"
      },
      {
        "name": "s_meta_taxonomy_gpc_names_name",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "name"
        ],
        "def": "CREATE INDEX s_meta_taxonomy_gpc_names_name ON meta_taxonomy_gpc_names USING gin (name gin_trgm_ops)"
      }
    ],
    "constraints": [
      {
        "name": "fk_meta_taxonomy_gpc_names_id",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (\"ID\") REFERENCES meta_taxonomy_gpc(\"ID\") DEFERRABLE"
      },
      {
        "name": "fk_meta_taxonomy_gpc_names_language",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (language) REFERENCES meta_languages(\"ID\") DEFERRABLE"
      },
      {
        "name": "pk_meta_taxonomy_gpc_names",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\", language)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "meta_taxonomy_hts",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "parents",
        "type": "integer[]",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "code",
        "type": "character varying(10)",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "pk_meta_taxonomy_hts",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_meta_taxonomy_hts ON meta_taxonomy_hts USING btree (\"ID\")"
      },
      {
        "name": "u_meta_taxonomy_hts_code",
        "unique": true,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "code"
        ],
        "def": "CREATE UNIQUE INDEX u_meta_taxonomy_hts_code ON meta_taxonomy_hts USING btree (code text_pattern_ops) WHERE code::text <> ''::text"
      }
    ],
    "constraints": [
      {
        "name": "pk_meta_taxonomy_hts",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "meta_taxonomy_hts_names",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_meta_taxonomy_hts_names_id",
            "table": "meta_taxonomy_hts",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": null
      },
      {
        "name": "language",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_meta_taxonomy_hts_names_language",
            "table": "meta_languages",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": null
      },
      {
        "name": "name",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "pk_meta_taxonomy_hts_names",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID",
          "language"
        ],
        "def": "CREATE UNIQUE INDEX pk_meta_taxonomy_hts_names ON meta_taxonomy_hts_names USING btree (\"ID\", language)"
      },
      {
        "name": "s_meta_taxonomy_hts_names_name",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "name"
        ],
        "def": "CREATE INDEX s_meta_taxonomy_hts_names_name ON meta_taxonomy_hts_names USING gin (name gin_trgm_ops)"
      }
    ],
    "constraints": [
      {
        "name": "fk_meta_taxonomy_hts_names_id",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (\"ID\") REFERENCES meta_taxonomy_hts(\"ID\") DEFERRABLE"
      },
      {
        "name": "fk_meta_taxonomy_hts_names_language",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (language) REFERENCES meta_languages(\"ID\") DEFERRABLE"
      },
      {
        "name": "pk_meta_taxonomy_hts_names",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\", language)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "meta_taxonomy_unspsc",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "parents",
        "type": "smallint[]",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "code",
        "type": "character varying(8)",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "pk_meta_taxonomy_unspsc",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_meta_taxonomy_unspsc ON meta_taxonomy_unspsc USING btree (\"ID\")"
      },
      {
        "name": "u_meta_taxonomy_unspsc_code",
        "unique": true,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "code"
        ],
        "def": "CREATE UNIQUE INDEX u_meta_taxonomy_unspsc_code ON meta_taxonomy_unspsc USING btree (code text_pattern_ops)"
      }
    ],
    "constraints": [
      {
        "name": "pk_meta_taxonomy_unspsc",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "meta_taxonomy_unspsc_names",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_meta_taxonomy_unspsc_names_id",
            "table": "meta_taxonomy_unspsc",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": null
      },
      {
        "name": "language",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_meta_taxonomy_unspsc_names_language",
            "table": "meta_languages",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": null
      },
      {
        "name": "name",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "pk_meta_taxonomy_unspsc_names",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID",
          "language"
        ],
        "def": "CREATE UNIQUE INDEX pk_meta_taxonomy_unspsc_names ON meta_taxonomy_unspsc_names USING btree (\"ID\", language)"
      },
      {
        "name": "s_meta_taxonomy_unspsc_names_name",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "name"
        ],
        "def": "CREATE INDEX s_meta_taxonomy_unspsc_names_name ON meta_taxonomy_unspsc_names USING gin (name gin_trgm_ops)"
      }
    ],
    "constraints": [
      {
        "name": "fk_meta_taxonomy_unspsc_names_id",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (\"ID\") REFERENCES meta_taxonomy_unspsc(\"ID\") DEFERRABLE"
      },
      {
        "name": "fk_meta_taxonomy_unspsc_names_language",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (language) REFERENCES meta_languages(\"ID\") DEFERRABLE"
      },
      {
        "name": "pk_meta_taxonomy_unspsc_names",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\", language)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "meta_timezones",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "country",
        "type": "smallint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_meta_timezones_country",
            "table": "meta_countries",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": null
      },
      {
        "name": "name",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "latitude",
        "type": "double precision",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "longitude",
        "type": "double precision",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "comments",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "abbreviations",
        "type": "text[]",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "fk_meta_timezones_country",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "country"
        ],
        "def": "CREATE INDEX fk_meta_timezones_country ON meta_timezones USING gin (country) WHERE country IS NOT NULL"
      },
      {
        "name": "pk_meta_timezones",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_meta_timezones ON meta_timezones USING btree (\"ID\")"
      },
      {
        "name": "s_meta_timezones_name",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "name"
        ],
        "def": "CREATE INDEX s_meta_timezones_name ON meta_timezones USING gin (name gin_trgm_ops)"
      },
      {
        "name": "u_meta_timezones_name",
        "unique": true,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "name"
        ],
        "def": "CREATE UNIQUE INDEX u_meta_timezones_name ON meta_timezones USING btree (name)"
      }
    ],
    "constraints": [
      {
        "name": "fk_meta_timezones_country",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (country) REFERENCES meta_countries(\"ID\") DEFERRABLE"
      },
      {
        "name": "pk_meta_timezones",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      },
      {
        "name": "u_meta_timezones_name",
        "type": "unique",
        "domain": false,
        "def": "UNIQUE (name)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "meta_timezones_offsets",
    "type": "view",
    "fields": [
      {
        "name": "ID",
        "type": "smallint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "country",
        "type": "smallint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "name",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "latitude",
        "type": "double precision",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "longitude",
        "type": "double precision",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "comments",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "abbreviations",
        "type": "text[]",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "offset",
        "type": "interval",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "dst",
        "type": "boolean",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [],
    "constraints": [],
    "triggers": [],
    "rules": [
      {
        "name": "_RETURN",
        "type": "select",
        "instead": true,
        "def": "CREATE RULE \"_RETURN\" AS\n    ON SELECT TO meta_timezones_offsets DO INSTEAD  SELECT m.\"ID\",\n    m.country,\n    m.name,\n    m.latitude,\n    m.longitude,\n    m.comments,\n    m.abbreviations,\n    p.utc_offset AS \"offset\",\n    p.is_dst AS dst\n   FROM meta_timezones m\n     JOIN pg_timezone_names p ON p.name = m.name;"
      }
    ],
    "statistics": [],
    "def": "SELECT m.\"ID\",\n    m.country,\n    m.name,\n    m.latitude,\n    m.longitude,\n    m.comments,\n    m.abbreviations,\n    p.utc_offset AS \"offset\",\n    p.is_dst AS dst\n   FROM meta_timezones m\n     JOIN pg_timezone_names p ON p.name = m.name;"
  },
  {
    "name": "meta_tlds",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "domain",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "suffixes",
        "type": "text[]",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "pk_meta_tlds",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_meta_tlds ON meta_tlds USING btree (\"ID\")"
      },
      {
        "name": "u_meta_tlds_domain",
        "unique": true,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "domain"
        ],
        "def": "CREATE UNIQUE INDEX u_meta_tlds_domain ON meta_tlds USING btree (domain)"
      }
    ],
    "constraints": [
      {
        "name": "pk_meta_tlds",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      },
      {
        "name": "u_meta_tlds_domain",
        "type": "unique",
        "domain": false,
        "def": "UNIQUE (domain)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "meta_units",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "status",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "code",
        "type": "character varying(3)",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "level",
        "type": "character varying(3)",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "name",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "sector",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "quantity",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "conversion",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "symbol",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "description",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "pk_meta_units",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_meta_units ON meta_units USING btree (\"ID\")"
      },
      {
        "name": "s_meta_units_name",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "name"
        ],
        "def": "CREATE INDEX s_meta_units_name ON meta_units USING gin (name gin_trgm_ops)"
      },
      {
        "name": "u_meta_units_code",
        "unique": true,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "code"
        ],
        "def": "CREATE UNIQUE INDEX u_meta_units_code ON meta_units USING btree (code)"
      }
    ],
    "constraints": [
      {
        "name": "pk_meta_units",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      },
      {
        "name": "u_meta_units_code",
        "type": "unique",
        "domain": false,
        "def": "UNIQUE (code)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "notes",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": true,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Note ID"
      },
      {
        "name": "fork",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_notes_fork",
            "table": "forks",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Fork ID (`null` for base module)"
      },
      {
        "name": "owneruser",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_notes_owneruser",
            "table": "users",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Owner user ID (PUBLIC if `owneruser`=`null` and `ownergroup`=`null`)"
      },
      {
        "name": "ownergroup",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_notes_ownergroup",
            "table": "groups",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Owner group ID (PUBLIC if `owneruser`=`null` and `ownergroup`=`null`)"
      },
      {
        "name": "creator",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creator user ID (defaults to authenticated user on creation)"
      },
      {
        "name": "assigneduser",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_notes_assigneduser",
            "table": "users",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Assigned user ID"
      },
      {
        "name": "creationdate",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creation date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (defaults to current date and time on creation)"
      },
      {
        "name": "lastmodified",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Last modification date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (auto-reset on modification)"
      },
      {
        "name": "binfile",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_notes_binfile",
            "table": "binfiles",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Binary file ID; is read-only (not for `PUT` or `PATCH`)"
      },
      {
        "name": "visibility",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Visibility (`0`=REGULAR, `1`=ARCHIVED, `2`=DELETED)"
      },
      {
        "name": "name",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Name"
      },
      {
        "name": "status",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Status (`0`=DRAFT, `1`=FEEDBACKREQUIRED, `2`=INREVISION, `3`=AWAITINGAPPROVAL, `4`=FINAL, `5`=OBSOLETE)"
      },
      {
        "name": "contenttype",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Content [MIME type](https://en.wikipedia.org/wiki/Media_type) ([RFC 2045](https://tools.ietf.org/html/rfc2045))"
      },
      {
        "name": "text",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Plain text version of content"
      },
      {
        "name": "attachments",
        "type": "text[]",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "[Array](https://www.postgresql.org/docs/current/arrays.html)-encoded attachments (filenames)"
      },
      {
        "name": "description",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Detailed general description"
      }
    ],
    "indexes": [
      {
        "name": "fk_notes_assigneduser",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "assigneduser"
        ],
        "def": "CREATE INDEX fk_notes_assigneduser ON notes USING gin (assigneduser) WHERE assigneduser IS NOT NULL"
      },
      {
        "name": "fk_notes_binfile",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "binfile"
        ],
        "def": "CREATE INDEX fk_notes_binfile ON notes USING btree (binfile) WHERE binfile IS NOT NULL"
      },
      {
        "name": "fk_notes_fork",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "fork"
        ],
        "def": "CREATE INDEX fk_notes_fork ON notes USING gin (fork) WHERE fork IS NOT NULL"
      },
      {
        "name": "fk_notes_ownergroup",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "ownergroup"
        ],
        "def": "CREATE INDEX fk_notes_ownergroup ON notes USING gin (ownergroup) WHERE ownergroup IS NOT NULL"
      },
      {
        "name": "fk_notes_owneruser",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "owneruser"
        ],
        "def": "CREATE INDEX fk_notes_owneruser ON notes USING gin (owneruser) WHERE owneruser IS NOT NULL"
      },
      {
        "name": "i_notes_nofork",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "fork"
        ],
        "def": "CREATE INDEX i_notes_nofork ON notes USING gin (fork) WHERE fork IS NULL"
      },
      {
        "name": "i_notes_noowner",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "ownergroup"
        ],
        "def": "CREATE INDEX i_notes_noowner ON notes USING gin (ownergroup) WHERE owneruser IS NULL AND ownergroup IS NULL"
      },
      {
        "name": "pk_notes",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_notes ON notes USING btree (\"ID\")"
      },
      {
        "name": "s_notes_name",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "name"
        ],
        "def": "CREATE INDEX s_notes_name ON notes USING gin (name gin_trgm_ops)"
      }
    ],
    "constraints": [
      {
        "name": "c_notes_owner",
        "type": "check",
        "domain": false,
        "def": "CHECK (owneruser IS NULL OR ownergroup IS NULL)"
      },
      {
        "name": "dc_notes_contenttype",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v\\r\\n]|[ \\t\\v\\r\\n]$'::text)"
      },
      {
        "name": "dc_notes_description",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v\\r\\n]|[ \\t\\v\\r\\n]$'::text)"
      },
      {
        "name": "dc_notes_name",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^$|^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_notes_status",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0 AND VALUE <= 5)"
      },
      {
        "name": "dc_notes_text",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '[ \\t\\v\\r\\n]$'::text)"
      },
      {
        "name": "dc_notes_visibility",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0 AND VALUE <= 2)"
      },
      {
        "name": "fk_notes_assigneduser",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (assigneduser) REFERENCES users(\"ID\") ON DELETE SET NULL DEFERRABLE"
      },
      {
        "name": "fk_notes_binfile",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (binfile) REFERENCES binfiles(\"ID\") DEFERRABLE"
      },
      {
        "name": "fk_notes_fork",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (fork) REFERENCES forks(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_notes_ownergroup",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (ownergroup) REFERENCES groups(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_notes_owneruser",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (owneruser) REFERENCES users(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "pk_notes",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "notifications",
    "type": "table",
    "fields": [
      {
        "name": "user",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "record",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "date",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "flag",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_notifications_user_date_record",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "user",
          "date",
          "record"
        ],
        "def": "CREATE INDEX i_notifications_user_date_record ON notifications USING btree (\"user\", date DESC, record DESC)"
      },
      {
        "name": "pk_notifications",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "user",
          "record"
        ],
        "def": "CREATE UNIQUE INDEX pk_notifications ON notifications USING btree (\"user\", record)"
      }
    ],
    "constraints": [
      {
        "name": "dc_notifications_flag",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0 AND VALUE <= 2)"
      },
      {
        "name": "pk_notifications",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"user\", record)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "numcounters",
    "type": "table",
    "fields": [
      {
        "name": "identifier",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "counter",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "pk_numcounters",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "identifier"
        ],
        "def": "CREATE UNIQUE INDEX pk_numcounters ON numcounters USING btree (identifier)"
      }
    ],
    "constraints": [
      {
        "name": "dc_numcounters_counter",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0)"
      },
      {
        "name": "dc_numcounters_identifier",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE <> ''::text)"
      },
      {
        "name": "pk_numcounters",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (identifier)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "objects",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": true,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Object ID"
      },
      {
        "name": "fork",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_objects_fork",
            "table": "forks",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Fork ID (`null` for base module)"
      },
      {
        "name": "owneruser",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_objects_owneruser",
            "table": "users",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Owner user ID (PUBLIC if `owneruser`=`null` and `ownergroup`=`null`)"
      },
      {
        "name": "ownergroup",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_objects_ownergroup",
            "table": "groups",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Owner group ID (PUBLIC if `owneruser`=`null` and `ownergroup`=`null`)"
      },
      {
        "name": "creator",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creator user ID (defaults to authenticated user on creation)"
      },
      {
        "name": "assigneduser",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_objects_assigneduser",
            "table": "users",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Assigned user ID"
      },
      {
        "name": "creationdate",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creation date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (defaults to current date and time on creation)"
      },
      {
        "name": "lastmodified",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Last modification date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (auto-reset on modification)"
      },
      {
        "name": "binfile",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_objects_binfile",
            "table": "binfiles",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Binary file ID; is read-only (not for `PUT` or `PATCH`)"
      },
      {
        "name": "visibility",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Visibility (`0`=REGULAR, `1`=ARCHIVED, `2`=DELETED)"
      },
      {
        "name": "name",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Name"
      },
      {
        "name": "entity",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Custom entity"
      },
      {
        "name": "date",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "EXTRACT(epoch FROM now())",
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Designated date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (defaults to current date and time on creation)"
      },
      {
        "name": "description",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Detailed general description"
      },
      {
        "name": "data",
        "type": "json",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "[JSON](https://tools.ietf.org/html/rfc7159)-encoded object data (array or object)"
      }
    ],
    "indexes": [
      {
        "name": "fk_objects_assigneduser",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "assigneduser"
        ],
        "def": "CREATE INDEX fk_objects_assigneduser ON objects USING gin (assigneduser) WHERE assigneduser IS NOT NULL"
      },
      {
        "name": "fk_objects_binfile",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "binfile"
        ],
        "def": "CREATE INDEX fk_objects_binfile ON objects USING btree (binfile) WHERE binfile IS NOT NULL"
      },
      {
        "name": "fk_objects_fork",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "fork"
        ],
        "def": "CREATE INDEX fk_objects_fork ON objects USING gin (fork) WHERE fork IS NOT NULL"
      },
      {
        "name": "fk_objects_ownergroup",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "ownergroup"
        ],
        "def": "CREATE INDEX fk_objects_ownergroup ON objects USING gin (ownergroup) WHERE ownergroup IS NOT NULL"
      },
      {
        "name": "fk_objects_owneruser",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "owneruser"
        ],
        "def": "CREATE INDEX fk_objects_owneruser ON objects USING gin (owneruser) WHERE owneruser IS NOT NULL"
      },
      {
        "name": "i_objects_date",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "date"
        ],
        "def": "CREATE INDEX i_objects_date ON objects USING btree (date DESC)"
      },
      {
        "name": "i_objects_entity",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "entity"
        ],
        "def": "CREATE INDEX i_objects_entity ON objects USING gin (entity)"
      },
      {
        "name": "i_objects_nofork",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "fork"
        ],
        "def": "CREATE INDEX i_objects_nofork ON objects USING gin (fork) WHERE fork IS NULL"
      },
      {
        "name": "i_objects_noowner",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "ownergroup"
        ],
        "def": "CREATE INDEX i_objects_noowner ON objects USING gin (ownergroup) WHERE owneruser IS NULL AND ownergroup IS NULL"
      },
      {
        "name": "pk_objects",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_objects ON objects USING btree (\"ID\")"
      },
      {
        "name": "s_objects_name",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "name"
        ],
        "def": "CREATE INDEX s_objects_name ON objects USING gin (name gin_trgm_ops)"
      }
    ],
    "constraints": [
      {
        "name": "c_objects_owner",
        "type": "check",
        "domain": false,
        "def": "CHECK (owneruser IS NULL OR ownergroup IS NULL)"
      },
      {
        "name": "dc_objects_data",
        "type": "check",
        "domain": true,
        "def": "CHECK (json_typeof(VALUE) = ANY (ARRAY['array'::text, 'object'::text]))"
      },
      {
        "name": "dc_objects_description",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v\\r\\n]|[ \\t\\v\\r\\n]$'::text)"
      },
      {
        "name": "dc_objects_entity",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^$|^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_objects_name",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^$|^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_objects_visibility",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0 AND VALUE <= 2)"
      },
      {
        "name": "fk_objects_assigneduser",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (assigneduser) REFERENCES users(\"ID\") ON DELETE SET NULL DEFERRABLE"
      },
      {
        "name": "fk_objects_binfile",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (binfile) REFERENCES binfiles(\"ID\") DEFERRABLE"
      },
      {
        "name": "fk_objects_fork",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (fork) REFERENCES forks(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_objects_ownergroup",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (ownergroup) REFERENCES groups(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_objects_owneruser",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (owneruser) REFERENCES users(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "pk_objects",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "opportunities",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": true,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Opportunity ID"
      },
      {
        "name": "fork",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_opportunities_fork",
            "table": "forks",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Fork ID (`null` for base module)"
      },
      {
        "name": "ownergroup",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_opportunities_ownergroup",
            "table": "groups",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Owner group ID (`null`=PUBLIC)"
      },
      {
        "name": "creator",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creator user ID (defaults to authenticated user on creation)"
      },
      {
        "name": "assigneduser",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_opportunities_assigneduser",
            "table": "users",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Assigned user ID"
      },
      {
        "name": "creationdate",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creation date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (defaults to current date and time on creation)"
      },
      {
        "name": "lastmodified",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Last modification date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (auto-reset on modification)"
      },
      {
        "name": "account",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_opportunities_account",
            "table": "accounts",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Account ID"
      },
      {
        "name": "contact",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_opportunities_contact",
            "table": "contacts",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Contact ID"
      },
      {
        "name": "campaign",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_opportunities_campaign",
            "table": "campaigns",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Campaign ID"
      },
      {
        "name": "visibility",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Visibility (`0`=REGULAR, `1`=ARCHIVED, `2`=DELETED)"
      },
      {
        "name": "name",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Name"
      },
      {
        "name": "opportunitynum",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Opportunity number"
      },
      {
        "name": "date",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "EXTRACT(epoch FROM now())",
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Designated date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (defaults to current date and time on creation)"
      },
      {
        "name": "duedate",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Due date as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time)"
      },
      {
        "name": "status",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Status (`0`=UNEVALUATED, `1`=ELIGIBLE, `2`=FEEDBACKREQUIRED, `3`=INNEGOTIATION, `4`=OFFERED, `5`=ACCEPTED, `6`=REJECTED)"
      },
      {
        "name": "priority",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "2",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Priority (`0`=LOWEST, `1`=LOW, `2`=MEDIUM, `3`=HIGH, `4`=HIGHEST)"
      },
      {
        "name": "probability",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Probability of success in percent; must be `100` for ACCEPTED"
      },
      {
        "name": "worstcase",
        "type": "double precision",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Worst-case monetary outcome"
      },
      {
        "name": "mostlikely",
        "type": "double precision",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Most likely monetary outcome"
      },
      {
        "name": "upside",
        "type": "double precision",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Upside monetary outcome"
      },
      {
        "name": "description",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Detailed general description"
      }
    ],
    "indexes": [
      {
        "name": "fk_opportunities_account",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "account"
        ],
        "def": "CREATE INDEX fk_opportunities_account ON opportunities USING btree (account) WHERE account IS NOT NULL"
      },
      {
        "name": "fk_opportunities_assigneduser",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "assigneduser"
        ],
        "def": "CREATE INDEX fk_opportunities_assigneduser ON opportunities USING gin (assigneduser) WHERE assigneduser IS NOT NULL"
      },
      {
        "name": "fk_opportunities_campaign",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "campaign"
        ],
        "def": "CREATE INDEX fk_opportunities_campaign ON opportunities USING btree (campaign) WHERE campaign IS NOT NULL"
      },
      {
        "name": "fk_opportunities_contact",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "contact"
        ],
        "def": "CREATE INDEX fk_opportunities_contact ON opportunities USING btree (contact) WHERE contact IS NOT NULL"
      },
      {
        "name": "fk_opportunities_fork",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "fork"
        ],
        "def": "CREATE INDEX fk_opportunities_fork ON opportunities USING gin (fork) WHERE fork IS NOT NULL"
      },
      {
        "name": "fk_opportunities_ownergroup",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "ownergroup"
        ],
        "def": "CREATE INDEX fk_opportunities_ownergroup ON opportunities USING gin (ownergroup)"
      },
      {
        "name": "i_opportunities_date",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "date"
        ],
        "def": "CREATE INDEX i_opportunities_date ON opportunities USING btree (date DESC)"
      },
      {
        "name": "i_opportunities_nofork",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "fork"
        ],
        "def": "CREATE INDEX i_opportunities_nofork ON opportunities USING gin (fork) WHERE fork IS NULL"
      },
      {
        "name": "i_opportunities_noowner",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "ownergroup"
        ],
        "def": "CREATE INDEX i_opportunities_noowner ON opportunities USING gin (ownergroup) WHERE ownergroup IS NULL"
      },
      {
        "name": "pk_opportunities",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_opportunities ON opportunities USING btree (\"ID\")"
      },
      {
        "name": "s_opportunities_name",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "name"
        ],
        "def": "CREATE INDEX s_opportunities_name ON opportunities USING gin (name gin_trgm_ops)"
      },
      {
        "name": "s_opportunities_opportunitynum",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "opportunitynum"
        ],
        "def": "CREATE INDEX s_opportunities_opportunitynum ON opportunities USING gin (opportunitynum gin_trgm_ops) WHERE opportunitynum::text <> ''::text"
      }
    ],
    "constraints": [
      {
        "name": "c_opportunities_probability",
        "type": "check",
        "domain": false,
        "def": "CHECK (status::smallint <> 5 OR probability::smallint = 100)"
      },
      {
        "name": "dc_opportunities_description",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v\\r\\n]|[ \\t\\v\\r\\n]$'::text)"
      },
      {
        "name": "dc_opportunities_mostlikely",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0::double precision)"
      },
      {
        "name": "dc_opportunities_name",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^$|^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_opportunities_opportunitynum",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_opportunities_priority",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0 AND VALUE <= 4)"
      },
      {
        "name": "dc_opportunities_probability",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0 AND VALUE <= 100)"
      },
      {
        "name": "dc_opportunities_status",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0 AND VALUE <= 6)"
      },
      {
        "name": "dc_opportunities_upside",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0::double precision)"
      },
      {
        "name": "dc_opportunities_visibility",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0 AND VALUE <= 2)"
      },
      {
        "name": "dc_opportunities_worstcase",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0::double precision)"
      },
      {
        "name": "fk_opportunities_account",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (account) REFERENCES accounts(\"ID\") ON DELETE SET NULL DEFERRABLE"
      },
      {
        "name": "fk_opportunities_assigneduser",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (assigneduser) REFERENCES users(\"ID\") ON DELETE SET NULL DEFERRABLE"
      },
      {
        "name": "fk_opportunities_campaign",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (campaign) REFERENCES campaigns(\"ID\") ON DELETE SET NULL DEFERRABLE"
      },
      {
        "name": "fk_opportunities_contact",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (contact) REFERENCES contacts(\"ID\") ON DELETE SET NULL DEFERRABLE"
      },
      {
        "name": "fk_opportunities_fork",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (fork) REFERENCES forks(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_opportunities_ownergroup",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (ownergroup) REFERENCES groups(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "pk_opportunities",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "participants",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": true,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Particpants ID"
      },
      {
        "name": "creator",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creator user ID (defaults to authenticated user on creation)"
      },
      {
        "name": "creationdate",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creation date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (defaults to current date and time on creation)"
      },
      {
        "name": "lastmodified",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Last modification date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (auto-reset on modification)"
      },
      {
        "name": "mailinglist",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_participants_mailinglist",
            "table": "mailinglists",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Mailing list ID (**dependency**); is mutually exclusive to `campaign` (either one is required)"
      },
      {
        "name": "campaign",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_participants_campaign",
            "table": "campaigns",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Campaign ID (**dependency**); is mutually exclusive to `mailinglist` (either one is required)"
      },
      {
        "name": "contact",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_participants_contact",
            "table": "contacts",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Contact ID"
      },
      {
        "name": "name",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Name"
      },
      {
        "name": "phone",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Phone number"
      },
      {
        "name": "email",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "E-mail address"
      }
    ],
    "indexes": [
      {
        "name": "fk_participants_campaign",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "campaign"
        ],
        "def": "CREATE INDEX fk_participants_campaign ON participants USING gin (campaign) WHERE campaign IS NOT NULL"
      },
      {
        "name": "fk_participants_contact",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "contact"
        ],
        "def": "CREATE INDEX fk_participants_contact ON participants USING btree (contact) WHERE contact IS NOT NULL"
      },
      {
        "name": "fk_participants_mailinglist",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "mailinglist"
        ],
        "def": "CREATE INDEX fk_participants_mailinglist ON participants USING gin (mailinglist) WHERE mailinglist IS NOT NULL"
      },
      {
        "name": "pk_participants",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_participants ON participants USING btree (\"ID\")"
      },
      {
        "name": "s_participants_email",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "email"
        ],
        "def": "CREATE INDEX s_participants_email ON participants USING gin (email gin_trgm_ops) WHERE email::text <> ''::text"
      },
      {
        "name": "s_participants_name",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "name"
        ],
        "def": "CREATE INDEX s_participants_name ON participants USING gin (name gin_trgm_ops)"
      }
    ],
    "constraints": [
      {
        "name": "c_participants_association",
        "type": "check",
        "domain": false,
        "def": "CHECK (num_nonnulls(mailinglist, campaign) = 1)"
      },
      {
        "name": "dc_participants_email",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_participants_name",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^$|^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_participants_phone",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "fk_participants_campaign",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (campaign) REFERENCES campaigns(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_participants_contact",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (contact) REFERENCES contacts(\"ID\") ON DELETE SET NULL DEFERRABLE"
      },
      {
        "name": "fk_participants_mailinglist",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (mailinglist) REFERENCES mailinglists(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "pk_participants",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "payments",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": true,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Payment ID"
      },
      {
        "name": "fork",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_payments_fork",
            "table": "forks",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Fork ID (`null` for base module)"
      },
      {
        "name": "ownergroup",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_payments_ownergroup",
            "table": "groups",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Owner group ID (`null`=PUBLIC)"
      },
      {
        "name": "creator",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creator user ID (defaults to authenticated user on creation)"
      },
      {
        "name": "assigneduser",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_payments_assigneduser",
            "table": "users",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Assigned user ID"
      },
      {
        "name": "creationdate",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creation date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (defaults to current date and time on creation)"
      },
      {
        "name": "lastmodified",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Last modification date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (auto-reset on modification)"
      },
      {
        "name": "ledger",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_payments_ledger",
            "table": "ledgers",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Ledger ID"
      },
      {
        "name": "transaction",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_payments_transaction",
            "table": "transactions",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Transaction ID; is mutually exclusive to `account`"
      },
      {
        "name": "account",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_payments_account",
            "table": "accounts",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Account ID; is mutually exclusive to `transaction`"
      },
      {
        "name": "date",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Designated date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (defaults to current date and time on creation)"
      },
      {
        "name": "subject",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Subject (e.g. bank statement or reference number)"
      },
      {
        "name": "status",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Status (`0`=DRAFT, `1`=COMPLETED, `2`=CANCELLED, `3`=BOOKED)"
      },
      {
        "name": "amount",
        "type": "double precision",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Amount (monetary)"
      },
      {
        "name": "autoadvance",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Auto-advance to next transaction"
      },
      {
        "name": "description",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Detailed general description"
      }
    ],
    "indexes": [
      {
        "name": "fk_payments_account",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "account"
        ],
        "def": "CREATE INDEX fk_payments_account ON payments USING btree (account) WHERE account IS NOT NULL"
      },
      {
        "name": "fk_payments_assigneduser",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "assigneduser"
        ],
        "def": "CREATE INDEX fk_payments_assigneduser ON payments USING gin (assigneduser) WHERE assigneduser IS NOT NULL"
      },
      {
        "name": "fk_payments_fork",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "fork"
        ],
        "def": "CREATE INDEX fk_payments_fork ON payments USING gin (fork) WHERE fork IS NOT NULL"
      },
      {
        "name": "fk_payments_ledger",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "ledger"
        ],
        "def": "CREATE INDEX fk_payments_ledger ON payments USING gin (ledger) WHERE ledger IS NOT NULL"
      },
      {
        "name": "fk_payments_ownergroup",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "ownergroup"
        ],
        "def": "CREATE INDEX fk_payments_ownergroup ON payments USING gin (ownergroup)"
      },
      {
        "name": "fk_payments_transaction",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "transaction"
        ],
        "def": "CREATE INDEX fk_payments_transaction ON payments USING btree (transaction) WHERE transaction IS NOT NULL"
      },
      {
        "name": "i_payments_date",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "date"
        ],
        "def": "CREATE INDEX i_payments_date ON payments USING btree (date DESC)"
      },
      {
        "name": "i_payments_nofork",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "fork"
        ],
        "def": "CREATE INDEX i_payments_nofork ON payments USING gin (fork) WHERE fork IS NULL"
      },
      {
        "name": "i_payments_noowner",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "ownergroup"
        ],
        "def": "CREATE INDEX i_payments_noowner ON payments USING gin (ownergroup) WHERE ownergroup IS NULL"
      },
      {
        "name": "pk_payments",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_payments ON payments USING btree (\"ID\")"
      },
      {
        "name": "s_payments_subject",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "subject"
        ],
        "def": "CREATE INDEX s_payments_subject ON payments USING gin (subject gin_trgm_ops) WHERE subject::text <> ''::text"
      }
    ],
    "constraints": [
      {
        "name": "c_payments_association",
        "type": "check",
        "domain": false,
        "def": "CHECK (transaction IS NULL OR account IS NULL)"
      },
      {
        "name": "dc_payments_description",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v\\r\\n]|[ \\t\\v\\r\\n]$'::text)"
      },
      {
        "name": "dc_payments_status",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0 AND VALUE <= 3)"
      },
      {
        "name": "dc_payments_subject",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "fk_payments_account",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (account) REFERENCES accounts(\"ID\") ON DELETE SET NULL DEFERRABLE"
      },
      {
        "name": "fk_payments_assigneduser",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (assigneduser) REFERENCES users(\"ID\") ON DELETE SET NULL DEFERRABLE"
      },
      {
        "name": "fk_payments_fork",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (fork) REFERENCES forks(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_payments_ledger",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (ledger) REFERENCES ledgers(\"ID\") ON DELETE SET NULL DEFERRABLE"
      },
      {
        "name": "fk_payments_ownergroup",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (ownergroup) REFERENCES groups(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_payments_transaction",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (transaction) REFERENCES transactions(\"ID\") ON DELETE SET NULL DEFERRABLE"
      },
      {
        "name": "pk_payments",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      }
    ],
    "triggers": [
      {
        "name": "td_payments_transaction",
        "type": "after",
        "events": [
          "delete"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftd_payments_transaction",
        "def": "CREATE TRIGGER td_payments_transaction AFTER DELETE ON payments FOR EACH ROW WHEN (old.transaction IS NOT NULL AND (old.status::smallint = ANY (ARRAY[1, 3]))) EXECUTE FUNCTION ftd_payments_transaction()"
      },
      {
        "name": "ti_payments_transaction",
        "type": "after",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "fti_payments_transaction",
        "def": "CREATE TRIGGER ti_payments_transaction AFTER INSERT ON payments FOR EACH ROW WHEN (new.transaction IS NOT NULL AND (new.status::smallint = ANY (ARRAY[1, 3]))) EXECUTE FUNCTION fti_payments_transaction()"
      },
      {
        "name": "tu_payments_transaction",
        "type": "after",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftu_payments_transaction",
        "def": "CREATE TRIGGER tu_payments_transaction AFTER UPDATE OF transaction, status, amount ON payments FOR EACH ROW WHEN ((old.transaction IS NOT NULL OR new.transaction IS NOT NULL) AND (old.transaction IS DISTINCT FROM new.transaction OR old.status::smallint <> new.status::smallint OR old.amount <> new.amount)) EXECUTE FUNCTION ftu_payments_transaction()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "permissions",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": true,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Permission ID"
      },
      {
        "name": "creator",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creator user ID (defaults to authenticated user on creation)"
      },
      {
        "name": "creationdate",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creation date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (defaults to current date and time on creation)"
      },
      {
        "name": "lastmodified",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Last modification date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (auto-reset on modification)"
      },
      {
        "name": "group",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_permissions_group",
            "table": "groups",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Group ID (**dependency**)"
      },
      {
        "name": "fork",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_permissions_fork",
            "table": "forks",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Fork ID; is mutually exclusive to `application` and `identifier` (either one is required)"
      },
      {
        "name": "application",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_permissions_application",
            "table": "applications",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Application ID; is mutually exclusive to `fork` and `identifier` (either one is required)"
      },
      {
        "name": "identifier",
        "type": "character varying(200)",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": "^[a-zA-Z0-9]([a-zA-Z0-9_.-]*[a-zA-Z0-9])?$",
        "description": "Permission identifier (e.g. module); is mutually exclusive to `fork` and `application` (either one is required)"
      },
      {
        "name": "writable",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Allow writing of permission-specific data by group members"
      }
    ],
    "indexes": [
      {
        "name": "fk_permissions_application",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "application"
        ],
        "def": "CREATE INDEX fk_permissions_application ON permissions USING gin (application) WHERE application IS NOT NULL"
      },
      {
        "name": "fk_permissions_fork",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "fork"
        ],
        "def": "CREATE INDEX fk_permissions_fork ON permissions USING gin (fork) WHERE fork IS NOT NULL"
      },
      {
        "name": "pk_permissions",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_permissions ON permissions USING btree (\"ID\")"
      },
      {
        "name": "u_permissions_group_fork_application_identifier",
        "unique": true,
        "nullsdistinct": false,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "group",
          "fork",
          "application",
          "identifier"
        ],
        "def": "CREATE UNIQUE INDEX u_permissions_group_fork_application_identifier ON permissions USING btree (\"group\", fork, application, identifier) NULLS NOT DISTINCT"
      }
    ],
    "constraints": [
      {
        "name": "c_permissions_association",
        "type": "check",
        "domain": false,
        "def": "CHECK (num_nonnulls(fork, application, identifier) = 1)"
      },
      {
        "name": "dc_permissions_identifier",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE::text ~ '^[a-zA-Z0-9]([a-zA-Z0-9_.-]*[a-zA-Z0-9])?$'::text)"
      },
      {
        "name": "fk_permissions_application",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (application) REFERENCES applications(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_permissions_fork",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (fork) REFERENCES forks(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_permissions_group",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (\"group\") REFERENCES groups(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "pk_permissions",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      },
      {
        "name": "u_permissions_group_fork_application_identifier",
        "type": "unique",
        "domain": false,
        "def": "UNIQUE NULLS NOT DISTINCT (\"group\", fork, application, identifier)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "pricelists",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": true,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Price list ID"
      },
      {
        "name": "fork",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_pricelists_fork",
            "table": "forks",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Fork ID (`null` for base module)"
      },
      {
        "name": "ownergroup",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_pricelists_ownergroup",
            "table": "groups",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Owner group ID (`null`=PUBLIC)"
      },
      {
        "name": "creator",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creator user ID (defaults to authenticated user on creation)"
      },
      {
        "name": "creationdate",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creation date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (defaults to current date and time on creation)"
      },
      {
        "name": "lastmodified",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Last modification date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (auto-reset on modification)"
      },
      {
        "name": "activity",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Activity (`0`=ACTIVE, `1`=DEACTIVATED, `2`=DELETED)"
      },
      {
        "name": "name",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Name"
      },
      {
        "name": "type",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Price list type (`0`=BILLING_MIN, `1`=BILLING_MAX, `2`=PROCUREMENT_MIN, `3`=PROCUREMENT_MAX, `4`=PRODUCTION_MIN, `5`=PRODUCTION_MAX)"
      },
      {
        "name": "currency",
        "type": "character varying(3)",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": "^[A-Z]{3}$",
        "description": "Currency code ([ISO 4217](https://en.wikipedia.org/wiki/ISO_4217))"
      },
      {
        "name": "discount",
        "type": "double precision",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Default relative discount in percent"
      },
      {
        "name": "datefrom",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Start date as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time); must be less than or equal to `dateto`"
      },
      {
        "name": "dateto",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "End date as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time); must be greater than or equal to `datefrom`"
      },
      {
        "name": "applytoall",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Apply to all accounts regardless of association via `pricelists2accounts`"
      },
      {
        "name": "description",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Detailed general description"
      }
    ],
    "indexes": [
      {
        "name": "fk_pricelists_fork",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "fork"
        ],
        "def": "CREATE INDEX fk_pricelists_fork ON pricelists USING gin (fork) WHERE fork IS NOT NULL"
      },
      {
        "name": "fk_pricelists_ownergroup",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "ownergroup"
        ],
        "def": "CREATE INDEX fk_pricelists_ownergroup ON pricelists USING gin (ownergroup)"
      },
      {
        "name": "i_pricelists_nofork",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "fork"
        ],
        "def": "CREATE INDEX i_pricelists_nofork ON pricelists USING gin (fork) WHERE fork IS NULL"
      },
      {
        "name": "i_pricelists_noowner",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "ownergroup"
        ],
        "def": "CREATE INDEX i_pricelists_noowner ON pricelists USING gin (ownergroup) WHERE ownergroup IS NULL"
      },
      {
        "name": "pk_pricelists",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_pricelists ON pricelists USING btree (\"ID\")"
      },
      {
        "name": "s_pricelists_name",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "name"
        ],
        "def": "CREATE INDEX s_pricelists_name ON pricelists USING gin (name gin_trgm_ops)"
      }
    ],
    "constraints": [
      {
        "name": "c_pricelists_date",
        "type": "check",
        "domain": false,
        "def": "CHECK (datefrom <= dateto)"
      },
      {
        "name": "dc_pricelists_activity",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0 AND VALUE <= 2)"
      },
      {
        "name": "dc_pricelists_currency",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE::text ~ '^[A-Z]{3}$'::text)"
      },
      {
        "name": "dc_pricelists_description",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v\\r\\n]|[ \\t\\v\\r\\n]$'::text)"
      },
      {
        "name": "dc_pricelists_discount",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= '-100'::integer::double precision AND VALUE <= 100::double precision)"
      },
      {
        "name": "dc_pricelists_name",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^$|^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_pricelists_type",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0 AND VALUE <= 5)"
      },
      {
        "name": "fk_pricelists_fork",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (fork) REFERENCES forks(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_pricelists_ownergroup",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (ownergroup) REFERENCES groups(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "pk_pricelists",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "pricelists2accounts",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": true,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Pricelist-to-account ID"
      },
      {
        "name": "creator",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creator user ID (defaults to authenticated user on creation)"
      },
      {
        "name": "creationdate",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creation date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (defaults to current date and time on creation)"
      },
      {
        "name": "lastmodified",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "EXTRACT(epoch FROM now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Last modification date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (auto-reset on modification)"
      },
      {
        "name": "pricelist",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_pricelists2accounts_pricelist",
            "table": "pricelists",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Price list ID (**dependency**)"
      },
      {
        "name": "account",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_pricelists2accounts_account",
            "table": "accounts",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Account ID (**dependency**)"
      }
    ],
    "indexes": [
      {
        "name": "fk_pricelists2accounts_account",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "account"
        ],
        "def": "CREATE INDEX fk_pricelists2accounts_account ON pricelists2accounts USING btree (account)"
      },
      {
        "name": "pk_pricelists2accounts",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_pricelists2accounts ON pricelists2accounts USING btree (\"ID\")"
      },
      {
        "name": "u_pricelists2accounts_pricelist_account",
        "unique": true,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "pricelist",
          "account"
        ],
        "def": "CREATE UNIQUE INDEX u_pricelists2accounts_pricelist_account ON pricelists2accounts USING btree (pricelist, account)"
      }
    ],
    "constraints": [
      {
        "name": "fk_pricelists2accounts_account",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (account) REFERENCES accounts(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_pricelists2accounts_pricelist",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (pricelist) REFERENCES pricelists(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "pk_pricelists2accounts",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      },
      {
        "name": "u_pricelists2accounts_pricelist_account",
        "type": "unique",
        "domain": false,
        "def": "UNIQUE (pricelist, account)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "prices",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": true,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Price ID"
      },
      {
        "name": "creator",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creator user ID (defaults to authenticated user on creation)"
      },
      {
        "name": "creationdate",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creation date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (defaults to current date and time on creation)"
      },
      {
        "name": "lastmodified",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Last modification date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (auto-reset on modification)"
      },
      {
        "name": "item",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_prices_item",
            "table": "items",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Item ID (**dependency**)"
      },
      {
        "name": "pricelist",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_prices_pricelist",
            "table": "pricelists",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Price list ID (**dependency**)"
      },
      {
        "name": "price",
        "type": "double precision",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Price per unit (`null`=`item.sellingprice` for billing or `null`=`item.purchaseprice` for procurement)"
      },
      {
        "name": "rebate",
        "type": "double precision",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Absolute rebate per unit (applied before `discount`)"
      },
      {
        "name": "discount",
        "type": "double precision",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Relative discount in percent (applied after `rebate`; `null`=`pricelist.discount`)"
      },
      {
        "name": "minamount",
        "type": "double precision",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Minimum amount (quantity)"
      },
      {
        "name": "costprice",
        "type": "double precision",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Cost price per unit (`null`=`item.purchaseprice` for billing)"
      }
    ],
    "indexes": [
      {
        "name": "fk_prices_item",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "item"
        ],
        "def": "CREATE INDEX fk_prices_item ON prices USING btree (item)"
      },
      {
        "name": "fk_prices_pricelist",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "pricelist"
        ],
        "def": "CREATE INDEX fk_prices_pricelist ON prices USING gin (pricelist)"
      },
      {
        "name": "pk_prices",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_prices ON prices USING btree (\"ID\")"
      }
    ],
    "constraints": [
      {
        "name": "dc_prices_discount",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= '-100'::integer::double precision AND VALUE <= 100::double precision)"
      },
      {
        "name": "dc_prices_minamount",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0::double precision)"
      },
      {
        "name": "fk_prices_item",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (item) REFERENCES items(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_prices_pricelist",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (pricelist) REFERENCES pricelists(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "pk_prices",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "projects",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": true,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Project ID"
      },
      {
        "name": "fork",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_projects_fork",
            "table": "forks",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Fork ID (`null` for base module)"
      },
      {
        "name": "owneruser",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_projects_owneruser",
            "table": "users",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Owner user ID (PUBLIC if `owneruser`=`null` and `ownergroup`=`null`)"
      },
      {
        "name": "ownergroup",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_projects_ownergroup",
            "table": "groups",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Owner group ID (PUBLIC if `owneruser`=`null` and `ownergroup`=`null`)"
      },
      {
        "name": "creator",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creator user ID (defaults to authenticated user on creation)"
      },
      {
        "name": "assigneduser",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_projects_assigneduser",
            "table": "users",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Assigned user ID"
      },
      {
        "name": "creationdate",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creation date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (defaults to current date and time on creation)"
      },
      {
        "name": "lastmodified",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Last modification date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (auto-reset on modification)"
      },
      {
        "name": "account",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_projects_account",
            "table": "accounts",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Account ID"
      },
      {
        "name": "visibility",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Visibility (`0`=REGULAR, `1`=ARCHIVED, `2`=DELETED)"
      },
      {
        "name": "name",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Name"
      },
      {
        "name": "projectnum",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Project number"
      },
      {
        "name": "status",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Status (`0`=DRAFT, `1`=NOTSTARTED, `2`=AWAITINGAPPROVAL, `3`=APPROVED, `4`=DISMISSED, `5`=ACTIVE, `6`=INACTIVE, `7`=TESTING, `8`=CANCELLED, `9`=COMPLETED, `10`=FAILED, `11`=BOOKED)"
      },
      {
        "name": "description",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Detailed general description"
      }
    ],
    "indexes": [
      {
        "name": "fk_projects_account",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "account"
        ],
        "def": "CREATE INDEX fk_projects_account ON projects USING btree (account) WHERE account IS NOT NULL"
      },
      {
        "name": "fk_projects_assigneduser",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "assigneduser"
        ],
        "def": "CREATE INDEX fk_projects_assigneduser ON projects USING gin (assigneduser) WHERE assigneduser IS NOT NULL"
      },
      {
        "name": "fk_projects_fork",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "fork"
        ],
        "def": "CREATE INDEX fk_projects_fork ON projects USING gin (fork) WHERE fork IS NOT NULL"
      },
      {
        "name": "fk_projects_ownergroup",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "ownergroup"
        ],
        "def": "CREATE INDEX fk_projects_ownergroup ON projects USING gin (ownergroup) WHERE ownergroup IS NOT NULL"
      },
      {
        "name": "fk_projects_owneruser",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "owneruser"
        ],
        "def": "CREATE INDEX fk_projects_owneruser ON projects USING gin (owneruser) WHERE owneruser IS NOT NULL"
      },
      {
        "name": "i_projects_nofork",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "fork"
        ],
        "def": "CREATE INDEX i_projects_nofork ON projects USING gin (fork) WHERE fork IS NULL"
      },
      {
        "name": "i_projects_noowner",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "ownergroup"
        ],
        "def": "CREATE INDEX i_projects_noowner ON projects USING gin (ownergroup) WHERE owneruser IS NULL AND ownergroup IS NULL"
      },
      {
        "name": "pk_projects",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_projects ON projects USING btree (\"ID\")"
      },
      {
        "name": "s_projects_name",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "name"
        ],
        "def": "CREATE INDEX s_projects_name ON projects USING gin (name gin_trgm_ops)"
      },
      {
        "name": "s_projects_projectnum",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "projectnum"
        ],
        "def": "CREATE INDEX s_projects_projectnum ON projects USING gin (projectnum gin_trgm_ops) WHERE projectnum::text <> ''::text"
      }
    ],
    "constraints": [
      {
        "name": "dc_projects_description",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v\\r\\n]|[ \\t\\v\\r\\n]$'::text)"
      },
      {
        "name": "dc_projects_name",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^$|^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_projects_projectnum",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_projects_status",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0 AND VALUE <= 11)"
      },
      {
        "name": "dc_projects_visibility",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0 AND VALUE <= 2)"
      },
      {
        "name": "fk_projects_account",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (account) REFERENCES accounts(\"ID\") ON DELETE SET NULL DEFERRABLE"
      },
      {
        "name": "fk_projects_assigneduser",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (assigneduser) REFERENCES users(\"ID\") ON DELETE SET NULL DEFERRABLE"
      },
      {
        "name": "fk_projects_fork",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (fork) REFERENCES forks(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_projects_ownergroup",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (ownergroup) REFERENCES groups(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_projects_owneruser",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (owneruser) REFERENCES users(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "pk_projects",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "recent",
    "type": "table",
    "fields": [
      {
        "name": "entity",
        "type": "t_entity",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "user",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "date",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_recent_user_date",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "user",
          "date"
        ],
        "def": "CREATE INDEX i_recent_user_date ON recent USING btree (\"user\", date DESC)"
      },
      {
        "name": "pk_recent",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "user",
          "entity",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_recent ON recent USING btree (\"user\", entity, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_recent",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"user\", entity, index)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "records",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": true,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Record ID"
      },
      {
        "name": "fork",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_records_fork",
            "table": "forks",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Fork ID (`null` for base module); inherited from entity"
      },
      {
        "name": "owneruser",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_records_owneruser",
            "table": "users",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Owner user ID (PUBLIC if `owneruser`=`null` and `ownergroup`=`null`)"
      },
      {
        "name": "ownergroup",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_records_ownergroup",
            "table": "groups",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Owner group ID (PUBLIC if `owneruser`=`null` and `ownergroup`=`null`)"
      },
      {
        "name": "creator",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Creator user ID (defaults to authenticated user on creation)"
      },
      {
        "name": "assigneduser",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_records_assigneduser",
            "table": "users",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Assigned user (recipient) ID; must be distinct from `creator`"
      },
      {
        "name": "creationdate",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creation date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (defaults to current date and time on creation)"
      },
      {
        "name": "lastmodified",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Last modification date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (auto-reset on modification)"
      },
      {
        "name": "entity",
        "type": "t_entity",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Canonical entity"
      },
      {
        "name": "index",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Entity ID; is required if `entity` is not `null`, otherwise must be `null`"
      },
      {
        "name": "channel",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_records_channel",
            "table": "channels",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Channel ID"
      },
      {
        "name": "flag",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Flag (`0`=REGULAR, `1`=ASSOCONLY, `2`=MINDLOGONLY, `3`=MONITOR, `4`=FEED); must be REGULAR or FEED if `entity` is `null`"
      },
      {
        "name": "date",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Designated date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (defaults to current date and time on creation)"
      },
      {
        "name": "stickydate",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Sticky date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time)"
      },
      {
        "name": "sender",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Sender"
      },
      {
        "name": "location",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Location (e.g. coordinates)"
      },
      {
        "name": "text",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Record text ([Markdown](https://en.wikipedia.org/wiki/Markdown) for rich text representation)"
      },
      {
        "name": "meta",
        "type": "json",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "[JSON](https://tools.ietf.org/html/rfc7159)-encoded metadata (object)"
      }
    ],
    "indexes": [
      {
        "name": "fk_records_assigneduser",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "assigneduser"
        ],
        "def": "CREATE INDEX fk_records_assigneduser ON records USING gin (assigneduser) WHERE assigneduser IS NOT NULL"
      },
      {
        "name": "fk_records_channel",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "channel"
        ],
        "def": "CREATE INDEX fk_records_channel ON records USING btree (channel) WHERE channel IS NOT NULL"
      },
      {
        "name": "fk_records_fork",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "fork"
        ],
        "def": "CREATE INDEX fk_records_fork ON records USING gin (fork) WHERE fork IS NOT NULL"
      },
      {
        "name": "fk_records_ownergroup",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "ownergroup"
        ],
        "def": "CREATE INDEX fk_records_ownergroup ON records USING gin (ownergroup) WHERE ownergroup IS NOT NULL"
      },
      {
        "name": "fk_records_owneruser",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "owneruser"
        ],
        "def": "CREATE INDEX fk_records_owneruser ON records USING gin (owneruser) WHERE owneruser IS NOT NULL"
      },
      {
        "name": "i_records_creator",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "creator"
        ],
        "def": "CREATE INDEX i_records_creator ON records USING gin (creator) WHERE creator IS NOT NULL"
      },
      {
        "name": "i_records_date",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "date"
        ],
        "def": "CREATE INDEX i_records_date ON records USING btree (date DESC)"
      },
      {
        "name": "i_records_entity_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "entity",
          "index"
        ],
        "def": "CREATE INDEX i_records_entity_index ON records USING btree (entity, index) WHERE entity IS NOT NULL"
      },
      {
        "name": "i_records_noowner",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "ownergroup"
        ],
        "def": "CREATE INDEX i_records_noowner ON records USING gin (ownergroup) WHERE owneruser IS NULL AND ownergroup IS NULL"
      },
      {
        "name": "i_records_stickydate",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "stickydate"
        ],
        "def": "CREATE INDEX i_records_stickydate ON records USING btree (stickydate DESC) WHERE stickydate IS NOT NULL"
      },
      {
        "name": "pk_records",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_records ON records USING btree (\"ID\")"
      },
      {
        "name": "s_records_sender",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "sender"
        ],
        "def": "CREATE INDEX s_records_sender ON records USING gin (sender gin_trgm_ops) WHERE flag::smallint <> 3 AND sender::text <> ''::text"
      },
      {
        "name": "s_records_text",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "text"
        ],
        "def": "CREATE INDEX s_records_text ON records USING gin (text gin_trgm_ops) WHERE flag::smallint <> 3 AND text::text <> ''::text"
      }
    ],
    "constraints": [
      {
        "name": "c_records_association",
        "type": "check",
        "domain": false,
        "def": "CHECK (\nCASE\n    WHEN entity IS NULL THEN index IS NULL AND (flag::smallint = ANY (ARRAY[0, 4]))\n    ELSE (entity <> ALL (ARRAY['couponcodes'::t_entity, 'participants'::t_entity, 'records'::t_entity, 'stocktransactions'::t_entity])) AND index IS NOT NULL\nEND)"
      },
      {
        "name": "c_records_owner",
        "type": "check",
        "domain": false,
        "def": "CHECK ((owneruser IS NULL OR ownergroup IS NULL) AND (assigneduser IS NULL OR creator IS DISTINCT FROM assigneduser))"
      },
      {
        "name": "dc_records_flag",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0 AND VALUE <= 4)"
      },
      {
        "name": "dc_records_location",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_records_meta",
        "type": "check",
        "domain": true,
        "def": "CHECK (json_typeof(VALUE) = 'object'::text)"
      },
      {
        "name": "dc_records_sender",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_records_text",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '[ \\t\\v\\r\\n]$'::text)"
      },
      {
        "name": "fk_records_assigneduser",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (assigneduser) REFERENCES users(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_records_channel",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (channel) REFERENCES channels(\"ID\") ON DELETE SET NULL DEFERRABLE"
      },
      {
        "name": "fk_records_fork",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (fork) REFERENCES forks(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_records_ownergroup",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (ownergroup) REFERENCES groups(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_records_owneruser",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (owneruser) REFERENCES users(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "pk_records",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "relateditems",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": true,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Component ID"
      },
      {
        "name": "creator",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creator user ID (defaults to authenticated user on creation)"
      },
      {
        "name": "creationdate",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "EXTRACT(epoch FROM now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creation date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (defaults to current date and time on creation)"
      },
      {
        "name": "lastmodified",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "EXTRACT(epoch FROM now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Last modification date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (auto-reset on modification)"
      },
      {
        "name": "item",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_relateditems_item",
            "table": "items",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Item ID (**dependency**)"
      },
      {
        "name": "relateditem",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_relateditems_relateditem",
            "table": "items",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Related item ID; must be distinct from `item`"
      },
      {
        "name": "relation",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Relation"
      }
    ],
    "indexes": [
      {
        "name": "fk_relateditems_relateditem",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "relateditem"
        ],
        "def": "CREATE INDEX fk_relateditems_relateditem ON relateditems USING btree (relateditem)"
      },
      {
        "name": "pk_relateditems",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_relateditems ON relateditems USING btree (\"ID\")"
      },
      {
        "name": "u_relateditems_item_relateditem",
        "unique": true,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "item",
          "relateditem"
        ],
        "def": "CREATE UNIQUE INDEX u_relateditems_item_relateditem ON relateditems USING btree (item, relateditem)"
      }
    ],
    "constraints": [
      {
        "name": "c_relateditems_relateditem",
        "type": "check",
        "domain": false,
        "def": "CHECK (item IS DISTINCT FROM relateditem)"
      },
      {
        "name": "dc_relateditems_relation",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "fk_relateditems_item",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (item) REFERENCES items(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_relateditems_relateditem",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (relateditem) REFERENCES items(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "pk_relateditems",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      },
      {
        "name": "u_relateditems_item_relateditem",
        "type": "unique",
        "domain": false,
        "def": "UNIQUE (item, relateditem)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "resources",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": true,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Resource ID"
      },
      {
        "name": "creator",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creator user ID (defaults to authenticated user on creation)"
      },
      {
        "name": "creationdate",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creation date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (defaults to current date and time on creation)"
      },
      {
        "name": "lastmodified",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Last modification date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (auto-reset on modification)"
      },
      {
        "name": "application",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_resources_application",
            "table": "applications",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Application ID (`null`=STANDALONE)"
      },
      {
        "name": "activity",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Activity (`0`=ACTIVE, `1`=DEACTIVATED, `2`=DELETED)"
      },
      {
        "name": "name",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Name"
      },
      {
        "name": "identifier",
        "type": "character varying(200)",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": "^[a-zA-Z0-9]([a-zA-Z0-9_.-]*[a-zA-Z0-9])?$",
        "description": "Unique resource identifier"
      },
      {
        "name": "mimetype",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": "'text/x-zymba'",
        "indexed": false,
        "fkeys": [],
        "pattern": "^[a-z]+/[^ \\t\\v\\r\\n]+$",
        "description": "[MIME type](https://en.wikipedia.org/wiki/Media_type) ([RFC 2045](https://tools.ietf.org/html/rfc2045))"
      },
      {
        "name": "public",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Publicly accessible"
      },
      {
        "name": "binfile",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_resources_binfile",
            "table": "binfiles",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "fk_resources_application",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "application"
        ],
        "def": "CREATE INDEX fk_resources_application ON resources USING gin (application) WHERE application IS NOT NULL"
      },
      {
        "name": "fk_resources_binfile",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "binfile"
        ],
        "def": "CREATE INDEX fk_resources_binfile ON resources USING btree (binfile) WHERE binfile IS NOT NULL"
      },
      {
        "name": "pk_resources",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_resources ON resources USING btree (\"ID\")"
      },
      {
        "name": "s_resources_identifier",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "identifier"
        ],
        "def": "CREATE INDEX s_resources_identifier ON resources USING gin (identifier gin_trgm_ops)"
      },
      {
        "name": "s_resources_name",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "name"
        ],
        "def": "CREATE INDEX s_resources_name ON resources USING gin (name gin_trgm_ops)"
      },
      {
        "name": "u_resources_identifier",
        "unique": true,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "identifier"
        ],
        "def": "CREATE UNIQUE INDEX u_resources_identifier ON resources USING btree (identifier)"
      }
    ],
    "constraints": [
      {
        "name": "dc_resources_activity",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0 AND VALUE <= 2)"
      },
      {
        "name": "dc_resources_identifier",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE::text ~ '^[a-zA-Z0-9]([a-zA-Z0-9_.-]*[a-zA-Z0-9])?$'::text)"
      },
      {
        "name": "dc_resources_mimetype",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE ~ '^[a-z]+\\/[^ \\t\\v\\r\\n]+$'::text)"
      },
      {
        "name": "dc_resources_name",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^$|^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "fk_resources_application",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (application) REFERENCES applications(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_resources_binfile",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (binfile) REFERENCES binfiles(\"ID\") DEFERRABLE"
      },
      {
        "name": "pk_resources",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      },
      {
        "name": "u_resources_identifier",
        "type": "unique",
        "domain": false,
        "def": "UNIQUE (identifier)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "services",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": true,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Service ID"
      },
      {
        "name": "creator",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creator user ID (defaults to authenticated user on creation)"
      },
      {
        "name": "creationdate",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creation date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (defaults to current date and time on creation)"
      },
      {
        "name": "lastmodified",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Last modification date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (auto-reset on modification)"
      },
      {
        "name": "application",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_services_application",
            "table": "applications",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Application ID (`null`=STANDALONE)"
      },
      {
        "name": "activity",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Activity (`0`=ACTIVE, `1`=DEACTIVATED, `2`=DELETED)"
      },
      {
        "name": "name",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Name"
      },
      {
        "name": "identifier",
        "type": "character varying(200)",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": "^[a-zA-Z0-9]([a-zA-Z0-9_.-]*[a-zA-Z0-9])?$",
        "description": "Unique service identifier"
      },
      {
        "name": "type",
        "type": "smallint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Service type (`0`=TIMING, `1`=REMOTECALL, `2`=AFTER_CREATION, `3`=BEFORE_MODIFICATION, `4`=AFTER_MODIFICATION, `5`=AFTER_CREATION_MODIFICATION, `6`=BEFORE_DELETION, `7`=AFTER_DELETION)"
      },
      {
        "name": "entity",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Canonical entity; only for AFTER_CREATION, BEFORE_MODIFICATION, AFTER_MODIFICATION, AFTER_CREATION_MODIFICATION, BEFORE_DELETION or AFTER_DELETION"
      },
      {
        "name": "schedule",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Schedule as a minute of each day; only for TIMING"
      },
      {
        "name": "interval",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "1",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Interval in minutes; only for TIMING"
      },
      {
        "name": "mimetype",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": "'text/x-zymba'",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "[MIME type](https://en.wikipedia.org/wiki/Media_type) ([RFC 2045](https://tools.ietf.org/html/rfc2045))"
      },
      {
        "name": "binfile",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_services_binfile",
            "table": "binfiles",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": null
      },
      {
        "name": "url",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "accesskey",
        "type": "bytea",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "fk_services_application",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "application"
        ],
        "def": "CREATE INDEX fk_services_application ON services USING gin (application) WHERE application IS NOT NULL"
      },
      {
        "name": "fk_services_binfile",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "binfile"
        ],
        "def": "CREATE INDEX fk_services_binfile ON services USING btree (binfile) WHERE binfile IS NOT NULL"
      },
      {
        "name": "pk_services",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_services ON services USING btree (\"ID\")"
      },
      {
        "name": "s_services_identifier",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "identifier"
        ],
        "def": "CREATE INDEX s_services_identifier ON services USING gin (identifier gin_trgm_ops)"
      },
      {
        "name": "s_services_name",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "name"
        ],
        "def": "CREATE INDEX s_services_name ON services USING gin (name gin_trgm_ops)"
      },
      {
        "name": "u_services_identifier",
        "unique": true,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "identifier"
        ],
        "def": "CREATE UNIQUE INDEX u_services_identifier ON services USING btree (identifier)"
      }
    ],
    "constraints": [
      {
        "name": "c_services_type",
        "type": "check",
        "domain": false,
        "def": "CHECK ((accesskey IS NULL OR type::smallint = 1) AND (entity::text = ''::text OR type::smallint >= 2))"
      },
      {
        "name": "dc_services_activity",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0 AND VALUE <= 2)"
      },
      {
        "name": "dc_services_entity",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_services_identifier",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE::text ~ '^[a-zA-Z0-9]([a-zA-Z0-9_.-]*[a-zA-Z0-9])?$'::text)"
      },
      {
        "name": "dc_services_interval",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 1 AND VALUE <= 1440)"
      },
      {
        "name": "dc_services_mimetype",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE = ANY (ARRAY['application/ixml+xml'::text, 'text/x-zymba'::text]))"
      },
      {
        "name": "dc_services_name",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^$|^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_services_schedule",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0)"
      },
      {
        "name": "dc_services_type",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0 AND VALUE <= 7)"
      },
      {
        "name": "dc_services_url",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "fk_services_application",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (application) REFERENCES applications(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_services_binfile",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (binfile) REFERENCES binfiles(\"ID\") DEFERRABLE"
      },
      {
        "name": "pk_services",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      },
      {
        "name": "u_services_identifier",
        "type": "unique",
        "domain": false,
        "def": "UNIQUE (identifier)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "stocktransactions",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": true,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Stock transaction ID"
      },
      {
        "name": "creator",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creator user ID (defaults to authenticated user on creation)"
      },
      {
        "name": "creationdate",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creation date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (defaults to current date and time on creation)"
      },
      {
        "name": "lastmodified",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Last modification date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (auto-reset on modification)"
      },
      {
        "name": "item",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_stocktransactions_item",
            "table": "items",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Item ID (**dependency**)"
      },
      {
        "name": "storage",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_stocktransactions_storage",
            "table": "storages",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Storage ID"
      },
      {
        "name": "transaction",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_stocktransactions_transaction",
            "table": "transactions",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Transaction ID"
      },
      {
        "name": "transfer",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_stocktransactions_transfer",
            "table": "stocktransactions",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Transfer stock transaction ID; must be distinct from `ID` and `null` for RESERVED"
      },
      {
        "name": "flag",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Flag (`0`=BOOKED, `1`=RESERVED, `2`=CANCELLED)"
      },
      {
        "name": "date",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Designated date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (defaults to current date and time on creation)"
      },
      {
        "name": "chargenum",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Charge (lot) number"
      },
      {
        "name": "location",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Physical location (e.g. shelf identification)"
      },
      {
        "name": "reference",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Reference identification"
      },
      {
        "name": "amount",
        "type": "double precision",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Amount (quantity); must not be zero (greater than zero if `transfer` is not `null`)"
      },
      {
        "name": "sellingprice",
        "type": "double precision",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Selling price per unit"
      },
      {
        "name": "purchaseprice",
        "type": "double precision",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Purchase price per unit"
      },
      {
        "name": "serials",
        "type": "text[]",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "[Array](https://www.postgresql.org/docs/current/arrays.html)-encoded serial numbers"
      },
      {
        "name": "subtransactions",
        "type": "bigint[]",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "[Array](https://www.postgresql.org/docs/current/arrays.html)-encoded sub-transaction IDs"
      }
    ],
    "indexes": [
      {
        "name": "fk_stocktransactions_item",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "item"
        ],
        "def": "CREATE INDEX fk_stocktransactions_item ON stocktransactions USING btree (item)"
      },
      {
        "name": "fk_stocktransactions_storage",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "storage"
        ],
        "def": "CREATE INDEX fk_stocktransactions_storage ON stocktransactions USING gin (storage) WHERE storage IS NOT NULL"
      },
      {
        "name": "fk_stocktransactions_transaction",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "transaction"
        ],
        "def": "CREATE INDEX fk_stocktransactions_transaction ON stocktransactions USING btree (transaction) WHERE transaction IS NOT NULL"
      },
      {
        "name": "i_stocktransactions_date",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "date"
        ],
        "def": "CREATE INDEX i_stocktransactions_date ON stocktransactions USING btree (date DESC)"
      },
      {
        "name": "i_stocktransactions_reservations",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "transaction"
        ],
        "def": "CREATE INDEX i_stocktransactions_reservations ON stocktransactions USING btree (transaction) WHERE transaction IS NOT NULL AND flag::smallint = 1"
      },
      {
        "name": "i_stocktransactions_serials",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "serials"
        ],
        "def": "CREATE INDEX i_stocktransactions_serials ON stocktransactions USING gin (serials) WHERE serials IS NOT NULL"
      },
      {
        "name": "pk_stocktransactions",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_stocktransactions ON stocktransactions USING btree (\"ID\")"
      },
      {
        "name": "s_stocktransactions_chargenum",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "chargenum"
        ],
        "def": "CREATE INDEX s_stocktransactions_chargenum ON stocktransactions USING gin (chargenum gin_trgm_ops) WHERE chargenum::text <> ''::text"
      },
      {
        "name": "s_stocktransactions_reference",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "reference"
        ],
        "def": "CREATE INDEX s_stocktransactions_reference ON stocktransactions USING gin (reference gin_trgm_ops) WHERE reference::text <> ''::text"
      },
      {
        "name": "s_stocktransactions_serials",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "f_safe_array_to_string(serials, ' ')"
        ],
        "def": "CREATE INDEX s_stocktransactions_serials ON stocktransactions USING gin (f_safe_array_to_string(serials, ' '::text) gin_trgm_ops) WHERE serials IS NOT NULL"
      },
      {
        "name": "u_stocktransactions_transfer",
        "unique": true,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "transfer"
        ],
        "def": "CREATE UNIQUE INDEX u_stocktransactions_transfer ON stocktransactions USING btree (transfer) WHERE transfer IS NOT NULL"
      }
    ],
    "constraints": [
      {
        "name": "c_stocktransactions_transfer",
        "type": "check",
        "domain": false,
        "def": "CHECK (transfer IS NULL OR \"ID\" <> transfer AND flag::smallint <> 1 AND amount::double precision > 0::double precision)"
      },
      {
        "name": "dc_stocktransactions_amount",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE <> 0::double precision)"
      },
      {
        "name": "dc_stocktransactions_chargenum",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_stocktransactions_flag",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0 AND VALUE <= 2)"
      },
      {
        "name": "dc_stocktransactions_location",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_stocktransactions_reference",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "fk_stocktransactions_item",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (item) REFERENCES items(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_stocktransactions_storage",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (storage) REFERENCES storages(\"ID\") ON DELETE SET NULL DEFERRABLE"
      },
      {
        "name": "fk_stocktransactions_transaction",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (transaction) REFERENCES transactions(\"ID\") ON DELETE SET NULL DEFERRABLE"
      },
      {
        "name": "fk_stocktransactions_transfer",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (transfer) REFERENCES stocktransactions(\"ID\") ON DELETE SET NULL DEFERRABLE"
      },
      {
        "name": "pk_stocktransactions",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      }
    ],
    "triggers": [
      {
        "name": "td_stocktransactions_serials",
        "type": "before",
        "events": [
          "delete"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftd_stocktransactions_serials",
        "def": "CREATE TRIGGER td_stocktransactions_serials BEFORE DELETE ON stocktransactions FOR EACH ROW WHEN (pg_trigger_depth() = 0 AND old.flag::smallint = 0 AND (old.chargenum::text <> ''::text AND old.amount::double precision > 0::double precision OR old.serials IS NOT NULL)) EXECUTE FUNCTION ftd_stocktransactions_serials()"
      },
      {
        "name": "ti_stocktransactions_item",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_stocktransactions_item",
        "def": "CREATE TRIGGER ti_stocktransactions_item BEFORE INSERT ON stocktransactions FOR EACH ROW EXECUTE FUNCTION ftiu_stocktransactions_item()"
      },
      {
        "name": "ti_stocktransactions_serials",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "fti_stocktransactions_serials",
        "def": "CREATE TRIGGER ti_stocktransactions_serials BEFORE INSERT ON stocktransactions FOR EACH ROW EXECUTE FUNCTION fti_stocktransactions_serials()"
      },
      {
        "name": "ti_stocktransactions_subtransactions",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_stocktransactions_subtransactions",
        "def": "CREATE TRIGGER ti_stocktransactions_subtransactions BEFORE INSERT ON stocktransactions FOR EACH ROW WHEN (new.subtransactions IS NOT NULL) EXECUTE FUNCTION ftiu_stocktransactions_subtransactions()"
      },
      {
        "name": "ti_stocktransactions_transfer",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "fti_stocktransactions_transfer",
        "def": "CREATE TRIGGER ti_stocktransactions_transfer BEFORE INSERT ON stocktransactions FOR EACH ROW WHEN (new.transfer IS NOT NULL) EXECUTE FUNCTION fti_stocktransactions_transfer()"
      },
      {
        "name": "tu_stocktransactions_item",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_stocktransactions_item",
        "def": "CREATE TRIGGER tu_stocktransactions_item BEFORE UPDATE OF item ON stocktransactions FOR EACH ROW WHEN (old.item IS DISTINCT FROM new.item) EXECUTE FUNCTION ftiu_stocktransactions_item()"
      },
      {
        "name": "tu_stocktransactions_serials",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftu_stocktransactions_serials",
        "def": "CREATE TRIGGER tu_stocktransactions_serials BEFORE UPDATE OF item, storage, transfer, flag, date, chargenum, amount, serials ON stocktransactions FOR EACH ROW WHEN (pg_trigger_depth() = 0 AND (old.item IS DISTINCT FROM new.item OR old.storage IS DISTINCT FROM new.storage OR old.transfer IS DISTINCT FROM new.transfer OR old.flag::smallint <> new.flag::smallint OR old.date::bigint <> new.date::bigint OR old.chargenum::text <> new.chargenum::text OR old.amount::double precision <> new.amount::double precision OR old.serials IS DISTINCT FROM new.serials)) EXECUTE FUNCTION ftu_stocktransactions_serials()"
      },
      {
        "name": "tu_stocktransactions_subtransactions",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_stocktransactions_subtransactions",
        "def": "CREATE TRIGGER tu_stocktransactions_subtransactions BEFORE UPDATE OF subtransactions ON stocktransactions FOR EACH ROW WHEN (new.subtransactions IS NOT NULL AND old.subtransactions IS DISTINCT FROM new.subtransactions) EXECUTE FUNCTION ftiu_stocktransactions_subtransactions()"
      },
      {
        "name": "tu_stocktransactions_transfer",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftu_stocktransactions_transfer",
        "def": "CREATE TRIGGER tu_stocktransactions_transfer BEFORE UPDATE OF item, transfer, chargenum, amount, serials ON stocktransactions FOR EACH ROW WHEN (old.item IS DISTINCT FROM new.item OR old.transfer IS DISTINCT FROM new.transfer OR old.chargenum::text <> new.chargenum::text OR old.amount::double precision <> new.amount::double precision OR old.serials IS DISTINCT FROM new.serials) EXECUTE FUNCTION ftu_stocktransactions_transfer()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "storages",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": true,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Storage ID"
      },
      {
        "name": "fork",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_storages_fork",
            "table": "forks",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Fork ID (`null` for base module)"
      },
      {
        "name": "ownergroup",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_storages_ownergroup",
            "table": "groups",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Owner group ID (`null`=PUBLIC)"
      },
      {
        "name": "creator",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creator user ID (defaults to authenticated user on creation)"
      },
      {
        "name": "creationdate",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creation date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (defaults to current date and time on creation)"
      },
      {
        "name": "lastmodified",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Last modification date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (auto-reset on modification)"
      },
      {
        "name": "visibility",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Visibility (`0`=REGULAR, `1`=ARCHIVED, `2`=DELETED)"
      },
      {
        "name": "name",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Name"
      },
      {
        "name": "description",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Detailed general description"
      }
    ],
    "indexes": [
      {
        "name": "fk_storages_fork",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "fork"
        ],
        "def": "CREATE INDEX fk_storages_fork ON storages USING gin (fork) WHERE fork IS NOT NULL"
      },
      {
        "name": "fk_storages_ownergroup",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "ownergroup"
        ],
        "def": "CREATE INDEX fk_storages_ownergroup ON storages USING gin (ownergroup)"
      },
      {
        "name": "i_storages_nofork",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "fork"
        ],
        "def": "CREATE INDEX i_storages_nofork ON storages USING gin (fork) WHERE fork IS NULL"
      },
      {
        "name": "i_storages_noowner",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "ownergroup"
        ],
        "def": "CREATE INDEX i_storages_noowner ON storages USING gin (ownergroup) WHERE ownergroup IS NULL"
      },
      {
        "name": "pk_storages",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_storages ON storages USING btree (\"ID\")"
      },
      {
        "name": "s_storages_name",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "name"
        ],
        "def": "CREATE INDEX s_storages_name ON storages USING gin (name gin_trgm_ops)"
      }
    ],
    "constraints": [
      {
        "name": "dc_storages_description",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v\\r\\n]|[ \\t\\v\\r\\n]$'::text)"
      },
      {
        "name": "dc_storages_name",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^$|^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_storages_visibility",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0 AND VALUE <= 2)"
      },
      {
        "name": "fk_storages_fork",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (fork) REFERENCES forks(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_storages_ownergroup",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (ownergroup) REFERENCES groups(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "pk_storages",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "suppliers",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": true,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Supplier ID"
      },
      {
        "name": "creator",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creator user ID (defaults to authenticated user on creation)"
      },
      {
        "name": "creationdate",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creation date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (defaults to current date and time on creation)"
      },
      {
        "name": "lastmodified",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Last modification date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (auto-reset on modification)"
      },
      {
        "name": "item",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_suppliers_item",
            "table": "items",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Item ID (**dependency**)"
      },
      {
        "name": "account",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_suppliers_account",
            "table": "accounts",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Account ID (**dependency**)"
      },
      {
        "name": "itemnum",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Supplier item number (SKU)"
      },
      {
        "name": "price",
        "type": "double precision",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Supplier price per unit"
      },
      {
        "name": "taxrate",
        "type": "double precision",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Supplier tax rate in percent"
      },
      {
        "name": "minamount",
        "type": "double precision",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Minimum order amount (quantity)"
      },
      {
        "name": "deliverytime",
        "type": "smallint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Expected delivery time in days"
      },
      {
        "name": "stock",
        "type": "double precision",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Expected stock/inventory amount (quantity)"
      }
    ],
    "indexes": [
      {
        "name": "fk_suppliers_account",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "account"
        ],
        "def": "CREATE INDEX fk_suppliers_account ON suppliers USING gin (account)"
      },
      {
        "name": "pk_suppliers",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_suppliers ON suppliers USING btree (\"ID\")"
      },
      {
        "name": "s_suppliers_itemnum",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "itemnum"
        ],
        "def": "CREATE INDEX s_suppliers_itemnum ON suppliers USING gin (itemnum gin_trgm_ops) WHERE itemnum::text <> ''::text"
      },
      {
        "name": "u_suppliers_item_account",
        "unique": true,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "item",
          "account"
        ],
        "def": "CREATE UNIQUE INDEX u_suppliers_item_account ON suppliers USING btree (item, account)"
      }
    ],
    "constraints": [
      {
        "name": "dc_suppliers_deliverytime",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0)"
      },
      {
        "name": "dc_suppliers_itemnum",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_suppliers_minamount",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0::double precision)"
      },
      {
        "name": "dc_suppliers_taxrate",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0::double precision AND VALUE <= 100::double precision)"
      },
      {
        "name": "fk_suppliers_account",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (account) REFERENCES accounts(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_suppliers_item",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (item) REFERENCES items(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "pk_suppliers",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      },
      {
        "name": "u_suppliers_item_account",
        "type": "unique",
        "domain": false,
        "def": "UNIQUE (item, account)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "tagnames",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": true,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "entity",
        "type": "t_entity",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "name",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "pk_tagnames",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_tagnames ON tagnames USING btree (\"ID\")"
      },
      {
        "name": "u_tagnames_entity_name",
        "unique": true,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "entity",
          "name",
          "+ID"
        ],
        "def": "CREATE UNIQUE INDEX u_tagnames_entity_name ON tagnames USING btree (entity, name text_pattern_ops) INCLUDE (\"ID\")"
      }
    ],
    "constraints": [
      {
        "name": "c_tagnames_entity",
        "type": "check",
        "domain": false,
        "def": "CHECK (entity <> ALL (ARRAY['couponcodes'::t_entity, 'participants'::t_entity, 'records'::t_entity, 'stocktransactions'::t_entity]))"
      },
      {
        "name": "dc_tagnames_name",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^$|^[ \\t\\v/]|[ \\t\\v/]$|[\\r\\n]|//'::text)"
      },
      {
        "name": "pk_tagnames",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      }
    ],
    "triggers": [
      {
        "name": "tu_tagnames_entity",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ft_integrity",
        "def": "CREATE TRIGGER tu_tagnames_entity BEFORE UPDATE ON tagnames FOR EACH ROW WHEN (old.entity <> new.entity) EXECUTE FUNCTION ft_integrity()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "tagrels",
    "type": "view",
    "fields": [
      {
        "name": "entity",
        "type": "t_entity",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "name",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [],
    "constraints": [],
    "triggers": [
      {
        "name": "td_tagrels",
        "type": "instead_of",
        "events": [
          "delete"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftd_tagrels",
        "def": "CREATE TRIGGER td_tagrels INSTEAD OF DELETE ON tagrels FOR EACH ROW EXECUTE FUNCTION ftd_tagrels()"
      },
      {
        "name": "ti_tagrels",
        "type": "instead_of",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "fti_tagrels",
        "def": "CREATE TRIGGER ti_tagrels INSTEAD OF INSERT ON tagrels FOR EACH ROW EXECUTE FUNCTION fti_tagrels()"
      },
      {
        "name": "tu_tagrels",
        "type": "instead_of",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftu_tagrels",
        "def": "CREATE TRIGGER tu_tagrels INSTEAD OF UPDATE ON tagrels FOR EACH ROW EXECUTE FUNCTION ftu_tagrels()"
      }
    ],
    "rules": [
      {
        "name": "_RETURN",
        "type": "select",
        "instead": true,
        "def": "CREATE RULE \"_RETURN\" AS\n    ON SELECT TO tagrels DO INSTEAD  SELECT 'accounts'::t_entity AS entity,\n    tagrels_accounts.name,\n    tagrels_accounts.index\n   FROM tagrels_accounts\nUNION ALL\n SELECT 'actionsteps'::t_entity AS entity,\n    tagrels_actionsteps.name,\n    tagrels_actionsteps.index\n   FROM tagrels_actionsteps\nUNION ALL\n SELECT 'applications'::t_entity AS entity,\n    tagrels_applications.name,\n    tagrels_applications.index\n   FROM tagrels_applications\nUNION ALL\n SELECT 'appointments'::t_entity AS entity,\n    tagrels_appointments.name,\n    tagrels_appointments.index\n   FROM tagrels_appointments\nUNION ALL\n SELECT 'campaigns'::t_entity AS entity,\n    tagrels_campaigns.name,\n    tagrels_campaigns.index\n   FROM tagrels_campaigns\nUNION ALL\n SELECT 'channels'::t_entity AS entity,\n    tagrels_channels.name,\n    tagrels_channels.index\n   FROM tagrels_channels\nUNION ALL\n SELECT 'contacts'::t_entity AS entity,\n    tagrels_contacts.name,\n    tagrels_contacts.index\n   FROM tagrels_contacts\nUNION ALL\n SELECT 'contracts'::t_entity AS entity,\n    tagrels_contracts.name,\n    tagrels_contracts.index\n   FROM tagrels_contracts\nUNION ALL\n SELECT 'coupons'::t_entity AS entity,\n    tagrels_coupons.name,\n    tagrels_coupons.index\n   FROM tagrels_coupons\nUNION ALL\n SELECT 'customfields'::t_entity AS entity,\n    tagrels_customfields.name,\n    tagrels_customfields.index\n   FROM tagrels_customfields\nUNION ALL\n SELECT 'davservers'::t_entity AS entity,\n    tagrels_davservers.name,\n    tagrels_davservers.index\n   FROM tagrels_davservers\nUNION ALL\n SELECT 'devices'::t_entity AS entity,\n    tagrels_devices.name,\n    tagrels_devices.index\n   FROM tagrels_devices\nUNION ALL\n SELECT 'documents'::t_entity AS entity,\n    tagrels_documents.name,\n    tagrels_documents.index\n   FROM tagrels_documents\nUNION ALL\n SELECT 'dunning'::t_entity AS entity,\n    tagrels_dunning.name,\n    tagrels_dunning.index\n   FROM tagrels_dunning\nUNION ALL\n SELECT 'feedservers'::t_entity AS entity,\n    tagrels_feedservers.name,\n    tagrels_feedservers.index\n   FROM tagrels_feedservers\nUNION ALL\n SELECT 'forks'::t_entity AS entity,\n    tagrels_forks.name,\n    tagrels_forks.index\n   FROM tagrels_forks\nUNION ALL\n SELECT 'groups'::t_entity AS entity,\n    tagrels_groups.name,\n    tagrels_groups.index\n   FROM tagrels_groups\nUNION ALL\n SELECT 'items'::t_entity AS entity,\n    tagrels_items.name,\n    tagrels_items.index\n   FROM tagrels_items\nUNION ALL\n SELECT 'ledgers'::t_entity AS entity,\n    tagrels_ledgers.name,\n    tagrels_ledgers.index\n   FROM tagrels_ledgers\nUNION ALL\n SELECT 'links'::t_entity AS entity,\n    tagrels_links.name,\n    tagrels_links.index\n   FROM tagrels_links\nUNION ALL\n SELECT 'mailinglists'::t_entity AS entity,\n    tagrels_mailinglists.name,\n    tagrels_mailinglists.index\n   FROM tagrels_mailinglists\nUNION ALL\n SELECT 'mailservers'::t_entity AS entity,\n    tagrels_mailservers.name,\n    tagrels_mailservers.index\n   FROM tagrels_mailservers\nUNION ALL\n SELECT 'messages'::t_entity AS entity,\n    tagrels_messages.name,\n    tagrels_messages.index\n   FROM tagrels_messages\nUNION ALL\n SELECT 'notes'::t_entity AS entity,\n    tagrels_notes.name,\n    tagrels_notes.index\n   FROM tagrels_notes\nUNION ALL\n SELECT 'objects'::t_entity AS entity,\n    tagrels_objects.name,\n    tagrels_objects.index\n   FROM tagrels_objects\nUNION ALL\n SELECT 'opportunities'::t_entity AS entity,\n    tagrels_opportunities.name,\n    tagrels_opportunities.index\n   FROM tagrels_opportunities\nUNION ALL\n SELECT 'payments'::t_entity AS entity,\n    tagrels_payments.name,\n    tagrels_payments.index\n   FROM tagrels_payments\nUNION ALL\n SELECT 'pricelists'::t_entity AS entity,\n    tagrels_pricelists.name,\n    tagrels_pricelists.index\n   FROM tagrels_pricelists\nUNION ALL\n SELECT 'projects'::t_entity AS entity,\n    tagrels_projects.name,\n    tagrels_projects.index\n   FROM tagrels_projects\nUNION ALL\n SELECT 'resources'::t_entity AS entity,\n    tagrels_resources.name,\n    tagrels_resources.index\n   FROM tagrels_resources\nUNION ALL\n SELECT 'services'::t_entity AS entity,\n    tagrels_services.name,\n    tagrels_services.index\n   FROM tagrels_services\nUNION ALL\n SELECT 'storages'::t_entity AS entity,\n    tagrels_storages.name,\n    tagrels_storages.index\n   FROM tagrels_storages\nUNION ALL\n SELECT 'tasks'::t_entity AS entity,\n    tagrels_tasks.name,\n    tagrels_tasks.index\n   FROM tagrels_tasks\nUNION ALL\n SELECT 'tickets'::t_entity AS entity,\n    tagrels_tickets.name,\n    tagrels_tickets.index\n   FROM tagrels_tickets\nUNION ALL\n SELECT 'transactions'::t_entity AS entity,\n    tagrels_transactions.name,\n    tagrels_transactions.index\n   FROM tagrels_transactions\nUNION ALL\n SELECT 'users'::t_entity AS entity,\n    tagrels_users.name,\n    tagrels_users.index\n   FROM tagrels_users\nUNION ALL\n SELECT 'weblets'::t_entity AS entity,\n    tagrels_weblets.name,\n    tagrels_weblets.index\n   FROM tagrels_weblets;"
      }
    ],
    "statistics": [],
    "def": "SELECT 'accounts'::t_entity AS entity,\n    tagrels_accounts.name,\n    tagrels_accounts.index\n   FROM tagrels_accounts\nUNION ALL\n SELECT 'actionsteps'::t_entity AS entity,\n    tagrels_actionsteps.name,\n    tagrels_actionsteps.index\n   FROM tagrels_actionsteps\nUNION ALL\n SELECT 'applications'::t_entity AS entity,\n    tagrels_applications.name,\n    tagrels_applications.index\n   FROM tagrels_applications\nUNION ALL\n SELECT 'appointments'::t_entity AS entity,\n    tagrels_appointments.name,\n    tagrels_appointments.index\n   FROM tagrels_appointments\nUNION ALL\n SELECT 'campaigns'::t_entity AS entity,\n    tagrels_campaigns.name,\n    tagrels_campaigns.index\n   FROM tagrels_campaigns\nUNION ALL\n SELECT 'channels'::t_entity AS entity,\n    tagrels_channels.name,\n    tagrels_channels.index\n   FROM tagrels_channels\nUNION ALL\n SELECT 'contacts'::t_entity AS entity,\n    tagrels_contacts.name,\n    tagrels_contacts.index\n   FROM tagrels_contacts\nUNION ALL\n SELECT 'contracts'::t_entity AS entity,\n    tagrels_contracts.name,\n    tagrels_contracts.index\n   FROM tagrels_contracts\nUNION ALL\n SELECT 'coupons'::t_entity AS entity,\n    tagrels_coupons.name,\n    tagrels_coupons.index\n   FROM tagrels_coupons\nUNION ALL\n SELECT 'customfields'::t_entity AS entity,\n    tagrels_customfields.name,\n    tagrels_customfields.index\n   FROM tagrels_customfields\nUNION ALL\n SELECT 'davservers'::t_entity AS entity,\n    tagrels_davservers.name,\n    tagrels_davservers.index\n   FROM tagrels_davservers\nUNION ALL\n SELECT 'devices'::t_entity AS entity,\n    tagrels_devices.name,\n    tagrels_devices.index\n   FROM tagrels_devices\nUNION ALL\n SELECT 'documents'::t_entity AS entity,\n    tagrels_documents.name,\n    tagrels_documents.index\n   FROM tagrels_documents\nUNION ALL\n SELECT 'dunning'::t_entity AS entity,\n    tagrels_dunning.name,\n    tagrels_dunning.index\n   FROM tagrels_dunning\nUNION ALL\n SELECT 'feedservers'::t_entity AS entity,\n    tagrels_feedservers.name,\n    tagrels_feedservers.index\n   FROM tagrels_feedservers\nUNION ALL\n SELECT 'forks'::t_entity AS entity,\n    tagrels_forks.name,\n    tagrels_forks.index\n   FROM tagrels_forks\nUNION ALL\n SELECT 'groups'::t_entity AS entity,\n    tagrels_groups.name,\n    tagrels_groups.index\n   FROM tagrels_groups\nUNION ALL\n SELECT 'items'::t_entity AS entity,\n    tagrels_items.name,\n    tagrels_items.index\n   FROM tagrels_items\nUNION ALL\n SELECT 'ledgers'::t_entity AS entity,\n    tagrels_ledgers.name,\n    tagrels_ledgers.index\n   FROM tagrels_ledgers\nUNION ALL\n SELECT 'links'::t_entity AS entity,\n    tagrels_links.name,\n    tagrels_links.index\n   FROM tagrels_links\nUNION ALL\n SELECT 'mailinglists'::t_entity AS entity,\n    tagrels_mailinglists.name,\n    tagrels_mailinglists.index\n   FROM tagrels_mailinglists\nUNION ALL\n SELECT 'mailservers'::t_entity AS entity,\n    tagrels_mailservers.name,\n    tagrels_mailservers.index\n   FROM tagrels_mailservers\nUNION ALL\n SELECT 'messages'::t_entity AS entity,\n    tagrels_messages.name,\n    tagrels_messages.index\n   FROM tagrels_messages\nUNION ALL\n SELECT 'notes'::t_entity AS entity,\n    tagrels_notes.name,\n    tagrels_notes.index\n   FROM tagrels_notes\nUNION ALL\n SELECT 'objects'::t_entity AS entity,\n    tagrels_objects.name,\n    tagrels_objects.index\n   FROM tagrels_objects\nUNION ALL\n SELECT 'opportunities'::t_entity AS entity,\n    tagrels_opportunities.name,\n    tagrels_opportunities.index\n   FROM tagrels_opportunities\nUNION ALL\n SELECT 'payments'::t_entity AS entity,\n    tagrels_payments.name,\n    tagrels_payments.index\n   FROM tagrels_payments\nUNION ALL\n SELECT 'pricelists'::t_entity AS entity,\n    tagrels_pricelists.name,\n    tagrels_pricelists.index\n   FROM tagrels_pricelists\nUNION ALL\n SELECT 'projects'::t_entity AS entity,\n    tagrels_projects.name,\n    tagrels_projects.index\n   FROM tagrels_projects\nUNION ALL\n SELECT 'resources'::t_entity AS entity,\n    tagrels_resources.name,\n    tagrels_resources.index\n   FROM tagrels_resources\nUNION ALL\n SELECT 'services'::t_entity AS entity,\n    tagrels_services.name,\n    tagrels_services.index\n   FROM tagrels_services\nUNION ALL\n SELECT 'storages'::t_entity AS entity,\n    tagrels_storages.name,\n    tagrels_storages.index\n   FROM tagrels_storages\nUNION ALL\n SELECT 'tasks'::t_entity AS entity,\n    tagrels_tasks.name,\n    tagrels_tasks.index\n   FROM tagrels_tasks\nUNION ALL\n SELECT 'tickets'::t_entity AS entity,\n    tagrels_tickets.name,\n    tagrels_tickets.index\n   FROM tagrels_tickets\nUNION ALL\n SELECT 'transactions'::t_entity AS entity,\n    tagrels_transactions.name,\n    tagrels_transactions.index\n   FROM tagrels_transactions\nUNION ALL\n SELECT 'users'::t_entity AS entity,\n    tagrels_users.name,\n    tagrels_users.index\n   FROM tagrels_users\nUNION ALL\n SELECT 'weblets'::t_entity AS entity,\n    tagrels_weblets.name,\n    tagrels_weblets.index\n   FROM tagrels_weblets;"
  },
  {
    "name": "tagrels_accounts",
    "type": "table",
    "fields": [
      {
        "name": "name",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_tagrels_accounts_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_tagrels_accounts_index ON tagrels_accounts USING btree (index)"
      },
      {
        "name": "pk_tagrels_accounts",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "name",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_tagrels_accounts ON tagrels_accounts USING btree (name, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_tagrels_accounts",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (name, index)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "tagrels_actionsteps",
    "type": "table",
    "fields": [
      {
        "name": "name",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_tagrels_actionsteps_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_tagrels_actionsteps_index ON tagrels_actionsteps USING btree (index)"
      },
      {
        "name": "pk_tagrels_actionsteps",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "name",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_tagrels_actionsteps ON tagrels_actionsteps USING btree (name, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_tagrels_actionsteps",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (name, index)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "tagrels_applications",
    "type": "table",
    "fields": [
      {
        "name": "name",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_tagrels_applications_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_tagrels_applications_index ON tagrels_applications USING btree (index)"
      },
      {
        "name": "pk_tagrels_applications",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "name",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_tagrels_applications ON tagrels_applications USING btree (name, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_tagrels_applications",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (name, index)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "tagrels_appointments",
    "type": "table",
    "fields": [
      {
        "name": "name",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_tagrels_appointments_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_tagrels_appointments_index ON tagrels_appointments USING btree (index)"
      },
      {
        "name": "pk_tagrels_appointments",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "name",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_tagrels_appointments ON tagrels_appointments USING btree (name, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_tagrels_appointments",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (name, index)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "tagrels_campaigns",
    "type": "table",
    "fields": [
      {
        "name": "name",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_tagrels_campaigns_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_tagrels_campaigns_index ON tagrels_campaigns USING btree (index)"
      },
      {
        "name": "pk_tagrels_campaigns",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "name",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_tagrels_campaigns ON tagrels_campaigns USING btree (name, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_tagrels_campaigns",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (name, index)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "tagrels_channels",
    "type": "table",
    "fields": [
      {
        "name": "name",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_tagrels_channels_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_tagrels_channels_index ON tagrels_channels USING btree (index)"
      },
      {
        "name": "pk_tagrels_channels",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "name",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_tagrels_channels ON tagrels_channels USING btree (name, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_tagrels_channels",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (name, index)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "tagrels_contacts",
    "type": "table",
    "fields": [
      {
        "name": "name",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_tagrels_contacts_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_tagrels_contacts_index ON tagrels_contacts USING btree (index)"
      },
      {
        "name": "pk_tagrels_contacts",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "name",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_tagrels_contacts ON tagrels_contacts USING btree (name, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_tagrels_contacts",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (name, index)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "tagrels_contracts",
    "type": "table",
    "fields": [
      {
        "name": "name",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_tagrels_contracts_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_tagrels_contracts_index ON tagrels_contracts USING btree (index)"
      },
      {
        "name": "pk_tagrels_contracts",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "name",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_tagrels_contracts ON tagrels_contracts USING btree (name, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_tagrels_contracts",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (name, index)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "tagrels_coupons",
    "type": "table",
    "fields": [
      {
        "name": "name",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_tagrels_coupons_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_tagrels_coupons_index ON tagrels_coupons USING btree (index)"
      },
      {
        "name": "pk_tagrels_coupons",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "name",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_tagrels_coupons ON tagrels_coupons USING btree (name, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_tagrels_coupons",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (name, index)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "tagrels_customfields",
    "type": "table",
    "fields": [
      {
        "name": "name",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_tagrels_customfields_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_tagrels_customfields_index ON tagrels_customfields USING btree (index)"
      },
      {
        "name": "pk_tagrels_customfields",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "name",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_tagrels_customfields ON tagrels_customfields USING btree (name, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_tagrels_customfields",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (name, index)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "tagrels_davservers",
    "type": "table",
    "fields": [
      {
        "name": "name",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_tagrels_davservers_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_tagrels_davservers_index ON tagrels_davservers USING btree (index)"
      },
      {
        "name": "pk_tagrels_davservers",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "name",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_tagrels_davservers ON tagrels_davservers USING btree (name, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_tagrels_davservers",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (name, index)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "tagrels_devices",
    "type": "table",
    "fields": [
      {
        "name": "name",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_tagrels_devices_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_tagrels_devices_index ON tagrels_devices USING btree (index)"
      },
      {
        "name": "pk_tagrels_devices",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "name",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_tagrels_devices ON tagrels_devices USING btree (name, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_tagrels_devices",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (name, index)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "tagrels_documents",
    "type": "table",
    "fields": [
      {
        "name": "name",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_tagrels_documents_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_tagrels_documents_index ON tagrels_documents USING btree (index)"
      },
      {
        "name": "pk_tagrels_documents",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "name",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_tagrels_documents ON tagrels_documents USING btree (name, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_tagrels_documents",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (name, index)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "tagrels_dunning",
    "type": "table",
    "fields": [
      {
        "name": "name",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_tagrels_dunning_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_tagrels_dunning_index ON tagrels_dunning USING btree (index)"
      },
      {
        "name": "pk_tagrels_dunning",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "name",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_tagrels_dunning ON tagrels_dunning USING btree (name, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_tagrels_dunning",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (name, index)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "tagrels_feedservers",
    "type": "table",
    "fields": [
      {
        "name": "name",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_tagrels_feedservers_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_tagrels_feedservers_index ON tagrels_feedservers USING btree (index)"
      },
      {
        "name": "pk_tagrels_feedservers",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "name",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_tagrels_feedservers ON tagrels_feedservers USING btree (name, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_tagrels_feedservers",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (name, index)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "tagrels_forks",
    "type": "table",
    "fields": [
      {
        "name": "name",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_tagrels_forks_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_tagrels_forks_index ON tagrels_forks USING btree (index)"
      },
      {
        "name": "pk_tagrels_forks",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "name",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_tagrels_forks ON tagrels_forks USING btree (name, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_tagrels_forks",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (name, index)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "tagrels_groups",
    "type": "table",
    "fields": [
      {
        "name": "name",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_tagrels_groups_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_tagrels_groups_index ON tagrels_groups USING btree (index)"
      },
      {
        "name": "pk_tagrels_groups",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "name",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_tagrels_groups ON tagrels_groups USING btree (name, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_tagrels_groups",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (name, index)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "tagrels_items",
    "type": "table",
    "fields": [
      {
        "name": "name",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_tagrels_items_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_tagrels_items_index ON tagrels_items USING btree (index)"
      },
      {
        "name": "pk_tagrels_items",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "name",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_tagrels_items ON tagrels_items USING btree (name, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_tagrels_items",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (name, index)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "tagrels_ledgers",
    "type": "table",
    "fields": [
      {
        "name": "name",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_tagrels_ledgers_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_tagrels_ledgers_index ON tagrels_ledgers USING btree (index)"
      },
      {
        "name": "pk_tagrels_ledgers",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "name",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_tagrels_ledgers ON tagrels_ledgers USING btree (name, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_tagrels_ledgers",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (name, index)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "tagrels_links",
    "type": "table",
    "fields": [
      {
        "name": "name",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_tagrels_links_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_tagrels_links_index ON tagrels_links USING btree (index)"
      },
      {
        "name": "pk_tagrels_links",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "name",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_tagrels_links ON tagrels_links USING btree (name, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_tagrels_links",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (name, index)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "tagrels_mailinglists",
    "type": "table",
    "fields": [
      {
        "name": "name",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_tagrels_mailinglists_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_tagrels_mailinglists_index ON tagrels_mailinglists USING btree (index)"
      },
      {
        "name": "pk_tagrels_mailinglists",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "name",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_tagrels_mailinglists ON tagrels_mailinglists USING btree (name, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_tagrels_mailinglists",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (name, index)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "tagrels_mailservers",
    "type": "table",
    "fields": [
      {
        "name": "name",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_tagrels_mailservers_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_tagrels_mailservers_index ON tagrels_mailservers USING btree (index)"
      },
      {
        "name": "pk_tagrels_mailservers",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "name",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_tagrels_mailservers ON tagrels_mailservers USING btree (name, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_tagrels_mailservers",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (name, index)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "tagrels_messages",
    "type": "table",
    "fields": [
      {
        "name": "name",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_tagrels_messages_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_tagrels_messages_index ON tagrels_messages USING btree (index)"
      },
      {
        "name": "pk_tagrels_messages",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "name",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_tagrels_messages ON tagrels_messages USING btree (name, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_tagrels_messages",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (name, index)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "tagrels_notes",
    "type": "table",
    "fields": [
      {
        "name": "name",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_tagrels_notes_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_tagrels_notes_index ON tagrels_notes USING btree (index)"
      },
      {
        "name": "pk_tagrels_notes",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "name",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_tagrels_notes ON tagrels_notes USING btree (name, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_tagrels_notes",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (name, index)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "tagrels_objects",
    "type": "table",
    "fields": [
      {
        "name": "name",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_tagrels_objects_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_tagrels_objects_index ON tagrels_objects USING btree (index)"
      },
      {
        "name": "pk_tagrels_objects",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "name",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_tagrels_objects ON tagrels_objects USING btree (name, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_tagrels_objects",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (name, index)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "tagrels_opportunities",
    "type": "table",
    "fields": [
      {
        "name": "name",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_tagrels_opportunities_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_tagrels_opportunities_index ON tagrels_opportunities USING btree (index)"
      },
      {
        "name": "pk_tagrels_opportunities",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "name",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_tagrels_opportunities ON tagrels_opportunities USING btree (name, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_tagrels_opportunities",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (name, index)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "tagrels_payments",
    "type": "table",
    "fields": [
      {
        "name": "name",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_tagrels_payments_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_tagrels_payments_index ON tagrels_payments USING btree (index)"
      },
      {
        "name": "pk_tagrels_payments",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "name",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_tagrels_payments ON tagrels_payments USING btree (name, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_tagrels_payments",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (name, index)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "tagrels_pricelists",
    "type": "table",
    "fields": [
      {
        "name": "name",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_tagrels_pricelists_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_tagrels_pricelists_index ON tagrels_pricelists USING btree (index)"
      },
      {
        "name": "pk_tagrels_pricelists",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "name",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_tagrels_pricelists ON tagrels_pricelists USING btree (name, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_tagrels_pricelists",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (name, index)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "tagrels_projects",
    "type": "table",
    "fields": [
      {
        "name": "name",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_tagrels_projects_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_tagrels_projects_index ON tagrels_projects USING btree (index)"
      },
      {
        "name": "pk_tagrels_projects",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "name",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_tagrels_projects ON tagrels_projects USING btree (name, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_tagrels_projects",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (name, index)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "tagrels_resources",
    "type": "table",
    "fields": [
      {
        "name": "name",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_tagrels_resources_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_tagrels_resources_index ON tagrels_resources USING btree (index)"
      },
      {
        "name": "pk_tagrels_resources",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "name",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_tagrels_resources ON tagrels_resources USING btree (name, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_tagrels_resources",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (name, index)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "tagrels_services",
    "type": "table",
    "fields": [
      {
        "name": "name",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_tagrels_services_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_tagrels_services_index ON tagrels_services USING btree (index)"
      },
      {
        "name": "pk_tagrels_services",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "name",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_tagrels_services ON tagrels_services USING btree (name, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_tagrels_services",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (name, index)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "tagrels_storages",
    "type": "table",
    "fields": [
      {
        "name": "name",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_tagrels_storages_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_tagrels_storages_index ON tagrels_storages USING btree (index)"
      },
      {
        "name": "pk_tagrels_storages",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "name",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_tagrels_storages ON tagrels_storages USING btree (name, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_tagrels_storages",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (name, index)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "tagrels_tasks",
    "type": "table",
    "fields": [
      {
        "name": "name",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_tagrels_tasks_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_tagrels_tasks_index ON tagrels_tasks USING btree (index)"
      },
      {
        "name": "pk_tagrels_tasks",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "name",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_tagrels_tasks ON tagrels_tasks USING btree (name, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_tagrels_tasks",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (name, index)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "tagrels_tickets",
    "type": "table",
    "fields": [
      {
        "name": "name",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_tagrels_tickets_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_tagrels_tickets_index ON tagrels_tickets USING btree (index)"
      },
      {
        "name": "pk_tagrels_tickets",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "name",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_tagrels_tickets ON tagrels_tickets USING btree (name, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_tagrels_tickets",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (name, index)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "tagrels_transactions",
    "type": "table",
    "fields": [
      {
        "name": "name",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_tagrels_transactions_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_tagrels_transactions_index ON tagrels_transactions USING btree (index)"
      },
      {
        "name": "pk_tagrels_transactions",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "name",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_tagrels_transactions ON tagrels_transactions USING btree (name, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_tagrels_transactions",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (name, index)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "tagrels_users",
    "type": "table",
    "fields": [
      {
        "name": "name",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_tagrels_users_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_tagrels_users_index ON tagrels_users USING btree (index)"
      },
      {
        "name": "pk_tagrels_users",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "name",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_tagrels_users ON tagrels_users USING btree (name, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_tagrels_users",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (name, index)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "tagrels_weblets",
    "type": "table",
    "fields": [
      {
        "name": "name",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "i_tagrels_weblets_index",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "index"
        ],
        "def": "CREATE INDEX i_tagrels_weblets_index ON tagrels_weblets USING btree (index)"
      },
      {
        "name": "pk_tagrels_weblets",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "name",
          "index"
        ],
        "def": "CREATE UNIQUE INDEX pk_tagrels_weblets ON tagrels_weblets USING btree (name, index)"
      }
    ],
    "constraints": [
      {
        "name": "pk_tagrels_weblets",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (name, index)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "tags",
    "type": "view",
    "fields": [
      {
        "name": "entity",
        "type": "t_entity",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "name",
        "type": "text",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "index",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [],
    "constraints": [
      {
        "name": "dc_tagnames_name",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^$|^[ \\t\\v/]|[ \\t\\v/]$|[\\r\\n]|//'::text)"
      }
    ],
    "triggers": [],
    "rules": [
      {
        "name": "_RETURN",
        "type": "select",
        "instead": true,
        "def": "CREATE RULE \"_RETURN\" AS\n    ON SELECT TO tags DO INSTEAD  SELECT tagrels.entity,\n    tagnames.name,\n    tagrels.index\n   FROM tagrels\n     JOIN tagnames ON tagnames.\"ID\" = tagrels.name AND tagnames.entity = tagrels.entity;"
      },
      {
        "name": "rd_tags",
        "type": "delete",
        "instead": true,
        "def": "CREATE RULE rd_tags AS\n    ON DELETE TO tags DO INSTEAD  DELETE FROM tagrels\n  WHERE tagrels.entity = old.entity AND (tagrels.name IN ( SELECT tagnames.\"ID\"\n           FROM tagnames\n          WHERE tagnames.entity = old.entity AND tagnames.name::text = old.name::text)) AND tagrels.index = old.index;"
      },
      {
        "name": "ri_tags",
        "type": "insert",
        "instead": true,
        "def": "CREATE RULE ri_tags AS\n    ON INSERT TO tags DO INSTEAD  INSERT INTO tagrels (entity, name, index)\n  VALUES (new.entity, f_tagnames_upsert(new.entity, new.name::text), new.index);"
      },
      {
        "name": "ru_tags",
        "type": "update",
        "instead": true,
        "def": "CREATE RULE ru_tags AS\n    ON UPDATE TO tags DO INSTEAD  UPDATE tagrels SET entity = new.entity, name =\n        CASE\n            WHEN old.entity = new.entity AND old.name::text = new.name::text THEN tagrels.name\n            ELSE f_tagnames_upsert(new.entity, new.name::text)\n        END, index = new.index\n  WHERE tagrels.entity = old.entity AND (tagrels.name IN ( SELECT tagnames.\"ID\"\n           FROM tagnames\n          WHERE tagnames.entity = old.entity AND tagnames.name::text = old.name::text)) AND tagrels.index = old.index;"
      }
    ],
    "statistics": [],
    "def": "SELECT tagrels.entity,\n    tagnames.name,\n    tagrels.index\n   FROM tagrels\n     JOIN tagnames ON tagnames.\"ID\" = tagrels.name AND tagnames.entity = tagrels.entity;"
  },
  {
    "name": "tasks",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": true,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Task ID"
      },
      {
        "name": "fork",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_tasks_fork",
            "table": "forks",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Fork ID (`null` for base module)"
      },
      {
        "name": "owneruser",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_tasks_owneruser",
            "table": "users",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Owner user ID (PUBLIC if `owneruser`=`null` and `ownergroup`=`null`)"
      },
      {
        "name": "ownergroup",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_tasks_ownergroup",
            "table": "groups",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Owner group ID (PUBLIC if `owneruser`=`null` and `ownergroup`=`null`)"
      },
      {
        "name": "creator",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creator user ID (defaults to authenticated user on creation)"
      },
      {
        "name": "assigneduser",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_tasks_assigneduser",
            "table": "users",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Assigned user ID"
      },
      {
        "name": "creationdate",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creation date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (defaults to current date and time on creation)"
      },
      {
        "name": "lastmodified",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Last modification date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (auto-reset on modification)"
      },
      {
        "name": "davserver",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_tasks_davserver",
            "table": "davservers",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "DAV server ID"
      },
      {
        "name": "ticket",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_tasks_ticket",
            "table": "tickets",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Ticket ID; is mutually exclusive to `project`"
      },
      {
        "name": "project",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_tasks_project",
            "table": "projects",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Project ID; is mutually exclusive to `ticket`"
      },
      {
        "name": "visibility",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Visibility (`0`=REGULAR, `1`=ARCHIVED, `2`=DELETED)"
      },
      {
        "name": "name",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Name"
      },
      {
        "name": "tasknum",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Task number"
      },
      {
        "name": "datefrom",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Start date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time)"
      },
      {
        "name": "duedate",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Due date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time)"
      },
      {
        "name": "status",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Status (`0`=NOTSTARTED, `1`=AWAITINGACCEPTANCE, `2`=ACCEPTED, `3`=REJECTED, `4`=ACTIVE, `5`=INACTIVE, `6`=FEEDBACKREQUIRED, `7`=TESTING, `8`=CANCELLED, `9`=COMPLETED, `10`=FAILED, `11`=BOOKED)"
      },
      {
        "name": "priority",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "2",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Priority (`0`=LOWEST, `1`=LOW, `2`=MEDIUM, `3`=HIGH, `4`=HIGHEST)"
      },
      {
        "name": "projectedeffort",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Projected effort in minutes"
      },
      {
        "name": "description",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Detailed general description"
      }
    ],
    "indexes": [
      {
        "name": "fk_tasks_assigneduser",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "assigneduser"
        ],
        "def": "CREATE INDEX fk_tasks_assigneduser ON tasks USING gin (assigneduser) WHERE assigneduser IS NOT NULL"
      },
      {
        "name": "fk_tasks_davserver",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "davserver"
        ],
        "def": "CREATE INDEX fk_tasks_davserver ON tasks USING gin (davserver) WHERE davserver IS NOT NULL"
      },
      {
        "name": "fk_tasks_fork",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "fork"
        ],
        "def": "CREATE INDEX fk_tasks_fork ON tasks USING gin (fork) WHERE fork IS NOT NULL"
      },
      {
        "name": "fk_tasks_ownergroup",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "ownergroup"
        ],
        "def": "CREATE INDEX fk_tasks_ownergroup ON tasks USING gin (ownergroup) WHERE ownergroup IS NOT NULL"
      },
      {
        "name": "fk_tasks_owneruser",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "owneruser"
        ],
        "def": "CREATE INDEX fk_tasks_owneruser ON tasks USING gin (owneruser) WHERE owneruser IS NOT NULL"
      },
      {
        "name": "fk_tasks_project",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "project"
        ],
        "def": "CREATE INDEX fk_tasks_project ON tasks USING gin (project) WHERE project IS NOT NULL"
      },
      {
        "name": "fk_tasks_ticket",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "ticket"
        ],
        "def": "CREATE INDEX fk_tasks_ticket ON tasks USING btree (ticket) WHERE ticket IS NOT NULL"
      },
      {
        "name": "i_tasks_nofork",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "fork"
        ],
        "def": "CREATE INDEX i_tasks_nofork ON tasks USING gin (fork) WHERE fork IS NULL"
      },
      {
        "name": "i_tasks_noowner",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "ownergroup"
        ],
        "def": "CREATE INDEX i_tasks_noowner ON tasks USING gin (ownergroup) WHERE owneruser IS NULL AND ownergroup IS NULL"
      },
      {
        "name": "pk_tasks",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_tasks ON tasks USING btree (\"ID\")"
      },
      {
        "name": "s_tasks_name",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "name"
        ],
        "def": "CREATE INDEX s_tasks_name ON tasks USING gin (name gin_trgm_ops)"
      },
      {
        "name": "s_tasks_tasknum",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "tasknum"
        ],
        "def": "CREATE INDEX s_tasks_tasknum ON tasks USING gin (tasknum gin_trgm_ops) WHERE tasknum::text <> ''::text"
      }
    ],
    "constraints": [
      {
        "name": "c_tasks_association",
        "type": "check",
        "domain": false,
        "def": "CHECK (ticket IS NULL OR project IS NULL)"
      },
      {
        "name": "c_tasks_owner",
        "type": "check",
        "domain": false,
        "def": "CHECK (owneruser IS NULL OR ownergroup IS NULL)"
      },
      {
        "name": "dc_tasks_description",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v\\r\\n]|[ \\t\\v\\r\\n]$'::text)"
      },
      {
        "name": "dc_tasks_name",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^$|^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_tasks_priority",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0 AND VALUE <= 4)"
      },
      {
        "name": "dc_tasks_projectedeffort",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0)"
      },
      {
        "name": "dc_tasks_status",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0 AND VALUE <= 11)"
      },
      {
        "name": "dc_tasks_tasknum",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_tasks_visibility",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0 AND VALUE <= 2)"
      },
      {
        "name": "fk_tasks_assigneduser",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (assigneduser) REFERENCES users(\"ID\") ON DELETE SET NULL DEFERRABLE"
      },
      {
        "name": "fk_tasks_davserver",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (davserver) REFERENCES davservers(\"ID\") ON DELETE SET NULL DEFERRABLE"
      },
      {
        "name": "fk_tasks_fork",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (fork) REFERENCES forks(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_tasks_ownergroup",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (ownergroup) REFERENCES groups(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_tasks_owneruser",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (owneruser) REFERENCES users(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_tasks_project",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (project) REFERENCES projects(\"ID\") ON DELETE SET NULL DEFERRABLE"
      },
      {
        "name": "fk_tasks_ticket",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (ticket) REFERENCES tickets(\"ID\") ON DELETE SET NULL DEFERRABLE"
      },
      {
        "name": "pk_tasks",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "tickets",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": true,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Ticket ID"
      },
      {
        "name": "fork",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_tickets_fork",
            "table": "forks",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Fork ID (`null` for base module)"
      },
      {
        "name": "ownergroup",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_tickets_ownergroup",
            "table": "groups",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Owner group ID (`null`=PUBLIC)"
      },
      {
        "name": "creator",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creator user ID (defaults to authenticated user on creation)"
      },
      {
        "name": "assigneduser",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_tickets_assigneduser",
            "table": "users",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Assigned user ID"
      },
      {
        "name": "creationdate",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creation date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (defaults to current date and time on creation)"
      },
      {
        "name": "lastmodified",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Last modification date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (auto-reset on modification)"
      },
      {
        "name": "account",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_tickets_account",
            "table": "accounts",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Account ID; is mutually exclusive to `project`"
      },
      {
        "name": "project",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_tickets_project",
            "table": "projects",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Project ID; is mutually exclusive to `account`"
      },
      {
        "name": "visibility",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Visibility (`0`=REGULAR, `1`=ARCHIVED, `2`=DELETED)"
      },
      {
        "name": "name",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Name"
      },
      {
        "name": "ticketnum",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Ticket number"
      },
      {
        "name": "date",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Designated date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (defaults to current date and time on creation)"
      },
      {
        "name": "duedate",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Due date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time)"
      },
      {
        "name": "status",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Status (`0`=NOTSTARTED, `1`=AWAITINGACCEPTANCE, `2`=ACCEPTED, `3`=REJECTED, `4`=ACTIVE, `5`=INACTIVE, `6`=FEEDBACKREQUIRED, `7`=TESTING, `8`=CANCELLED, `9`=COMPLETED, `10`=FAILED, `11`=BOOKED)"
      },
      {
        "name": "priority",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "2",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Priority (`0`=LOWEST, `1`=LOW, `2`=MEDIUM, `3`=HIGH, `4`=HIGHEST)"
      },
      {
        "name": "description",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Detailed general description"
      },
      {
        "name": "billingitems",
        "type": "json",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "[JSON](https://tools.ietf.org/html/rfc7159)-encoded items (array)"
      },
      {
        "name": "procurementitems",
        "type": "json",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "[JSON](https://tools.ietf.org/html/rfc7159)-encoded items (array)"
      }
    ],
    "indexes": [
      {
        "name": "fk_tickets_account",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "account"
        ],
        "def": "CREATE INDEX fk_tickets_account ON tickets USING btree (account) WHERE account IS NOT NULL"
      },
      {
        "name": "fk_tickets_assigneduser",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "assigneduser"
        ],
        "def": "CREATE INDEX fk_tickets_assigneduser ON tickets USING gin (assigneduser) WHERE assigneduser IS NOT NULL"
      },
      {
        "name": "fk_tickets_fork",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "fork"
        ],
        "def": "CREATE INDEX fk_tickets_fork ON tickets USING gin (fork) WHERE fork IS NOT NULL"
      },
      {
        "name": "fk_tickets_ownergroup",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "ownergroup"
        ],
        "def": "CREATE INDEX fk_tickets_ownergroup ON tickets USING gin (ownergroup)"
      },
      {
        "name": "fk_tickets_project",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "project"
        ],
        "def": "CREATE INDEX fk_tickets_project ON tickets USING gin (project) WHERE project IS NOT NULL"
      },
      {
        "name": "i_tickets_date",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "date"
        ],
        "def": "CREATE INDEX i_tickets_date ON tickets USING btree (date DESC)"
      },
      {
        "name": "i_tickets_nofork",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "fork"
        ],
        "def": "CREATE INDEX i_tickets_nofork ON tickets USING gin (fork) WHERE fork IS NULL"
      },
      {
        "name": "i_tickets_noowner",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "ownergroup"
        ],
        "def": "CREATE INDEX i_tickets_noowner ON tickets USING gin (ownergroup) WHERE ownergroup IS NULL"
      },
      {
        "name": "pk_tickets",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_tickets ON tickets USING btree (\"ID\")"
      },
      {
        "name": "s_tickets_name",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "name"
        ],
        "def": "CREATE INDEX s_tickets_name ON tickets USING gin (name gin_trgm_ops)"
      },
      {
        "name": "s_tickets_ticketnum",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "ticketnum"
        ],
        "def": "CREATE INDEX s_tickets_ticketnum ON tickets USING gin (ticketnum gin_trgm_ops) WHERE ticketnum::text <> ''::text"
      }
    ],
    "constraints": [
      {
        "name": "c_tickets_association",
        "type": "check",
        "domain": false,
        "def": "CHECK (account IS NULL OR project IS NULL)"
      },
      {
        "name": "dc_tickets_billingitems",
        "type": "check",
        "domain": true,
        "def": "CHECK (json_typeof(VALUE) = 'array'::text)"
      },
      {
        "name": "dc_tickets_description",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v\\r\\n]|[ \\t\\v\\r\\n]$'::text)"
      },
      {
        "name": "dc_tickets_name",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^$|^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_tickets_priority",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0 AND VALUE <= 4)"
      },
      {
        "name": "dc_tickets_procurementitems",
        "type": "check",
        "domain": true,
        "def": "CHECK (json_typeof(VALUE) = 'array'::text)"
      },
      {
        "name": "dc_tickets_status",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0 AND VALUE <= 11)"
      },
      {
        "name": "dc_tickets_ticketnum",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_tickets_visibility",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0 AND VALUE <= 2)"
      },
      {
        "name": "fk_tickets_account",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (account) REFERENCES accounts(\"ID\") ON DELETE SET NULL DEFERRABLE"
      },
      {
        "name": "fk_tickets_assigneduser",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (assigneduser) REFERENCES users(\"ID\") ON DELETE SET NULL DEFERRABLE"
      },
      {
        "name": "fk_tickets_fork",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (fork) REFERENCES forks(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_tickets_ownergroup",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (ownergroup) REFERENCES groups(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_tickets_project",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (project) REFERENCES projects(\"ID\") ON DELETE SET NULL DEFERRABLE"
      },
      {
        "name": "pk_tickets",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "tokens",
    "type": "table",
    "fields": [
      {
        "name": "user",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_tokens_user",
            "table": "users",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": null
      },
      {
        "name": "application",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_tokens_application",
            "table": "applications",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": null
      },
      {
        "name": "token",
        "type": "bytea",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "expdate",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "type",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "hint",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "challenge",
        "type": "bytea",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "fk_tokens_application",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "application"
        ],
        "def": "CREATE INDEX fk_tokens_application ON tokens USING gin (application) WHERE application IS NOT NULL"
      },
      {
        "name": "pk_tokens",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "token"
        ],
        "def": "CREATE UNIQUE INDEX pk_tokens ON tokens USING btree (token)"
      },
      {
        "name": "u_tokens_user_application_type",
        "unique": true,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "user",
          "application",
          "type"
        ],
        "def": "CREATE UNIQUE INDEX u_tokens_user_application_type ON tokens USING btree (\"user\", application, type)"
      }
    ],
    "constraints": [
      {
        "name": "c_tokens_application",
        "type": "check",
        "domain": false,
        "def": "CHECK (\nCASE\n    WHEN type::smallint <= 2 THEN application IS NOT NULL\n    ELSE application IS NULL\nEND)"
      },
      {
        "name": "c_tokens_challenge",
        "type": "check",
        "domain": false,
        "def": "CHECK (challenge IS NULL OR type::smallint = 2)"
      },
      {
        "name": "dc_tokens_hint",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v\\r\\n]|[ \\t\\v\\r\\n]$'::text)"
      },
      {
        "name": "dc_tokens_token",
        "type": "check",
        "domain": true,
        "def": "CHECK (bit_length(VALUE) = 160)"
      },
      {
        "name": "dc_tokens_type",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0 AND VALUE <= 6)"
      },
      {
        "name": "fk_tokens_application",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (application) REFERENCES applications(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_tokens_user",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (\"user\") REFERENCES users(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "pk_tokens",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (token)"
      },
      {
        "name": "u_tokens_user_application_type",
        "type": "unique",
        "domain": false,
        "def": "UNIQUE (\"user\", application, type)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "transactions",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": true,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Transaction ID"
      },
      {
        "name": "fork",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_transactions_fork",
            "table": "forks",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Fork ID (`null` for base module)"
      },
      {
        "name": "ownergroup",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_transactions_ownergroup",
            "table": "groups",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Owner group ID (`null`=PUBLIC)"
      },
      {
        "name": "creator",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creator user ID (defaults to authenticated user on creation)"
      },
      {
        "name": "assigneduser",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_transactions_assigneduser",
            "table": "users",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Assigned user ID"
      },
      {
        "name": "creationdate",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creation date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (defaults to current date and time on creation)"
      },
      {
        "name": "lastmodified",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Last modification date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (auto-reset on modification)"
      },
      {
        "name": "account",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_transactions_account",
            "table": "accounts",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Account ID"
      },
      {
        "name": "item",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_transactions_item",
            "table": "items",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Item ID; must be `null` for BILLING and PROCUREMENT"
      },
      {
        "name": "contract",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_transactions_contract",
            "table": "contracts",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Contract ID"
      },
      {
        "name": "transactionnum",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Transaction number"
      },
      {
        "name": "type",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Transaction type (`0`=BILLING_QUOTE, `1`=BILLING_ORDER, `2`=BILLING_DELIVERY, `3`=BILLING_INVOICE, `4`=BILLING_CREDIT, `5`=PROCUREMENT_REQUEST, `6`=PROCUREMENT_ORDER, `7`=PROCUREMENT_DELIVERY, `8`=PROCUREMENT_INVOICE, `9`=PROCUREMENT_CREDIT, `10`=PRODUCTION_FABRICATION, `11`=PRODUCTION_DISASSEMBLY)"
      },
      {
        "name": "date",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Designated date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (defaults to current date and time on creation)"
      },
      {
        "name": "duedate",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Due date as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time)"
      },
      {
        "name": "status",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Status (`0`=DRAFT, `1`=BOOKED, `2`=HOLD, `3`=CANCELLED, `4`=CLOSED, `5`=PARTLYORDERED, `6`=PARTLYORDERED_CANCELLED, `7`=PARTLYORDERED_CLOSED, `8`=ORDERED, `9`=PARTLYDELIVERED, `10`=PARTLYDELIVERED_CANCELLED, `11`=PARTLYDELIVERED_CLOSED, `12`=DELIVERED, `13`=PARTLYINVOICED, `14`=PARTLYINVOICED_CANCELLED, `15`=PARTLYINVOICED_CLOSED, `16`=INVOICED, `17`=PARTLYPAID, `18`=PARTLYPAID_CANCELLED, `19`=PARTLYPAID_CLOSED, `20`=PAID, `21`=OVERPAID, `22`=PROCESSED, `23`=PROCESSED_CANCELLED)"
      },
      {
        "name": "calculation",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Calculation method (`0`=NET, `1`=GROSS, `2`=EXACT, `3`=LEGACY, `4`=EXTERNAL)"
      },
      {
        "name": "productionfactor",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Production factor; is required for PRODUCTION, otherwise must be `null`"
      },
      {
        "name": "currency",
        "type": "character varying(3)",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": "^[A-Z]{3}$",
        "description": "Currency code ([ISO 4217](https://en.wikipedia.org/wiki/ISO_4217))"
      },
      {
        "name": "exchangerate",
        "type": "double precision",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "1",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Exchange rate as a multiple of one monetary unit of the fixed system currency"
      },
      {
        "name": "taxid",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Buyer Tax ID (e.g. VATIN or SSN)"
      },
      {
        "name": "shippingrecipient",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Shipping recipient"
      },
      {
        "name": "shippingaddress",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Shipping address (street and building/suite number)"
      },
      {
        "name": "shippingpostalcode",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Shipping postal or ZIP code"
      },
      {
        "name": "shippingcity",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Shipping city or locality"
      },
      {
        "name": "shippingregion",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Shipping region or state"
      },
      {
        "name": "shippingcountry",
        "type": "character varying(2)",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": "^([A-Z]{2})?$",
        "description": "Shipping country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2))"
      },
      {
        "name": "billingrecipient",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Billing recipient"
      },
      {
        "name": "billingaddress",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Billing address (street and building/suite number)"
      },
      {
        "name": "billingpostalcode",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Billing postal or ZIP code"
      },
      {
        "name": "billingcity",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Billing city or locality"
      },
      {
        "name": "billingregion",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Billing region or state"
      },
      {
        "name": "billingcountry",
        "type": "character varying(2)",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": "^([A-Z]{2})?$",
        "description": "Billing country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2))"
      },
      {
        "name": "sellertaxid",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Seller Tax ID (e.g. VATIN or SSN)"
      },
      {
        "name": "sellername",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Seller Name"
      },
      {
        "name": "selleraddress",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Seller address (street and building/suite number)"
      },
      {
        "name": "sellerpostalcode",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Seller postal or ZIP code"
      },
      {
        "name": "sellercity",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Seller city or locality"
      },
      {
        "name": "sellerregion",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Seller region or state"
      },
      {
        "name": "sellercountry",
        "type": "character varying(2)",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": "^([A-Z]{2})?$",
        "description": "Seller country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2))"
      },
      {
        "name": "discount",
        "type": "double precision",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Total absolute discount"
      },
      {
        "name": "netamount",
        "type": "double precision",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Total net amount"
      },
      {
        "name": "tax",
        "type": "double precision",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Total tax amount"
      },
      {
        "name": "margin",
        "type": "double precision",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Total absolute margin"
      },
      {
        "name": "weight",
        "type": "double precision",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Total shipping weight in kilograms (only positive line items)"
      },
      {
        "name": "items",
        "type": "json",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "[JSON](https://tools.ietf.org/html/rfc7159)-encoded items (array)"
      }
    ],
    "indexes": [
      {
        "name": "fk_transactions_account",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "account"
        ],
        "def": "CREATE INDEX fk_transactions_account ON transactions USING btree (account) WHERE account IS NOT NULL"
      },
      {
        "name": "fk_transactions_assigneduser",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "assigneduser"
        ],
        "def": "CREATE INDEX fk_transactions_assigneduser ON transactions USING gin (assigneduser) WHERE assigneduser IS NOT NULL"
      },
      {
        "name": "fk_transactions_contract",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "contract"
        ],
        "def": "CREATE INDEX fk_transactions_contract ON transactions USING btree (contract) WHERE contract IS NOT NULL"
      },
      {
        "name": "fk_transactions_fork",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "fork"
        ],
        "def": "CREATE INDEX fk_transactions_fork ON transactions USING gin (fork) WHERE fork IS NOT NULL"
      },
      {
        "name": "fk_transactions_item",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "item"
        ],
        "def": "CREATE INDEX fk_transactions_item ON transactions USING btree (item) WHERE item IS NOT NULL"
      },
      {
        "name": "fk_transactions_ownergroup",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "ownergroup"
        ],
        "def": "CREATE INDEX fk_transactions_ownergroup ON transactions USING gin (ownergroup)"
      },
      {
        "name": "i_transactions_billing_date",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "date"
        ],
        "def": "CREATE INDEX i_transactions_billing_date ON transactions USING btree (date DESC) WHERE type::smallint < 5"
      },
      {
        "name": "i_transactions_collection_date",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "date"
        ],
        "def": "CREATE INDEX i_transactions_collection_date ON transactions USING btree (date DESC) WHERE (type::smallint = ANY (ARRAY[3, 4, 8, 9])) AND (status::smallint = ANY (ARRAY[1, 2, 17, 21]))"
      },
      {
        "name": "i_transactions_nofork",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "fork"
        ],
        "def": "CREATE INDEX i_transactions_nofork ON transactions USING gin (fork) WHERE fork IS NULL"
      },
      {
        "name": "i_transactions_noowner",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "ownergroup"
        ],
        "def": "CREATE INDEX i_transactions_noowner ON transactions USING gin (ownergroup) WHERE ownergroup IS NULL"
      },
      {
        "name": "i_transactions_procurement_date",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "date"
        ],
        "def": "CREATE INDEX i_transactions_procurement_date ON transactions USING btree (date DESC) WHERE type::smallint > 4 AND type::smallint < 10"
      },
      {
        "name": "i_transactions_production_date",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "date"
        ],
        "def": "CREATE INDEX i_transactions_production_date ON transactions USING btree (date DESC) WHERE type::smallint > 9"
      },
      {
        "name": "i_transactions_transactionnum",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "transactionnum"
        ],
        "def": "CREATE INDEX i_transactions_transactionnum ON transactions USING btree (transactionnum)"
      },
      {
        "name": "pk_transactions",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_transactions ON transactions USING btree (\"ID\")"
      },
      {
        "name": "s_transactions_transactionnum",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "transactionnum"
        ],
        "def": "CREATE INDEX s_transactions_transactionnum ON transactions USING gin (transactionnum gin_trgm_ops)"
      },
      {
        "name": "u_transactions_transactionnum_type",
        "unique": true,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "transactionnum",
          "type"
        ],
        "def": "CREATE UNIQUE INDEX u_transactions_transactionnum_type ON transactions USING btree (transactionnum, type) WHERE status::smallint <> 3"
      }
    ],
    "constraints": [
      {
        "name": "c_transactions_type",
        "type": "check",
        "domain": false,
        "def": "CHECK (\nCASE\n    WHEN type::smallint >= 10 THEN account IS NULL AND (item IS NOT NULL OR status::smallint = 0) AND (status::smallint >= 0 AND status::smallint <= 4 OR (status::smallint = ANY (ARRAY[22, 23]))) AND productionfactor > 0 AND taxid::text = ''::text AND shippingrecipient::text = ''::text AND shippingpostalcode::text = ''::text AND shippingpostalcode::text = ''::text AND shippingcity::text = ''::text AND shippingregion::text = ''::text AND shippingcountry::text = ''::text AND billingrecipient::text = ''::text AND billingpostalcode::text = ''::text AND billingpostalcode::text = ''::text AND billingcity::text = ''::text AND billingregion::text = ''::text AND billingcountry::text = ''::text AND sellertaxid::text = ''::text AND sellername::text = ''::text AND sellerpostalcode::text = ''::text AND sellerpostalcode::text = ''::text AND sellercity::text = ''::text AND sellerregion::text = ''::text AND sellercountry::text = ''::text\n    ELSE item IS NULL AND productionfactor IS NULL AND (status::smallint >= 0 AND status::smallint <= 4 OR\n    CASE\n        WHEN type::smallint = ANY (ARRAY[0, 5]) THEN status::smallint >= 5 AND status::smallint <= 8\n        WHEN type::smallint = ANY (ARRAY[1, 6]) THEN status::smallint >= 9 AND status::smallint <= 16\n        WHEN type::smallint = ANY (ARRAY[2, 7]) THEN status::smallint >= 13 AND status::smallint <= 16\n        ELSE status::smallint >= 17 AND status::smallint <= 21\n    END)\nEND)"
      },
      {
        "name": "dc_transactions_billingaddress",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v\\r\\n]|[ \\t\\v\\r\\n]$'::text)"
      },
      {
        "name": "dc_transactions_billingcity",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_transactions_billingcountry",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE::text ~ '^([A-Z]{2})?$'::text)"
      },
      {
        "name": "dc_transactions_billingpostalcode",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_transactions_billingrecipient",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_transactions_billingregion",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_transactions_calculation",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0 AND VALUE <= 4)"
      },
      {
        "name": "dc_transactions_currency",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE::text ~ '^[A-Z]{3}$'::text)"
      },
      {
        "name": "dc_transactions_exchangerate",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE > 0::double precision)"
      },
      {
        "name": "dc_transactions_items",
        "type": "check",
        "domain": true,
        "def": "CHECK (json_typeof(VALUE) = 'array'::text)"
      },
      {
        "name": "dc_transactions_selleraddress",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v\\r\\n]|[ \\t\\v\\r\\n]$'::text)"
      },
      {
        "name": "dc_transactions_sellercity",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_transactions_sellercountry",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE::text ~ '^([A-Z]{2})?$'::text)"
      },
      {
        "name": "dc_transactions_sellername",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_transactions_sellerpostalcode",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_transactions_sellerregion",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_transactions_sellertaxid",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_transactions_shippingaddress",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v\\r\\n]|[ \\t\\v\\r\\n]$'::text)"
      },
      {
        "name": "dc_transactions_shippingcity",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_transactions_shippingcountry",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE::text ~ '^([A-Z]{2})?$'::text)"
      },
      {
        "name": "dc_transactions_shippingpostalcode",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_transactions_shippingrecipient",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_transactions_shippingregion",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_transactions_status",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0 AND VALUE <= 23)"
      },
      {
        "name": "dc_transactions_taxid",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_transactions_transactionnum",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^$|^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_transactions_type",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0 AND VALUE <= 11)"
      },
      {
        "name": "dc_transactions_weight",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0::double precision)"
      },
      {
        "name": "fk_transactions_account",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (account) REFERENCES accounts(\"ID\") ON DELETE SET NULL DEFERRABLE"
      },
      {
        "name": "fk_transactions_assigneduser",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (assigneduser) REFERENCES users(\"ID\") ON DELETE SET NULL DEFERRABLE"
      },
      {
        "name": "fk_transactions_contract",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (contract) REFERENCES contracts(\"ID\") ON DELETE SET NULL DEFERRABLE"
      },
      {
        "name": "fk_transactions_fork",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (fork) REFERENCES forks(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_transactions_item",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (item) REFERENCES items(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_transactions_ownergroup",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (ownergroup) REFERENCES groups(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "pk_transactions",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      }
    ],
    "triggers": [
      {
        "name": "td_transactions_dunning",
        "type": "after",
        "events": [
          "delete"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftud_transactions_dunning",
        "def": "CREATE TRIGGER td_transactions_dunning AFTER DELETE ON transactions FOR EACH ROW WHEN ((old.type::smallint = ANY (ARRAY[3, 4, 8, 9])) AND old.status::smallint <> 0) EXECUTE FUNCTION ftud_transactions_dunning()"
      },
      {
        "name": "ti_transactions_item",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_transactions_item",
        "def": "CREATE TRIGGER ti_transactions_item BEFORE INSERT ON transactions FOR EACH ROW WHEN (new.item IS NOT NULL) EXECUTE FUNCTION ftiu_transactions_item()"
      },
      {
        "name": "ti_transactions_status",
        "type": "before",
        "events": [
          "insert"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_transactions_status",
        "def": "CREATE TRIGGER ti_transactions_status BEFORE INSERT ON transactions FOR EACH ROW WHEN ((new.type::smallint = ANY (ARRAY[3, 4, 8, 9])) AND new.status::smallint > 4) EXECUTE FUNCTION ftiu_transactions_status()"
      },
      {
        "name": "tu_transactions_dunning",
        "type": "after",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftud_transactions_dunning",
        "def": "CREATE TRIGGER tu_transactions_dunning AFTER UPDATE ON transactions FOR EACH ROW WHEN ((new.type::smallint = ANY (ARRAY[3, 4, 8, 9])) AND old.status::smallint <> new.status::smallint) EXECUTE FUNCTION ftud_transactions_dunning()"
      },
      {
        "name": "tu_transactions_item",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_transactions_item",
        "def": "CREATE TRIGGER tu_transactions_item BEFORE UPDATE OF item ON transactions FOR EACH ROW WHEN (new.item IS NOT NULL AND old.item IS DISTINCT FROM new.item) EXECUTE FUNCTION ftiu_transactions_item()"
      },
      {
        "name": "tu_transactions_status",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ftiu_transactions_status",
        "def": "CREATE TRIGGER tu_transactions_status BEFORE UPDATE OF status, netamount, tax ON transactions FOR EACH ROW WHEN ((new.type::smallint = ANY (ARRAY[3, 4, 8, 9])) AND new.status::smallint <> 0 AND (old.status::smallint <> new.status::smallint OR old.netamount::double precision <> new.netamount::double precision OR old.tax::double precision <> new.tax::double precision)) EXECUTE FUNCTION ftiu_transactions_status()"
      },
      {
        "name": "tu_transactions_type",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ft_integrity",
        "def": "CREATE TRIGGER tu_transactions_type BEFORE UPDATE OF type ON transactions FOR EACH ROW WHEN (old.type::smallint <> new.type::smallint) EXECUTE FUNCTION ft_integrity()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "usagestats",
    "type": "table",
    "fields": [
      {
        "name": "date",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "users",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "apiusers",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "dbtuples",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "binsize",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "fssize",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "cpu",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "pk_usagestats",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "date"
        ],
        "def": "CREATE UNIQUE INDEX pk_usagestats ON usagestats USING btree (date)"
      }
    ],
    "constraints": [
      {
        "name": "c_usagestats_apiusers",
        "type": "check",
        "domain": false,
        "def": "CHECK (apiusers::integer <= users::integer)"
      },
      {
        "name": "dc_usagestats_apiusers",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0)"
      },
      {
        "name": "dc_usagestats_binsize",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0)"
      },
      {
        "name": "dc_usagestats_cpu",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0)"
      },
      {
        "name": "dc_usagestats_dbtuples",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0)"
      },
      {
        "name": "dc_usagestats_fssize",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0)"
      },
      {
        "name": "dc_usagestats_users",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0)"
      },
      {
        "name": "pk_usagestats",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (date)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "userfields",
    "type": "table",
    "fields": [
      {
        "name": "user",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_userfields_user",
            "table": "users",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": null
      },
      {
        "name": "fork",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_userfields_fork",
            "table": "forks",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": null
      },
      {
        "name": "view",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "name",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "data",
        "type": "json",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "u_userfields_user_fork_view_name",
        "unique": true,
        "nullsdistinct": false,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "user",
          "fork",
          "view",
          "name"
        ],
        "def": "CREATE UNIQUE INDEX u_userfields_user_fork_view_name ON userfields USING btree (\"user\", fork, view, name) NULLS NOT DISTINCT"
      }
    ],
    "constraints": [
      {
        "name": "dc_userfields_data",
        "type": "check",
        "domain": true,
        "def": "CHECK (json_typeof(VALUE) = 'object'::text)"
      },
      {
        "name": "dc_userfields_name",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^$|^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_userfields_view",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE <> ''::text)"
      },
      {
        "name": "fk_userfields_fork",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (fork) REFERENCES forks(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_userfields_user",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (\"user\") REFERENCES users(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "u_userfields_user_fork_view_name",
        "type": "unique",
        "domain": false,
        "def": "UNIQUE NULLS NOT DISTINCT (\"user\", fork, view, name)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "userfilters",
    "type": "table",
    "fields": [
      {
        "name": "user",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_userfilters_user",
            "table": "users",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": null
      },
      {
        "name": "fork",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_userfilters_fork",
            "table": "forks",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": null
      },
      {
        "name": "view",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "name",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "data",
        "type": "json",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "u_userfilters_user_fork_view_name",
        "unique": true,
        "nullsdistinct": false,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "user",
          "fork",
          "view",
          "name"
        ],
        "def": "CREATE UNIQUE INDEX u_userfilters_user_fork_view_name ON userfilters USING btree (\"user\", fork, view, name) NULLS NOT DISTINCT"
      }
    ],
    "constraints": [
      {
        "name": "dc_userfilters_data",
        "type": "check",
        "domain": true,
        "def": "CHECK (json_typeof(VALUE) = 'object'::text)"
      },
      {
        "name": "dc_userfilters_name",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^$|^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_userfilters_view",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE <> ''::text)"
      },
      {
        "name": "fk_userfilters_fork",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (fork) REFERENCES forks(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_userfilters_user",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (\"user\") REFERENCES users(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "u_userfilters_user_fork_view_name",
        "type": "unique",
        "domain": false,
        "def": "UNIQUE NULLS NOT DISTINCT (\"user\", fork, view, name)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "users",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": true,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "User ID"
      },
      {
        "name": "creator",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creator user ID (defaults to authenticated user on creation)"
      },
      {
        "name": "creationdate",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creation date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (defaults to current date and time on creation)"
      },
      {
        "name": "lastmodified",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Last modification date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (auto-reset on modification)"
      },
      {
        "name": "contact",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_users_contact",
            "table": "contacts",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Contact ID"
      },
      {
        "name": "activity",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Activity (`0`=ACTIVE, `1`=DEACTIVATED, `2`=DELETED)"
      },
      {
        "name": "name",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Username (case-insensitively unique)"
      },
      {
        "name": "email",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "System e-mail address (case-insensitively unique)"
      },
      {
        "name": "nopublic",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Deny access to public data"
      },
      {
        "name": "apionly",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Restricted to API access, no regular login"
      },
      {
        "name": "expdate",
        "type": "bigint",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Expiry date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time)"
      },
      {
        "name": "password",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "resetlogintoken",
        "type": "bytea",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "signature",
        "type": "bytea",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "description",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "otpsecret",
        "type": "bytea",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "settings",
        "type": "json",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "fk_users_contact",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "contact"
        ],
        "def": "CREATE INDEX fk_users_contact ON users USING btree (contact) WHERE contact IS NOT NULL"
      },
      {
        "name": "pk_users",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_users ON users USING btree (\"ID\")"
      },
      {
        "name": "s_users_email",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "email"
        ],
        "def": "CREATE INDEX s_users_email ON users USING gin (email gin_trgm_ops)"
      },
      {
        "name": "s_users_name",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "name"
        ],
        "def": "CREATE INDEX s_users_name ON users USING gin (name gin_trgm_ops)"
      },
      {
        "name": "u_users_email",
        "unique": true,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "lower(email)"
        ],
        "def": "CREATE UNIQUE INDEX u_users_email ON users USING btree (lower(email::text))"
      },
      {
        "name": "u_users_name",
        "unique": true,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "lower(name)"
        ],
        "def": "CREATE UNIQUE INDEX u_users_name ON users USING btree (lower(name::text))"
      }
    ],
    "constraints": [
      {
        "name": "dc_users_activity",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0 AND VALUE <= 2)"
      },
      {
        "name": "dc_users_description",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v\\r\\n]|[ \\t\\v\\r\\n]$'::text)"
      },
      {
        "name": "dc_users_email",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^$|^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_users_name",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^$|^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_users_resetlogintoken",
        "type": "check",
        "domain": true,
        "def": "CHECK (bit_length(VALUE) = 160)"
      },
      {
        "name": "dc_users_settings",
        "type": "check",
        "domain": true,
        "def": "CHECK (json_typeof(VALUE) = 'object'::text)"
      },
      {
        "name": "dc_users_signature",
        "type": "check",
        "domain": true,
        "def": "CHECK (bit_length(VALUE) = 128)"
      },
      {
        "name": "fk_users_contact",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (contact) REFERENCES contacts(\"ID\") ON DELETE SET NULL DEFERRABLE"
      },
      {
        "name": "pk_users",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      }
    ],
    "triggers": [
      {
        "name": "td_users_internal",
        "type": "before",
        "events": [
          "delete"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ft_integrity",
        "def": "CREATE TRIGGER td_users_internal BEFORE DELETE ON users FOR EACH ROW WHEN (old.name::text = ANY (ARRAY['root'::text, 'maintainer'::text])) EXECUTE FUNCTION ft_integrity()"
      },
      {
        "name": "tu_users_internal",
        "type": "before",
        "events": [
          "update"
        ],
        "rowlevel": true,
        "deferrable": false,
        "function": "ft_integrity",
        "def": "CREATE TRIGGER tu_users_internal BEFORE UPDATE OF name ON users FOR EACH ROW WHEN ((old.name::text = ANY (ARRAY['root'::text, 'maintainer'::text])) AND (old.name::text <> new.name::text OR old.email::text <> new.email::text)) EXECUTE FUNCTION ft_integrity()"
      }
    ],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "views",
    "type": "table",
    "fields": [
      {
        "name": "user",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "view",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "data",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      },
      {
        "name": "fork",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "u_views_user_fork_view",
        "unique": true,
        "nullsdistinct": false,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "user",
          "fork",
          "view"
        ],
        "def": "CREATE UNIQUE INDEX u_views_user_fork_view ON views USING btree (\"user\", fork, view) NULLS NOT DISTINCT"
      }
    ],
    "constraints": [
      {
        "name": "dc_views_view",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE <> ''::text)"
      },
      {
        "name": "u_views_user_fork_view",
        "type": "unique",
        "domain": false,
        "def": "UNIQUE NULLS NOT DISTINCT (\"user\", fork, view)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  },
  {
    "name": "weblets",
    "type": "table",
    "fields": [
      {
        "name": "ID",
        "type": "integer",
        "storage": "plain",
        "notnull": true,
        "identity": true,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Weblet ID"
      },
      {
        "name": "creator",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creator user ID (defaults to authenticated user on creation)"
      },
      {
        "name": "creationdate",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Creation date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (defaults to current date and time on creation)"
      },
      {
        "name": "lastmodified",
        "type": "bigint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "date_part('epoch', now())",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Last modification date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (auto-reset on modification)"
      },
      {
        "name": "application",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_weblets_application",
            "table": "applications",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": "Application ID (`null`=STANDALONE)"
      },
      {
        "name": "activity",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Activity (`0`=ACTIVE, `1`=DEACTIVATED, `2`=DELETED)"
      },
      {
        "name": "name",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": null,
        "description": "Name"
      },
      {
        "name": "identifier",
        "type": "character varying(200)",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": null,
        "indexed": true,
        "fkeys": [],
        "pattern": "^[a-zA-Z0-9]([a-zA-Z0-9_.-]*[a-zA-Z0-9])?$",
        "description": "Unique weblet identifier"
      },
      {
        "name": "view",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Canonical view"
      },
      {
        "name": "type",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Weblet type (`0`=INTEGRATED, `1`=STANDALONE, `2`=DETACHED, `3`=POPUP_FRAMED, `4`=POPUP_PLAIN, `5`=EMBEDDED_FRAMED, `6`=EMBEDDED_COLLAPSED, `7`=EMBEDDED_PLAIN)"
      },
      {
        "name": "width",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Width in pixels (`0`=100%)"
      },
      {
        "name": "height",
        "type": "smallint",
        "storage": "plain",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": "0",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "Height in pixels (`0`=100%)"
      },
      {
        "name": "svgpath",
        "type": "text",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "[SVG path](https://www.w3.org/TR/SVG11/paths.html) for icon (square)"
      },
      {
        "name": "color",
        "type": "character varying(6)",
        "storage": "extended",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": "^([A-F0-9]{3}){0,2}$",
        "description": "Color code (CSS-style hexadecimal without `#`)"
      },
      {
        "name": "mimetype",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "C",
        "default": "'text/x-zymba'",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "[MIME type](https://en.wikipedia.org/wiki/Media_type) ([RFC 2045](https://tools.ietf.org/html/rfc2045))"
      },
      {
        "name": "langaliases",
        "type": "json",
        "storage": "extended",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": "[JSON](https://tools.ietf.org/html/rfc7159)-encoded language-specific aliases (object); use language code as object key"
      },
      {
        "name": "binfile",
        "type": "integer",
        "storage": "plain",
        "notnull": false,
        "identity": false,
        "generated": false,
        "collation": null,
        "default": null,
        "indexed": true,
        "fkeys": [
          {
            "name": "fk_weblets_binfile",
            "table": "binfiles",
            "field": "ID"
          }
        ],
        "pattern": null,
        "description": null
      },
      {
        "name": "url",
        "type": "text",
        "storage": "main",
        "notnull": true,
        "identity": false,
        "generated": false,
        "collation": "default",
        "default": "''",
        "indexed": false,
        "fkeys": [],
        "pattern": null,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "fk_weblets_application",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "gin",
        "keys": [
          "application"
        ],
        "def": "CREATE INDEX fk_weblets_application ON weblets USING gin (application) WHERE application IS NOT NULL"
      },
      {
        "name": "fk_weblets_binfile",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": true,
        "method": "btree",
        "keys": [
          "binfile"
        ],
        "def": "CREATE INDEX fk_weblets_binfile ON weblets USING btree (binfile) WHERE binfile IS NOT NULL"
      },
      {
        "name": "pk_weblets",
        "unique": true,
        "nullsdistinct": true,
        "primary": true,
        "partial": false,
        "method": "btree",
        "keys": [
          "ID"
        ],
        "def": "CREATE UNIQUE INDEX pk_weblets ON weblets USING btree (\"ID\")"
      },
      {
        "name": "s_weblets_identifier",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "identifier"
        ],
        "def": "CREATE INDEX s_weblets_identifier ON weblets USING gin (identifier gin_trgm_ops)"
      },
      {
        "name": "s_weblets_name",
        "unique": false,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "gin",
        "keys": [
          "name"
        ],
        "def": "CREATE INDEX s_weblets_name ON weblets USING gin (name gin_trgm_ops)"
      },
      {
        "name": "u_weblets_identifier",
        "unique": true,
        "nullsdistinct": true,
        "primary": false,
        "partial": false,
        "method": "btree",
        "keys": [
          "identifier"
        ],
        "def": "CREATE UNIQUE INDEX u_weblets_identifier ON weblets USING btree (identifier)"
      }
    ],
    "constraints": [
      {
        "name": "dc_weblets_activity",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0 AND VALUE <= 2)"
      },
      {
        "name": "dc_weblets_color",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE::text ~ '^([A-F0-9]{3}){0,2}$'::text)"
      },
      {
        "name": "dc_weblets_height",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0)"
      },
      {
        "name": "dc_weblets_identifier",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE::text ~ '^[a-zA-Z0-9]([a-zA-Z0-9_.-]*[a-zA-Z0-9])?$'::text)"
      },
      {
        "name": "dc_weblets_langaliases",
        "type": "check",
        "domain": true,
        "def": "CHECK (json_typeof(VALUE) = 'object'::text)"
      },
      {
        "name": "dc_weblets_mimetype",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE = ANY (ARRAY['application/ixml+xml'::text, 'text/x-zymba'::text]))"
      },
      {
        "name": "dc_weblets_name",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^$|^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_weblets_type",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0 AND VALUE <= 7)"
      },
      {
        "name": "dc_weblets_url",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_weblets_view",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE !~ '^[ \\t\\v]|[ \\t\\v]$|[\\r\\n]'::text)"
      },
      {
        "name": "dc_weblets_width",
        "type": "check",
        "domain": true,
        "def": "CHECK (VALUE >= 0)"
      },
      {
        "name": "fk_weblets_application",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (application) REFERENCES applications(\"ID\") ON DELETE CASCADE DEFERRABLE"
      },
      {
        "name": "fk_weblets_binfile",
        "type": "foreign_key",
        "domain": false,
        "def": "FOREIGN KEY (binfile) REFERENCES binfiles(\"ID\") DEFERRABLE"
      },
      {
        "name": "pk_weblets",
        "type": "primary_key",
        "domain": false,
        "def": "PRIMARY KEY (\"ID\")"
      },
      {
        "name": "u_weblets_identifier",
        "type": "unique",
        "domain": false,
        "def": "UNIQUE (identifier)"
      }
    ],
    "triggers": [],
    "rules": [],
    "statistics": [],
    "def": null
  }
]
