{
  "id": "d8b57dfe-223d-4124-8c4a-d1f05c6d62c1",
  "prevId": "00000000-0000-0000-0000-000000000000",
  "version": "7",
  "dialect": "postgresql",
  "tables": {
    "public.user_identities": {
      "name": "user_identities",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "user_id": {
          "name": "user_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "provider": {
          "name": "provider",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "external_id": {
          "name": "external_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "user_identities_user_id_users_id_fk": {
          "name": "user_identities_user_id_users_id_fk",
          "tableFrom": "user_identities",
          "tableTo": "users",
          "columnsFrom": [
            "user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.users": {
      "name": "users",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "display_name": {
          "name": "display_name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "email": {
          "name": "email",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "is_admin": {
          "name": "is_admin",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": false
        },
        "watching_now_tv_slots": {
          "name": "watching_now_tv_slots",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 5
        },
        "watching_now_movie_slots": {
          "name": "watching_now_movie_slots",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 10
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {
        "users_email_unique": {
          "name": "users_email_unique",
          "nullsNotDistinct": false,
          "columns": [
            "email"
          ]
        }
      },
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.storage_availability": {
      "name": "storage_availability",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "tier_id": {
          "name": "tier_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "online": {
          "name": "online",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true
        },
        "detected_at": {
          "name": "detected_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "resolved_at": {
          "name": "resolved_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {},
      "foreignKeys": {
        "storage_availability_tier_id_storage_tiers_id_fk": {
          "name": "storage_availability_tier_id_storage_tiers_id_fk",
          "tableFrom": "storage_availability",
          "tableTo": "storage_tiers",
          "columnsFrom": [
            "tier_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.storage_tiers": {
      "name": "storage_tiers",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "tier": {
          "name": "tier",
          "type": "storage_tier",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": true
        },
        "label": {
          "name": "label",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "base_path": {
          "name": "base_path",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "always_online": {
          "name": "always_online",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": false
        },
        "notes": {
          "name": "notes",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {},
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {
        "storage_tiers_tier_unique": {
          "name": "storage_tiers_tier_unique",
          "nullsNotDistinct": false,
          "columns": [
            "tier"
          ]
        }
      },
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    }
  },
  "enums": {
    "public.storage_tier": {
      "name": "storage_tier",
      "schema": "public",
      "values": [
        "live",
        "backup",
        "archive"
      ]
    }
  },
  "schemas": {},
  "sequences": {},
  "roles": {},
  "policies": {},
  "views": {},
  "_meta": {
    "columns": {},
    "schemas": {},
    "tables": {}
  }
}