sailfork / t3code-github / infra/ relay/ migrations/ postgres/ 20260603035812_managed_endpoint_allocations/ snapshot.json

{
  "type": "diff",
  "version": "9",
  "dialect": "postgres",
  "id": "385d476b-d4f6-48a3-99e6-0a95af4ee4e4",
  "prevIds": ["e189638b-4700-4656-b86e-d8baa63f5fe4"],
  "footprints": [
    {
      "statementType": "create_table",
      "statementTarget": ["table", "public", "relay_managed_endpoint_allocations"],
      "writes": [
        "s|tbl|public.relay_managed_endpoint_allocations",
        "n|tbl|public.relay_managed_endpoint_allocations",
        "e|tbl|public.relay_managed_endpoint_allocations",
        "n|rel|public.relay_managed_endpoint_allocations",
        "n|type|public.relay_managed_endpoint_allocations",
        "n|rel|public.relay_managed_endpoint_allocations_pkey"
      ],
      "reads": ["n|sch|public"]
    },
    {
      "statementType": "create_index",
      "statementTarget": [
        "index",
        "public",
        "relay_managed_endpoint_allocations",
        "idx_relay_managed_endpoint_allocations_hostname"
      ],
      "writes": [
        "s|idx|public.idx_relay_managed_endpoint_allocations_hostname",
        "n|idx|public.idx_relay_managed_endpoint_allocations_hostname",
        "e|idx|public.idx_relay_managed_endpoint_allocations_hostname",
        "n|rel|public.idx_relay_managed_endpoint_allocations_hostname"
      ],
      "reads": [
        "n|tbl|public.relay_managed_endpoint_allocations",
        "n|sch|public",
        "n|col|public.relay_managed_endpoint_allocations.hostname"
      ]
    },
    {
      "statementType": "create_index",
      "statementTarget": [
        "index",
        "public",
        "relay_managed_endpoint_allocations",
        "idx_relay_managed_endpoint_allocations_tunnel_name"
      ],
      "writes": [
        "s|idx|public.idx_relay_managed_endpoint_allocations_tunnel_name",
        "n|idx|public.idx_relay_managed_endpoint_allocations_tunnel_name",
        "e|idx|public.idx_relay_managed_endpoint_allocations_tunnel_name",
        "n|rel|public.idx_relay_managed_endpoint_allocations_tunnel_name"
      ],
      "reads": [
        "n|tbl|public.relay_managed_endpoint_allocations",
        "n|sch|public",
        "n|col|public.relay_managed_endpoint_allocations.tunnel_name"
      ]
    }
  ],
  "deltas": [
    {
      "op": "create",
      "row": {
        "schema": "public",
        "name": "relay_managed_endpoint_allocations",
        "isRlsEnabled": false,
        "entityType": "tables"
      }
    },
    {
      "op": "create",
      "row": {
        "schema": "public",
        "table": "relay_managed_endpoint_allocations",
        "name": "user_id",
        "type": "varchar(191)",
        "typeSchema": null,
        "notNull": true,
        "dimensions": 0,
        "default": null,
        "generated": null,
        "identity": null,
        "entityType": "columns"
      }
    },
    {
      "op": "create",
      "row": {
        "schema": "public",
        "table": "relay_managed_endpoint_allocations",
        "name": "environment_id",
        "type": "varchar(191)",
        "typeSchema": null,
        "notNull": true,
        "dimensions": 0,
        "default": null,
        "generated": null,
        "identity": null,
        "entityType": "columns"
      }
    },
    {
      "op": "create",
      "row": {
        "schema": "public",
        "table": "relay_managed_endpoint_allocations",
        "name": "hostname",
        "type": "text",
        "typeSchema": null,
        "notNull": true,
        "dimensions": 0,
        "default": null,
        "generated": null,
        "identity": null,
        "entityType": "columns"
      }
    },
    {
      "op": "create",
      "row": {
        "schema": "public",
        "table": "relay_managed_endpoint_allocations",
        "name": "tunnel_id",
        "type": "varchar(191)",
        "typeSchema": null,
        "notNull": false,
        "dimensions": 0,
        "default": null,
        "generated": null,
        "identity": null,
        "entityType": "columns"
      }
    },
    {
      "op": "create",
      "row": {
        "schema": "public",
        "table": "relay_managed_endpoint_allocations",
        "name": "tunnel_name",
        "type": "text",
        "typeSchema": null,
        "notNull": true,
        "dimensions": 0,
        "default": null,
        "generated": null,
        "identity": null,
        "entityType": "columns"
      }
    },
    {
      "op": "create",
      "row": {
        "schema": "public",
        "table": "relay_managed_endpoint_allocations",
        "name": "dns_record_id",
        "type": "varchar(191)",
        "typeSchema": null,
        "notNull": false,
        "dimensions": 0,
        "default": null,
        "generated": null,
        "identity": null,
        "entityType": "columns"
      }
    },
    {
      "op": "create",
      "row": {
        "schema": "public",
        "table": "relay_managed_endpoint_allocations",
        "name": "ready_at",
        "type": "varchar(64)",
        "typeSchema": null,
        "notNull": false,
        "dimensions": 0,
        "default": null,
        "generated": null,
        "identity": null,
        "entityType": "columns"
      }
    },
    {
      "op": "create",
      "row": {
        "schema": "public",
        "table": "relay_managed_endpoint_allocations",
        "name": "created_at",
        "type": "varchar(64)",
        "typeSchema": null,
        "notNull": true,
        "dimensions": 0,
        "default": null,
        "generated": null,
        "identity": null,
        "entityType": "columns"
      }
    },
    {
      "op": "create",
      "row": {
        "schema": "public",
        "table": "relay_managed_endpoint_allocations",
        "name": "updated_at",
        "type": "varchar(64)",
        "typeSchema": null,
        "notNull": true,
        "dimensions": 0,
        "default": null,
        "generated": null,
        "identity": null,
        "entityType": "columns"
      }
    },
    {
      "op": "create",
      "row": {
        "schema": "public",
        "table": "relay_managed_endpoint_allocations",
        "name": "idx_relay_managed_endpoint_allocations_hostname",
        "nameExplicit": true,
        "columns": [
          {
            "value": "hostname",
            "isExpression": false,
            "asc": true,
            "nullsFirst": false,
            "opclass": null
          }
        ],
        "isUnique": true,
        "where": null,
        "with": "",
        "method": "btree",
        "concurrently": false,
        "entityType": "indexes"
      }
    },
    {
      "op": "create",
      "row": {
        "schema": "public",
        "table": "relay_managed_endpoint_allocations",
        "name": "idx_relay_managed_endpoint_allocations_tunnel_name",
        "nameExplicit": true,
        "columns": [
          {
            "value": "tunnel_name",
            "isExpression": false,
            "asc": true,
            "nullsFirst": false,
            "opclass": null
          }
        ],
        "isUnique": true,
        "where": null,
        "with": "",
        "method": "btree",
        "concurrently": false,
        "entityType": "indexes"
      }
    },
    {
      "op": "create",
      "row": {
        "schema": "public",
        "table": "relay_managed_endpoint_allocations",
        "name": "relay_managed_endpoint_allocations_pkey",
        "columns": ["user_id", "environment_id"],
        "nameExplicit": false,
        "entityType": "pks"
      }
    }
  ]
}