{
  "dialect": "sqlite",
  "id": "e397c1d9-19a4-494a-9b87-5a94a093286a",
  "prevIds": ["2c18fbcb-d5f5-47c0-962d-54121cbb2e71"],
  "version": "7",
  "ddl": [
    {
      "name": "auth_sessions",
      "entityType": "tables"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "id",
      "table": "auth_sessions",
      "entityType": "columns"
    },
    {
      "columns": ["id"],
      "nameExplicit": false,
      "name": "auth_sessions_pk",
      "table": "auth_sessions",
      "entityType": "pks"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "kind",
      "table": "auth_sessions",
      "entityType": "columns"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "user_id",
      "table": "auth_sessions",
      "entityType": "columns"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "api_key_hash",
      "table": "auth_sessions",
      "entityType": "columns"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "api_key_display",
      "table": "auth_sessions",
      "entityType": "columns"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "expires_at",
      "table": "auth_sessions",
      "entityType": "columns"
    },
    {
      "type": "integer",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "created_at",
      "table": "auth_sessions",
      "entityType": "columns"
    },
    {
      "name": "ephemeral_nodes",
      "entityType": "tables"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "auth_key",
      "table": "ephemeral_nodes",
      "entityType": "columns"
    },
    {
      "columns": ["auth_key"],
      "nameExplicit": false,
      "name": "ephemeral_nodes_pk",
      "table": "ephemeral_nodes",
      "entityType": "pks"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "node_key",
      "table": "ephemeral_nodes",
      "entityType": "columns"
    },
    {
      "name": "host_info",
      "entityType": "tables"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "host_id",
      "table": "host_info",
      "entityType": "columns"
    },
    {
      "columns": ["host_id"],
      "nameExplicit": false,
      "name": "host_info_pk",
      "table": "host_info",
      "entityType": "pks"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "payload",
      "table": "host_info",
      "entityType": "columns"
    },
    {
      "type": "integer",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "updated_at",
      "table": "host_info",
      "entityType": "columns"
    },
    {
      "name": "users",
      "entityType": "tables"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "id",
      "table": "users",
      "entityType": "columns"
    },
    {
      "columns": ["id"],
      "nameExplicit": false,
      "name": "users_pk",
      "table": "users",
      "entityType": "pks"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "sub",
      "table": "users",
      "entityType": "columns"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": "'member'",
      "generated": null,
      "name": "role",
      "table": "users",
      "entityType": "columns"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "headscale_user_id",
      "table": "users",
      "entityType": "columns"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": "false",
      "generated": null,
      "name": "onboarded",
      "table": "users",
      "entityType": "columns"
    },
    {
      "type": "integer",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "created_at",
      "table": "users",
      "entityType": "columns"
    },
    {
      "type": "integer",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "updated_at",
      "table": "users",
      "entityType": "columns"
    },
    {
      "type": "integer",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "last_login_at",
      "table": "users",
      "entityType": "columns"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": "0",
      "generated": null,
      "name": "caps",
      "table": "users",
      "entityType": "columns"
    },
    {
      "columns": [
        {
          "value": "sub",
          "isExpression": false
        }
      ],
      "isUnique": true,
      "where": null,
      "origin": "manual",
      "name": "users_sub_unique",
      "table": "users",
      "entityType": "indexes"
    },
    {
      "columns": [
        {
          "value": "headscale_user_id",
          "isExpression": false
        }
      ],
      "isUnique": true,
      "where": null,
      "origin": "manual",
      "name": "users_headscale_user_id_unique",
      "table": "users",
      "entityType": "indexes"
    }
  ],
  "renames": []
}
