{
  "version": "7",
  "dialect": "sqlite",
  "id": "195d210b-d216-4980-8d74-fa3ac3abfcd2",
  "prevIds": [
    "68ef2e2f-c7b2-41bb-9487-2d49bd04d70d"
  ],
  "ddl": [
    {
      "name": "component_migrations",
      "entityType": "tables"
    },
    {
      "name": "components",
      "entityType": "tables"
    },
    {
      "name": "jobs",
      "entityType": "tables"
    },
    {
      "name": "play_inputs",
      "entityType": "tables"
    },
    {
      "name": "plays",
      "entityType": "tables"
    },
    {
      "name": "plays_historical",
      "entityType": "tables"
    },
    {
      "name": "play_queue_states",
      "entityType": "tables"
    },
    {
      "type": "integer",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "id",
      "entityType": "columns",
      "table": "component_migrations"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "componentId",
      "entityType": "columns",
      "table": "component_migrations"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "name",
      "entityType": "columns",
      "table": "component_migrations"
    },
    {
      "type": "integer",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "success",
      "entityType": "columns",
      "table": "component_migrations"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "error",
      "entityType": "columns",
      "table": "component_migrations"
    },
    {
      "type": "number",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "attemptedAt",
      "entityType": "columns",
      "table": "component_migrations"
    },
    {
      "type": "integer",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "id",
      "entityType": "columns",
      "table": "components"
    },
    {
      "type": "text(200)",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "uid",
      "entityType": "columns",
      "table": "components"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "mode",
      "entityType": "columns",
      "table": "components"
    },
    {
      "type": "text(50)",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "type",
      "entityType": "columns",
      "table": "components"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "name",
      "entityType": "columns",
      "table": "components"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": "0",
      "generated": null,
      "name": "countLive",
      "entityType": "columns",
      "table": "components"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": "0",
      "generated": null,
      "name": "countNonLive",
      "entityType": "columns",
      "table": "components"
    },
    {
      "type": "number",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "createdAt",
      "entityType": "columns",
      "table": "components"
    },
    {
      "type": "number",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "lastReadyAt",
      "entityType": "columns",
      "table": "components"
    },
    {
      "type": "number",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "lastActiveAt",
      "entityType": "columns",
      "table": "components"
    },
    {
      "type": "integer",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "id",
      "entityType": "columns",
      "table": "jobs"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "componentFromId",
      "entityType": "columns",
      "table": "jobs"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "componentToId",
      "entityType": "columns",
      "table": "jobs"
    },
    {
      "type": "text(50)",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "name",
      "entityType": "columns",
      "table": "jobs"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": "'idle'",
      "generated": null,
      "name": "status",
      "entityType": "columns",
      "table": "jobs"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": "0",
      "generated": null,
      "name": "retries",
      "entityType": "columns",
      "table": "jobs"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "error",
      "entityType": "columns",
      "table": "jobs"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "transformOptions",
      "entityType": "columns",
      "table": "jobs"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "initialParameters",
      "entityType": "columns",
      "table": "jobs"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "cursor",
      "entityType": "columns",
      "table": "jobs"
    },
    {
      "type": "integer",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "total",
      "entityType": "columns",
      "table": "jobs"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": "0",
      "generated": null,
      "name": "imported",
      "entityType": "columns",
      "table": "jobs"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": "0",
      "generated": null,
      "name": "scrobbled",
      "entityType": "columns",
      "table": "jobs"
    },
    {
      "type": "number",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "createdAt",
      "entityType": "columns",
      "table": "jobs"
    },
    {
      "type": "number",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "updatedAt",
      "entityType": "columns",
      "table": "jobs"
    },
    {
      "type": "number",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "completedAt",
      "entityType": "columns",
      "table": "jobs"
    },
    {
      "type": "integer",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "id",
      "entityType": "columns",
      "table": "play_inputs"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "playId",
      "entityType": "columns",
      "table": "play_inputs"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "data",
      "entityType": "columns",
      "table": "play_inputs"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "play",
      "entityType": "columns",
      "table": "play_inputs"
    },
    {
      "type": "number",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "createdAt",
      "entityType": "columns",
      "table": "play_inputs"
    },
    {
      "type": "integer",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "id",
      "entityType": "columns",
      "table": "plays"
    },
    {
      "type": "text(30)",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "uid",
      "entityType": "columns",
      "table": "plays"
    },
    {
      "type": "integer",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "componentId",
      "entityType": "columns",
      "table": "plays"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "error",
      "entityType": "columns",
      "table": "plays"
    },
    {
      "type": "number",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "playedAt",
      "entityType": "columns",
      "table": "plays"
    },
    {
      "type": "number",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "seenAt",
      "entityType": "columns",
      "table": "plays"
    },
    {
      "type": "number",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "updatedAt",
      "entityType": "columns",
      "table": "plays"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "play",
      "entityType": "columns",
      "table": "plays"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "state",
      "entityType": "columns",
      "table": "plays"
    },
    {
      "type": "integer",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "parentId",
      "entityType": "columns",
      "table": "plays"
    },
    {
      "type": "integer",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "jobId",
      "entityType": "columns",
      "table": "plays"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "playHash",
      "entityType": "columns",
      "table": "plays"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "mbidIdentifier",
      "entityType": "columns",
      "table": "plays"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "compacted",
      "entityType": "columns",
      "table": "plays"
    },
    {
      "type": "integer",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "id",
      "entityType": "columns",
      "table": "plays_historical"
    },
    {
      "type": "text(200)",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "uid",
      "entityType": "columns",
      "table": "plays_historical"
    },
    {
      "type": "integer",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "componentId",
      "entityType": "columns",
      "table": "plays_historical"
    },
    {
      "type": "number",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "playedAt",
      "entityType": "columns",
      "table": "plays_historical"
    },
    {
      "type": "number",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "seenAt",
      "entityType": "columns",
      "table": "plays_historical"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "play",
      "entityType": "columns",
      "table": "plays_historical"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "playHash",
      "entityType": "columns",
      "table": "plays_historical"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "mbidIdentifier",
      "entityType": "columns",
      "table": "plays_historical"
    },
    {
      "type": "integer",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "id",
      "entityType": "columns",
      "table": "play_queue_states"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "playId",
      "entityType": "columns",
      "table": "play_queue_states"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "componentId",
      "entityType": "columns",
      "table": "play_queue_states"
    },
    {
      "type": "text(50)",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "queueName",
      "entityType": "columns",
      "table": "play_queue_states"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": "'queued'",
      "generated": null,
      "name": "queueStatus",
      "entityType": "columns",
      "table": "play_queue_states"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": "0",
      "generated": null,
      "name": "retries",
      "entityType": "columns",
      "table": "play_queue_states"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "error",
      "entityType": "columns",
      "table": "play_queue_states"
    },
    {
      "type": "number",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "createdAt",
      "entityType": "columns",
      "table": "play_queue_states"
    },
    {
      "type": "number",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "updatedAt",
      "entityType": "columns",
      "table": "play_queue_states"
    },
    {
      "columns": [
        "componentId"
      ],
      "tableTo": "components",
      "columnsTo": [
        "id"
      ],
      "onUpdate": "CASCADE",
      "onDelete": "CASCADE",
      "nameExplicit": false,
      "name": "fk_component_migrations_componentId_components_id_fk",
      "entityType": "fks",
      "table": "component_migrations"
    },
    {
      "columns": [
        "componentFromId"
      ],
      "tableTo": "components",
      "columnsTo": [
        "id"
      ],
      "onUpdate": "CASCADE",
      "onDelete": "CASCADE",
      "nameExplicit": false,
      "name": "fk_jobs_componentFromId_components_id_fk",
      "entityType": "fks",
      "table": "jobs"
    },
    {
      "columns": [
        "componentToId"
      ],
      "tableTo": "components",
      "columnsTo": [
        "id"
      ],
      "onUpdate": "CASCADE",
      "onDelete": "CASCADE",
      "nameExplicit": false,
      "name": "fk_jobs_componentToId_components_id_fk",
      "entityType": "fks",
      "table": "jobs"
    },
    {
      "columns": [
        "playId"
      ],
      "tableTo": "plays",
      "columnsTo": [
        "id"
      ],
      "onUpdate": "CASCADE",
      "onDelete": "CASCADE",
      "nameExplicit": false,
      "name": "fk_play_inputs_playId_plays_id_fk",
      "entityType": "fks",
      "table": "play_inputs"
    },
    {
      "columns": [
        "componentId"
      ],
      "tableTo": "components",
      "columnsTo": [
        "id"
      ],
      "onUpdate": "CASCADE",
      "onDelete": "CASCADE",
      "nameExplicit": false,
      "name": "fk_plays_componentId_components_id_fk",
      "entityType": "fks",
      "table": "plays"
    },
    {
      "columns": [
        "parentId"
      ],
      "tableTo": "plays",
      "columnsTo": [
        "id"
      ],
      "onUpdate": "CASCADE",
      "onDelete": "SET NULL",
      "nameExplicit": false,
      "name": "fk_plays_parentId_plays_id_fk",
      "entityType": "fks",
      "table": "plays"
    },
    {
      "columns": [
        "jobId"
      ],
      "tableTo": "jobs",
      "columnsTo": [
        "id"
      ],
      "onUpdate": "CASCADE",
      "onDelete": "CASCADE",
      "nameExplicit": false,
      "name": "fk_plays_jobId_jobs_id_fk",
      "entityType": "fks",
      "table": "plays"
    },
    {
      "columns": [
        "componentId"
      ],
      "tableTo": "components",
      "columnsTo": [
        "id"
      ],
      "onUpdate": "CASCADE",
      "onDelete": "CASCADE",
      "nameExplicit": false,
      "name": "fk_plays_historical_componentId_components_id_fk",
      "entityType": "fks",
      "table": "plays_historical"
    },
    {
      "columns": [
        "playId"
      ],
      "tableTo": "plays",
      "columnsTo": [
        "id"
      ],
      "onUpdate": "CASCADE",
      "onDelete": "CASCADE",
      "nameExplicit": false,
      "name": "fk_play_queue_states_playId_plays_id_fk",
      "entityType": "fks",
      "table": "play_queue_states"
    },
    {
      "columns": [
        "componentId"
      ],
      "tableTo": "components",
      "columnsTo": [
        "id"
      ],
      "onUpdate": "CASCADE",
      "onDelete": "CASCADE",
      "nameExplicit": false,
      "name": "fk_play_queue_states_componentId_components_id_fk",
      "entityType": "fks",
      "table": "play_queue_states"
    },
    {
      "columns": [
        "id"
      ],
      "nameExplicit": false,
      "name": "component_migrations_pk",
      "table": "component_migrations",
      "entityType": "pks"
    },
    {
      "columns": [
        "id"
      ],
      "nameExplicit": false,
      "name": "components_pk",
      "table": "components",
      "entityType": "pks"
    },
    {
      "columns": [
        "id"
      ],
      "nameExplicit": false,
      "name": "jobs_pk",
      "table": "jobs",
      "entityType": "pks"
    },
    {
      "columns": [
        "id"
      ],
      "nameExplicit": false,
      "name": "play_inputs_pk",
      "table": "play_inputs",
      "entityType": "pks"
    },
    {
      "columns": [
        "id"
      ],
      "nameExplicit": false,
      "name": "plays_pk",
      "table": "plays",
      "entityType": "pks"
    },
    {
      "columns": [
        "id"
      ],
      "nameExplicit": false,
      "name": "plays_historical_pk",
      "table": "plays_historical",
      "entityType": "pks"
    },
    {
      "columns": [
        "id"
      ],
      "nameExplicit": false,
      "name": "play_queue_states_pk",
      "table": "play_queue_states",
      "entityType": "pks"
    },
    {
      "columns": [
        {
          "value": "uid",
          "isExpression": false
        },
        {
          "value": "mode",
          "isExpression": false
        },
        {
          "value": "type",
          "isExpression": false
        }
      ],
      "isUnique": true,
      "where": null,
      "origin": "manual",
      "name": "uid_mode_type_idx",
      "entityType": "indexes",
      "table": "components"
    },
    {
      "columns": [
        {
          "value": "playId",
          "isExpression": false
        }
      ],
      "isUnique": true,
      "where": null,
      "origin": "manual",
      "name": "play_input_id_idx",
      "entityType": "indexes",
      "table": "play_inputs"
    },
    {
      "columns": [
        {
          "value": "parentId",
          "isExpression": false
        }
      ],
      "isUnique": false,
      "where": null,
      "origin": "manual",
      "name": "play_parent_id_idx",
      "entityType": "indexes",
      "table": "plays"
    },
    {
      "columns": [
        {
          "value": "componentId",
          "isExpression": false
        }
      ],
      "isUnique": false,
      "where": null,
      "origin": "manual",
      "name": "play_component_id_idx",
      "entityType": "indexes",
      "table": "plays"
    },
    {
      "columns": [
        {
          "value": "uid",
          "isExpression": false
        }
      ],
      "isUnique": true,
      "where": null,
      "origin": "manual",
      "name": "play_uid_idx",
      "entityType": "indexes",
      "table": "plays"
    },
    {
      "columns": [
        {
          "value": "playedAt",
          "isExpression": false
        }
      ],
      "isUnique": false,
      "where": null,
      "origin": "manual",
      "name": "play_playedAt_idx",
      "entityType": "indexes",
      "table": "plays"
    },
    {
      "columns": [
        {
          "value": "seenAt",
          "isExpression": false
        }
      ],
      "isUnique": false,
      "where": null,
      "origin": "manual",
      "name": "play_seenAt_idx",
      "entityType": "indexes",
      "table": "plays"
    },
    {
      "columns": [
        {
          "value": "componentId",
          "isExpression": false
        }
      ],
      "isUnique": false,
      "where": null,
      "origin": "manual",
      "name": "play_historical_component_id_idx",
      "entityType": "indexes",
      "table": "plays_historical"
    },
    {
      "columns": [
        {
          "value": "uid",
          "isExpression": false
        }
      ],
      "isUnique": true,
      "where": null,
      "origin": "manual",
      "name": "play_historical_uid_idx",
      "entityType": "indexes",
      "table": "plays_historical"
    },
    {
      "columns": [
        {
          "value": "playedAt",
          "isExpression": false
        }
      ],
      "isUnique": false,
      "where": null,
      "origin": "manual",
      "name": "play_historical_playedAt_idx",
      "entityType": "indexes",
      "table": "plays_historical"
    },
    {
      "columns": [
        {
          "value": "playId",
          "isExpression": false
        }
      ],
      "isUnique": false,
      "where": null,
      "origin": "manual",
      "name": "play_queue_state_id_idx",
      "entityType": "indexes",
      "table": "play_queue_states"
    }
  ],
  "renames": []
}