{
  "version": "6",
  "dialect": "sqlite",
  "id": "23288f1f-8f80-4e54-822f-283e07209d01",
  "prevId": "00000000-0000-0000-0000-000000000000",
  "tables": {
    "cached_image": {
      "name": "cached_image",
      "columns": {
        "hash": {
          "name": "hash",
          "type": "text",
          "primaryKey": true,
          "notNull": true,
          "autoincrement": false
        },
        "mime_type": {
          "name": "mime_type",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "url": {
          "name": "url",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        }
      },
      "indexes": {},
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "checkConstraints": {}
    },
    "channel_custom_show": {
      "name": "channel_custom_show",
      "columns": {
        "channel_uuid": {
          "name": "channel_uuid",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "program_uuid": {
          "name": "program_uuid",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        }
      },
      "indexes": {},
      "foreignKeys": {
        "channel_custom_show_channel_uuid_channel_uuid_fk": {
          "name": "channel_custom_show_channel_uuid_channel_uuid_fk",
          "tableFrom": "channel_custom_show",
          "tableTo": "channel",
          "columnsFrom": [
            "channel_uuid"
          ],
          "columnsTo": [
            "uuid"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "channel_custom_show_program_uuid_program_uuid_fk": {
          "name": "channel_custom_show_program_uuid_program_uuid_fk",
          "tableFrom": "channel_custom_show",
          "tableTo": "program",
          "columnsFrom": [
            "program_uuid"
          ],
          "columnsTo": [
            "uuid"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {
        "channel_custom_show_channel_uuid_program_uuid_pk": {
          "columns": [
            "channel_uuid",
            "program_uuid"
          ],
          "name": "channel_custom_show_channel_uuid_program_uuid_pk"
        }
      },
      "uniqueConstraints": {},
      "checkConstraints": {}
    },
    "channel_filler_show": {
      "name": "channel_filler_show",
      "columns": {
        "channel_uuid": {
          "name": "channel_uuid",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "filler_show_uuid": {
          "name": "filler_show_uuid",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "cooldown": {
          "name": "cooldown",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "weight": {
          "name": "weight",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        }
      },
      "indexes": {},
      "foreignKeys": {
        "channel_filler_show_channel_uuid_channel_uuid_fk": {
          "name": "channel_filler_show_channel_uuid_channel_uuid_fk",
          "tableFrom": "channel_filler_show",
          "tableTo": "channel",
          "columnsFrom": [
            "channel_uuid"
          ],
          "columnsTo": [
            "uuid"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "channel_filler_show_filler_show_uuid_filler_show_uuid_fk": {
          "name": "channel_filler_show_filler_show_uuid_filler_show_uuid_fk",
          "tableFrom": "channel_filler_show",
          "tableTo": "filler_show",
          "columnsFrom": [
            "filler_show_uuid"
          ],
          "columnsTo": [
            "uuid"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {
        "channel_filler_show_channel_uuid_filler_show_uuid_pk": {
          "columns": [
            "channel_uuid",
            "filler_show_uuid"
          ],
          "name": "channel_filler_show_channel_uuid_filler_show_uuid_pk"
        }
      },
      "uniqueConstraints": {},
      "checkConstraints": {}
    },
    "channel_programs": {
      "name": "channel_programs",
      "columns": {
        "channel_uuid": {
          "name": "channel_uuid",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "program_uuid": {
          "name": "program_uuid",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        }
      },
      "indexes": {},
      "foreignKeys": {
        "channel_programs_channel_uuid_channel_uuid_fk": {
          "name": "channel_programs_channel_uuid_channel_uuid_fk",
          "tableFrom": "channel_programs",
          "tableTo": "channel",
          "columnsFrom": [
            "channel_uuid"
          ],
          "columnsTo": [
            "uuid"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "channel_programs_program_uuid_program_uuid_fk": {
          "name": "channel_programs_program_uuid_program_uuid_fk",
          "tableFrom": "channel_programs",
          "tableTo": "program",
          "columnsFrom": [
            "program_uuid"
          ],
          "columnsTo": [
            "uuid"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {
        "channel_programs_channel_uuid_program_uuid_pk": {
          "columns": [
            "channel_uuid",
            "program_uuid"
          ],
          "name": "channel_programs_channel_uuid_program_uuid_pk"
        }
      },
      "uniqueConstraints": {},
      "checkConstraints": {}
    },
    "custom_show": {
      "name": "custom_show",
      "columns": {
        "uuid": {
          "name": "uuid",
          "type": "text",
          "primaryKey": true,
          "notNull": true,
          "autoincrement": false
        },
        "created_at": {
          "name": "created_at",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "updated_at": {
          "name": "updated_at",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        }
      },
      "indexes": {},
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "checkConstraints": {}
    },
    "custom_show_content": {
      "name": "custom_show_content",
      "columns": {
        "content_uuid": {
          "name": "content_uuid",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "custom_show_uuid": {
          "name": "custom_show_uuid",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "index": {
          "name": "index",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        }
      },
      "indexes": {},
      "foreignKeys": {
        "custom_show_content_custom_show_uuid_custom_show_uuid_fk": {
          "name": "custom_show_content_custom_show_uuid_custom_show_uuid_fk",
          "tableFrom": "custom_show_content",
          "tableTo": "custom_show",
          "columnsFrom": [
            "custom_show_uuid"
          ],
          "columnsTo": [
            "uuid"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {
        "custom_show_content_content_uuid_custom_show_uuid_pk": {
          "columns": [
            "content_uuid",
            "custom_show_uuid"
          ],
          "name": "custom_show_content_content_uuid_custom_show_uuid_pk"
        }
      },
      "uniqueConstraints": {},
      "checkConstraints": {}
    },
    "filler_show": {
      "name": "filler_show",
      "columns": {
        "uuid": {
          "name": "uuid",
          "type": "text",
          "primaryKey": true,
          "notNull": true,
          "autoincrement": false
        },
        "created_at": {
          "name": "created_at",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "updated_at": {
          "name": "updated_at",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        }
      },
      "indexes": {},
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "checkConstraints": {}
    },
    "filler_show_content": {
      "name": "filler_show_content",
      "columns": {
        "filler_show_uuid": {
          "name": "filler_show_uuid",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "index": {
          "name": "index",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "program_uuid": {
          "name": "program_uuid",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        }
      },
      "indexes": {},
      "foreignKeys": {
        "filler_show_content_filler_show_uuid_filler_show_uuid_fk": {
          "name": "filler_show_content_filler_show_uuid_filler_show_uuid_fk",
          "tableFrom": "filler_show_content",
          "tableTo": "filler_show",
          "columnsFrom": [
            "filler_show_uuid"
          ],
          "columnsTo": [
            "uuid"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        },
        "filler_show_content_program_uuid_program_uuid_fk": {
          "name": "filler_show_content_program_uuid_program_uuid_fk",
          "tableFrom": "filler_show_content",
          "tableTo": "program",
          "columnsFrom": [
            "program_uuid"
          ],
          "columnsTo": [
            "uuid"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {
        "filler_show_content_filler_show_uuid_program_uuid_pk": {
          "columns": [
            "filler_show_uuid",
            "program_uuid"
          ],
          "name": "filler_show_content_filler_show_uuid_program_uuid_pk"
        }
      },
      "uniqueConstraints": {},
      "checkConstraints": {}
    },
    "media_source": {
      "name": "media_source",
      "columns": {
        "uuid": {
          "name": "uuid",
          "type": "text",
          "primaryKey": true,
          "notNull": true,
          "autoincrement": false
        },
        "created_at": {
          "name": "created_at",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "updated_at": {
          "name": "updated_at",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "access_token": {
          "name": "access_token",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "client_identifier": {
          "name": "client_identifier",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "index": {
          "name": "index",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "send_channel_updates": {
          "name": "send_channel_updates",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false,
          "default": false
        },
        "send_guide_updates": {
          "name": "send_guide_updates",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false,
          "default": false
        },
        "type": {
          "name": "type",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "uri": {
          "name": "uri",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        }
      },
      "indexes": {},
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "checkConstraints": {
        "media_source_type_check": {
          "name": "media_source_type_check",
          "value": "\"media_source\".\"type\" in ('plex', 'jellyfin')"
        }
      }
    },
    "program": {
      "name": "program",
      "columns": {
        "uuid": {
          "name": "uuid",
          "type": "text",
          "primaryKey": true,
          "notNull": true,
          "autoincrement": false
        },
        "created_at": {
          "name": "created_at",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "updated_at": {
          "name": "updated_at",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "album_name": {
          "name": "album_name",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "album_uuid": {
          "name": "album_uuid",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "artist_name": {
          "name": "artist_name",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "artist_uuid": {
          "name": "artist_uuid",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "duration": {
          "name": "duration",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "episode": {
          "name": "episode",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "episode_icon": {
          "name": "episode_icon",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "external_key": {
          "name": "external_key",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "external_source_id": {
          "name": "external_source_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "file_path": {
          "name": "file_path",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "grandparent_external_key": {
          "name": "grandparent_external_key",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "icon": {
          "name": "icon",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "original_air_date": {
          "name": "original_air_date",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "parent_external_key": {
          "name": "parent_external_key",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "plex_file_path": {
          "name": "plex_file_path",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "plex_rating_key": {
          "name": "plex_rating_key",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "rating": {
          "name": "rating",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "season_icon": {
          "name": "season_icon",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "season_number": {
          "name": "season_number",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "season_uuid": {
          "name": "season_uuid",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "show_icon": {
          "name": "show_icon",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "show_title": {
          "name": "show_title",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "source_type": {
          "name": "source_type",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "summary": {
          "name": "summary",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "title": {
          "name": "title",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "tv_show_uuid": {
          "name": "tv_show_uuid",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "type": {
          "name": "type",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "year": {
          "name": "year",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        }
      },
      "indexes": {
        "program_season_uuid_index": {
          "name": "program_season_uuid_index",
          "columns": [
            "season_uuid"
          ],
          "isUnique": false
        },
        "program_tv_show_uuid_index": {
          "name": "program_tv_show_uuid_index",
          "columns": [
            "tv_show_uuid"
          ],
          "isUnique": false
        },
        "program_album_uuid_index": {
          "name": "program_album_uuid_index",
          "columns": [
            "album_uuid"
          ],
          "isUnique": false
        },
        "program_artist_uuid_index": {
          "name": "program_artist_uuid_index",
          "columns": [
            "artist_uuid"
          ],
          "isUnique": false
        },
        "program_source_type_external_source_id_external_key_unique": {
          "name": "program_source_type_external_source_id_external_key_unique",
          "columns": [
            "source_type",
            "external_source_id",
            "external_key"
          ],
          "isUnique": true
        }
      },
      "foreignKeys": {
        "program_album_uuid_program_grouping_uuid_fk": {
          "name": "program_album_uuid_program_grouping_uuid_fk",
          "tableFrom": "program",
          "tableTo": "program_grouping",
          "columnsFrom": [
            "album_uuid"
          ],
          "columnsTo": [
            "uuid"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        },
        "program_artist_uuid_program_grouping_uuid_fk": {
          "name": "program_artist_uuid_program_grouping_uuid_fk",
          "tableFrom": "program",
          "tableTo": "program_grouping",
          "columnsFrom": [
            "artist_uuid"
          ],
          "columnsTo": [
            "uuid"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        },
        "program_season_uuid_program_grouping_uuid_fk": {
          "name": "program_season_uuid_program_grouping_uuid_fk",
          "tableFrom": "program",
          "tableTo": "program_grouping",
          "columnsFrom": [
            "season_uuid"
          ],
          "columnsTo": [
            "uuid"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        },
        "program_tv_show_uuid_program_grouping_uuid_fk": {
          "name": "program_tv_show_uuid_program_grouping_uuid_fk",
          "tableFrom": "program",
          "tableTo": "program_grouping",
          "columnsFrom": [
            "tv_show_uuid"
          ],
          "columnsTo": [
            "uuid"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "checkConstraints": {
        "program_type_check": {
          "name": "program_type_check",
          "value": "\"program\".\"type\" in ('movie', 'episode', 'track')"
        },
        "program_source_type_check": {
          "name": "program_source_type_check",
          "value": "\"program\".\"source_type\" in ('plex', 'jellyfin')"
        }
      }
    },
    "program_external_id": {
      "name": "program_external_id",
      "columns": {
        "uuid": {
          "name": "uuid",
          "type": "text",
          "primaryKey": true,
          "notNull": true,
          "autoincrement": false
        },
        "created_at": {
          "name": "created_at",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "updated_at": {
          "name": "updated_at",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "direct_file_path": {
          "name": "direct_file_path",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "external_file_path": {
          "name": "external_file_path",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "external_key": {
          "name": "external_key",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "external_source_id": {
          "name": "external_source_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "program_uuid": {
          "name": "program_uuid",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "source_type": {
          "name": "source_type",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        }
      },
      "indexes": {
        "program_external_id_program_uuid_index": {
          "name": "program_external_id_program_uuid_index",
          "columns": [
            "program_uuid"
          ],
          "isUnique": false
        },
        "unique_program_multiple_external_id": {
          "name": "unique_program_multiple_external_id",
          "columns": [
            "program_uuid",
            "source_type",
            "external_source_id"
          ],
          "isUnique": true,
          "where": "`external_source_id` is not null"
        },
        "unique_program_single_external_id": {
          "name": "unique_program_single_external_id",
          "columns": [
            "program_uuid",
            "source_type",
            "external_source_id"
          ],
          "isUnique": true,
          "where": "`external_source_id` is null"
        }
      },
      "foreignKeys": {
        "program_external_id_program_uuid_program_uuid_fk": {
          "name": "program_external_id_program_uuid_program_uuid_fk",
          "tableFrom": "program_external_id",
          "tableTo": "program",
          "columnsFrom": [
            "program_uuid"
          ],
          "columnsTo": [
            "uuid"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "checkConstraints": {
        "source_type": {
          "name": "source_type",
          "value": "\"program_external_id\".\"source_type\" in ('plex', 'plex-guid', 'tmdb', 'imdb', 'tvdb', 'jellyfin')"
        }
      }
    },
    "program_grouping": {
      "name": "program_grouping",
      "columns": {
        "uuid": {
          "name": "uuid",
          "type": "text",
          "primaryKey": true,
          "notNull": true,
          "autoincrement": false
        },
        "created_at": {
          "name": "created_at",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "updated_at": {
          "name": "updated_at",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "artist_uuid": {
          "name": "artist_uuid",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "icon": {
          "name": "icon",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "index": {
          "name": "index",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "show_uuid": {
          "name": "show_uuid",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "summary": {
          "name": "summary",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "title": {
          "name": "title",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "type": {
          "name": "type",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "year": {
          "name": "year",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        }
      },
      "indexes": {
        "program_grouping_show_uuid_index": {
          "name": "program_grouping_show_uuid_index",
          "columns": [
            "show_uuid"
          ],
          "isUnique": false
        },
        "program_grouping_artist_uuid_index": {
          "name": "program_grouping_artist_uuid_index",
          "columns": [
            "artist_uuid"
          ],
          "isUnique": false
        }
      },
      "foreignKeys": {
        "program_grouping_artist_uuid_program_grouping_uuid_fk": {
          "name": "program_grouping_artist_uuid_program_grouping_uuid_fk",
          "tableFrom": "program_grouping",
          "tableTo": "program_grouping",
          "columnsFrom": [
            "artist_uuid"
          ],
          "columnsTo": [
            "uuid"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        },
        "program_grouping_show_uuid_program_grouping_uuid_fk": {
          "name": "program_grouping_show_uuid_program_grouping_uuid_fk",
          "tableFrom": "program_grouping",
          "tableTo": "program_grouping",
          "columnsFrom": [
            "show_uuid"
          ],
          "columnsTo": [
            "uuid"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "checkConstraints": {
        "type_check": {
          "name": "type_check",
          "value": "\"program_grouping\".\"type\" in ('show', 'season', 'artist', 'album')"
        }
      }
    },
    "program_grouping_external_id": {
      "name": "program_grouping_external_id",
      "columns": {
        "uuid": {
          "name": "uuid",
          "type": "text",
          "primaryKey": true,
          "notNull": true,
          "autoincrement": false
        },
        "created_at": {
          "name": "created_at",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "updated_at": {
          "name": "updated_at",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "external_file_path": {
          "name": "external_file_path",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "external_key": {
          "name": "external_key",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "external_source_id": {
          "name": "external_source_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "group_uuid": {
          "name": "group_uuid",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "source_type": {
          "name": "source_type",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        }
      },
      "indexes": {
        "program_grouping_group_uuid_index": {
          "name": "program_grouping_group_uuid_index",
          "columns": [
            "group_uuid"
          ],
          "isUnique": false
        }
      },
      "foreignKeys": {
        "program_grouping_external_id_group_uuid_program_grouping_uuid_fk": {
          "name": "program_grouping_external_id_group_uuid_program_grouping_uuid_fk",
          "tableFrom": "program_grouping_external_id",
          "tableTo": "program_grouping",
          "columnsFrom": [
            "group_uuid"
          ],
          "columnsTo": [
            "uuid"
          ],
          "onDelete": "cascade",
          "onUpdate": "cascade"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "checkConstraints": {
        "source_type_check": {
          "name": "source_type_check",
          "value": "\"program_grouping_external_id\".\"source_type\" in ('plex', 'plex-guid', 'tmdb', 'imdb', 'tvdb', 'jellyfin')"
        }
      }
    },
    "transcode_config": {
      "name": "transcode_config",
      "columns": {
        "uuid": {
          "name": "uuid",
          "type": "text",
          "primaryKey": true,
          "notNull": true,
          "autoincrement": false
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "thread_count": {
          "name": "thread_count",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "hardware_acceleration_mode": {
          "name": "hardware_acceleration_mode",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "vaapi_driver": {
          "name": "vaapi_driver",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": "'system'"
        },
        "vaapi_device": {
          "name": "vaapi_device",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "resolution": {
          "name": "resolution",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "video_format": {
          "name": "video_format",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "video_profile": {
          "name": "video_profile",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "video_preset": {
          "name": "video_preset",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "video_bit_depth": {
          "name": "video_bit_depth",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false,
          "default": 8
        },
        "video_bit_rate": {
          "name": "video_bit_rate",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "video_buffer_size": {
          "name": "video_buffer_size",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "audio_channels": {
          "name": "audio_channels",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "audio_format": {
          "name": "audio_format",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "audio_bit_rate": {
          "name": "audio_bit_rate",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "audio_buffer_size": {
          "name": "audio_buffer_size",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "audio_sample_rate": {
          "name": "audio_sample_rate",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "audio_volume_percent": {
          "name": "audio_volume_percent",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": 100
        },
        "normalize_frame_rate": {
          "name": "normalize_frame_rate",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false,
          "default": false
        },
        "deinterlace_video": {
          "name": "deinterlace_video",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false,
          "default": true
        },
        "disable_channel_overlay": {
          "name": "disable_channel_overlay",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false,
          "default": false
        },
        "error_screen": {
          "name": "error_screen",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": "'pic'"
        },
        "error_screen_audio": {
          "name": "error_screen_audio",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": "'silent'"
        },
        "is_default": {
          "name": "is_default",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": false
        }
      },
      "indexes": {},
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "checkConstraints": {
        "transcode_config_hardware_accel_check": {
          "name": "transcode_config_hardware_accel_check",
          "value": "\"transcode_config\".\"hardware_acceleration_mode\" in ('none', 'cuda', 'vaapi', 'qsv', 'videotoolbox')"
        },
        "transcode_config_vaapi_driver_check": {
          "name": "transcode_config_vaapi_driver_check",
          "value": "\"transcode_config\".\"vaapi_driver\" in ('system', 'ihd', 'i965', 'radeonsi', 'nouveau')"
        },
        "transcode_config_video_format_check": {
          "name": "transcode_config_video_format_check",
          "value": "\"transcode_config\".\"video_format\" in ('h264', 'hevc', 'mpeg2video')"
        },
        "transcode_config_audio_format_check": {
          "name": "transcode_config_audio_format_check",
          "value": "\"transcode_config\".\"audio_format\" in ('aac', 'ac3', 'copy', 'mp3')"
        },
        "transcode_config_error_screen_check": {
          "name": "transcode_config_error_screen_check",
          "value": "\"transcode_config\".\"error_screen\" in ('static', 'pic', 'blank', 'testsrc', 'text', 'kill')"
        },
        "transcode_config_error_screen_audio_check": {
          "name": "transcode_config_error_screen_audio_check",
          "value": "\"transcode_config\".\"error_screen_audio\" in ('silent', 'sine', 'whitenoise')"
        }
      }
    }
  },
  "views": {},
  "enums": {},
  "_meta": {
    "schemas": {},
    "tables": {},
    "columns": {}
  },
  "internal": {
    "indexes": {}
  }
}