{
  "id": "cb2f81d0-2d5a-4e1e-8946-df35b9a7888d",
  "prevId": "025ef65f-b773-48ca-a8c4-44af505b8388",
  "version": "7",
  "dialect": "postgresql",
  "tables": {
    "public.alpla_purchase_history": {
      "name": "alpla_purchase_history",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "apo": {
          "name": "apo",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "revision": {
          "name": "revision",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "confirmed": {
          "name": "confirmed",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "status": {
          "name": "status",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "status_text": {
          "name": "status_text",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "journal_num": {
          "name": "journal_num",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "add_date": {
          "name": "add_date",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        },
        "add_user": {
          "name": "add_user",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "upd_user": {
          "name": "upd_user",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "upd_date": {
          "name": "upd_date",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        },
        "remark": {
          "name": "remark",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "approved_status": {
          "name": "approved_status",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "default": "'new'"
        },
        "position": {
          "name": "position",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false,
          "default": "'[]'::jsonb"
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.job_audit_log": {
      "name": "job_audit_log",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "job_name": {
          "name": "job_name",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "start_at": {
          "name": "start_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "finished_at": {
          "name": "finished_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "duration_ms": {
          "name": "duration_ms",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "status": {
          "name": "status",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "error_message": {
          "name": "error_message",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "error_stack": {
          "name": "error_stack",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "meta_data": {
          "name": "meta_data",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        }
      },
      "indexes": {
        "idx_job_audit_logs_cleanup": {
          "name": "idx_job_audit_logs_cleanup",
          "columns": [
            {
              "expression": "start_at",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.account": {
      "name": "account",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "account_id": {
          "name": "account_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "provider_id": {
          "name": "provider_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "user_id": {
          "name": "user_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "access_token": {
          "name": "access_token",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "refresh_token": {
          "name": "refresh_token",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "id_token": {
          "name": "id_token",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "access_token_expires_at": {
          "name": "access_token_expires_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "refresh_token_expires_at": {
          "name": "refresh_token_expires_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "scope": {
          "name": "scope",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "password": {
          "name": "password",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true
        }
      },
      "indexes": {
        "account_userId_idx": {
          "name": "account_userId_idx",
          "columns": [
            {
              "expression": "user_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "account_user_id_user_id_fk": {
          "name": "account_user_id_user_id_fk",
          "tableFrom": "account",
          "tableTo": "user",
          "columnsFrom": [
            "user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.apikey": {
      "name": "apikey",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "start": {
          "name": "start",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "prefix": {
          "name": "prefix",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "key": {
          "name": "key",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "user_id": {
          "name": "user_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "refill_interval": {
          "name": "refill_interval",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "refill_amount": {
          "name": "refill_amount",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "last_refill_at": {
          "name": "last_refill_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "enabled": {
          "name": "enabled",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "rate_limit_enabled": {
          "name": "rate_limit_enabled",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "rate_limit_time_window": {
          "name": "rate_limit_time_window",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 86400000
        },
        "rate_limit_max": {
          "name": "rate_limit_max",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 10
        },
        "request_count": {
          "name": "request_count",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "remaining": {
          "name": "remaining",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "last_request": {
          "name": "last_request",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "expires_at": {
          "name": "expires_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true
        },
        "permissions": {
          "name": "permissions",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "metadata": {
          "name": "metadata",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {
        "apikey_key_idx": {
          "name": "apikey_key_idx",
          "columns": [
            {
              "expression": "key",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "apikey_userId_idx": {
          "name": "apikey_userId_idx",
          "columns": [
            {
              "expression": "user_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "apikey_user_id_user_id_fk": {
          "name": "apikey_user_id_user_id_fk",
          "tableFrom": "apikey",
          "tableTo": "user",
          "columnsFrom": [
            "user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.jwks": {
      "name": "jwks",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "public_key": {
          "name": "public_key",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "private_key": {
          "name": "private_key",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true
        },
        "expires_at": {
          "name": "expires_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {},
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.session": {
      "name": "session",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "expires_at": {
          "name": "expires_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true
        },
        "token": {
          "name": "token",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true
        },
        "ip_address": {
          "name": "ip_address",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "user_agent": {
          "name": "user_agent",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "user_id": {
          "name": "user_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "impersonated_by": {
          "name": "impersonated_by",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {
        "session_userId_idx": {
          "name": "session_userId_idx",
          "columns": [
            {
              "expression": "user_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "session_user_id_user_id_fk": {
          "name": "session_user_id_user_id_fk",
          "tableFrom": "session",
          "tableTo": "user",
          "columnsFrom": [
            "user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {
        "session_token_unique": {
          "name": "session_token_unique",
          "nullsNotDistinct": false,
          "columns": [
            "token"
          ]
        }
      },
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.user": {
      "name": "user",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "email": {
          "name": "email",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "email_verified": {
          "name": "email_verified",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": false
        },
        "image": {
          "name": "image",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "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()"
        },
        "role": {
          "name": "role",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "banned": {
          "name": "banned",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "ban_reason": {
          "name": "ban_reason",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "ban_expires": {
          "name": "ban_expires",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "username": {
          "name": "username",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "display_username": {
          "name": "display_username",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {},
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {
        "user_email_unique": {
          "name": "user_email_unique",
          "nullsNotDistinct": false,
          "columns": [
            "email"
          ]
        },
        "user_username_unique": {
          "name": "user_username_unique",
          "nullsNotDistinct": false,
          "columns": [
            "username"
          ]
        }
      },
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.verification": {
      "name": "verification",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "identifier": {
          "name": "identifier",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "value": {
          "name": "value",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "expires_at": {
          "name": "expires_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true
        },
        "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": {
        "verification_identifier_idx": {
          "name": "verification_identifier_idx",
          "columns": [
            {
              "expression": "identifier",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.deployment_history": {
      "name": "deployment_history",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "server_id": {
          "name": "server_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "build_number": {
          "name": "build_number",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "status": {
          "name": "status",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "message": {
          "name": "message",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.datamart": {
      "name": "datamart",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "description": {
          "name": "description",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "query": {
          "name": "query",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "version": {
          "name": "version",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 1
        },
        "active": {
          "name": "active",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "options": {
          "name": "options",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "default": "''"
        },
        "public_access": {
          "name": "public_access",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "add_date": {
          "name": "add_date",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        },
        "add_user": {
          "name": "add_user",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "default": "'lst-system'"
        },
        "upd_date": {
          "name": "upd_date",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        },
        "upd_user": {
          "name": "upd_user",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "default": "'lst-system'"
        }
      },
      "indexes": {},
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {
        "datamart_name_unique": {
          "name": "datamart_name_unique",
          "nullsNotDistinct": false,
          "columns": [
            "name"
          ]
        }
      },
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.inv_historical_data": {
      "name": "inv_historical_data",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "hist_date": {
          "name": "hist_date",
          "type": "date",
          "primaryKey": false,
          "notNull": true
        },
        "plant_token": {
          "name": "plant_token",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "article": {
          "name": "article",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "article_description": {
          "name": "article_description",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "material_type": {
          "name": "material_type",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "total_QTY": {
          "name": "total_QTY",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "available_QTY": {
          "name": "available_QTY",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "coa_QTY": {
          "name": "coa_QTY",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "held_QTY": {
          "name": "held_QTY",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "consignment_qty": {
          "name": "consignment_qty",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "lot_number": {
          "name": "lot_number",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "location_id": {
          "name": "location_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "location": {
          "name": "location",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "whse_id": {
          "name": "whse_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "default": "''"
        },
        "whse_name": {
          "name": "whse_name",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "default": "'missing whseName'"
        },
        "upd_user": {
          "name": "upd_user",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "default": "'lst-system'"
        },
        "upd_date": {
          "name": "upd_date",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.logs": {
      "name": "logs",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "level": {
          "name": "level",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "module": {
          "name": "module",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "subModule": {
          "name": "subModule",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "message": {
          "name": "message",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "stack": {
          "name": "stack",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false,
          "default": "'[]'::jsonb"
        },
        "checked": {
          "name": "checked",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "hostname": {
          "name": "hostname",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.notifications": {
      "name": "notifications",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "description": {
          "name": "description",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "active": {
          "name": "active",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "interval": {
          "name": "interval",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "default": "'5'"
        },
        "options": {
          "name": "options",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false,
          "default": "'[]'::jsonb"
        }
      },
      "indexes": {
        "notify_name": {
          "name": "notify_name",
          "columns": [
            {
              "expression": "name",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": true,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.notification_sub": {
      "name": "notification_sub",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "user_id": {
          "name": "user_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "notification_id": {
          "name": "notification_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "emails": {
          "name": "emails",
          "type": "text[]",
          "primaryKey": false,
          "notNull": false,
          "default": "'{}'"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "notification_sub_user_id_user_id_fk": {
          "name": "notification_sub_user_id_user_id_fk",
          "tableFrom": "notification_sub",
          "tableTo": "user",
          "columnsFrom": [
            "user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "notification_sub_notification_id_notifications_id_fk": {
          "name": "notification_sub_notification_id_notifications_id_fk",
          "tableFrom": "notification_sub",
          "tableTo": "notifications",
          "columnsFrom": [
            "notification_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {
        "notification_sub_user_notification_unique": {
          "name": "notification_sub_user_notification_unique",
          "nullsNotDistinct": false,
          "columns": [
            "user_id",
            "notification_id"
          ]
        }
      },
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.opendock_apt": {
      "name": "opendock_apt",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "release": {
          "name": "release",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "open_dock_apt_id": {
          "name": "open_dock_apt_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "appointment": {
          "name": "appointment",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": true,
          "default": "'[]'::jsonb"
        },
        "upd_date": {
          "name": "upd_date",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "opendock_apt_release_idx": {
          "name": "opendock_apt_release_idx",
          "columns": [
            {
              "expression": "release",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "opendock_apt_opendock_id_idx": {
          "name": "opendock_apt_opendock_id_idx",
          "columns": [
            {
              "expression": "open_dock_apt_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {
        "opendock_apt_release_unique": {
          "name": "opendock_apt_release_unique",
          "nullsNotDistinct": false,
          "columns": [
            "release"
          ]
        }
      },
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.printer_log": {
      "name": "printer_log",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "integer",
          "primaryKey": true,
          "notNull": true,
          "identity": {
            "type": "always",
            "name": "printer_log_id_seq",
            "schema": "public",
            "increment": "1",
            "startWith": "1",
            "minValue": "1",
            "maxValue": "2147483647",
            "cache": "1",
            "cycle": false
          }
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "ip": {
          "name": "ip",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "printer_sn": {
          "name": "printer_sn",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "condition": {
          "name": "condition",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "message": {
          "name": "message",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.printer_data": {
      "name": "printer_data",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "humanReadable_id": {
          "name": "humanReadable_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "ipAddress": {
          "name": "ipAddress",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "port": {
          "name": "port",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "status": {
          "name": "status",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "statusText": {
          "name": "statusText",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "printer_sn": {
          "name": "printer_sn",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "last_time_printed": {
          "name": "last_time_printed",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "assigned": {
          "name": "assigned",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "remark": {
          "name": "remark",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "printDelay": {
          "name": "printDelay",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 90
        },
        "processes": {
          "name": "processes",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false,
          "default": "'[]'::jsonb"
        },
        "print_delay_override": {
          "name": "print_delay_override",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "add_Date": {
          "name": "add_Date",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        },
        "upd_date": {
          "name": "upd_date",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        }
      },
      "indexes": {
        "printer_id": {
          "name": "printer_id",
          "columns": [
            {
              "expression": "humanReadable_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": true,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {
        "printer_data_humanReadable_id_unique": {
          "name": "printer_data_humanReadable_id_unique",
          "nullsNotDistinct": false,
          "columns": [
            "humanReadable_id"
          ]
        }
      },
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.scan_log": {
      "name": "scan_log",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "scanner_id": {
          "name": "scanner_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "message": {
          "name": "message",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "prompt": {
          "name": "prompt",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "command_description": {
          "name": "command_description",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "status": {
          "name": "status",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "lines": {
          "name": "lines",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false,
          "default": "'[]'::jsonb"
        },
        "add_Date": {
          "name": "add_Date",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.server_data": {
      "name": "server_data",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "server": {
          "name": "server",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "plant_token": {
          "name": "plant_token",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "id_address": {
          "name": "id_address",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "great_plains_plant_code": {
          "name": "great_plains_plant_code",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "contact_email": {
          "name": "contact_email",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "contact_phone": {
          "name": "contact_phone",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "active": {
          "name": "active",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "server_loc": {
          "name": "server_loc",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "last_updated": {
          "name": "last_updated",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        },
        "build_number": {
          "name": "build_number",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "is_upgrading": {
          "name": "is_upgrading",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        }
      },
      "indexes": {},
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {
        "server_data_plant_token_unique": {
          "name": "server_data_plant_token_unique",
          "nullsNotDistinct": false,
          "columns": [
            "plant_token"
          ]
        }
      },
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.settings": {
      "name": "settings",
      "schema": "",
      "columns": {
        "settings_id": {
          "name": "settings_id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "value": {
          "name": "value",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "description": {
          "name": "description",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "moduleName": {
          "name": "moduleName",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "active": {
          "name": "active",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "roles": {
          "name": "roles",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": true,
          "default": "'[\"systemAdmin\"]'::jsonb"
        },
        "settingType": {
          "name": "settingType",
          "type": "setting_type",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": false
        },
        "seed_version": {
          "name": "seed_version",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 1
        },
        "add_User": {
          "name": "add_User",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'LST_System'"
        },
        "add_Date": {
          "name": "add_Date",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        },
        "upd_User": {
          "name": "upd_User",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'LST_System'"
        },
        "upd_date": {
          "name": "upd_date",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        }
      },
      "indexes": {
        "name": {
          "name": "name",
          "columns": [
            {
              "expression": "name",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": true,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.app_stats": {
      "name": "app_stats",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true,
          "default": "'primary'"
        },
        "current_build": {
          "name": "current_build",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 1
        },
        "last_build_at": {
          "name": "last_build_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "last_deploy_at": {
          "name": "last_deploy_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "building": {
          "name": "building",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": false
        },
        "updating": {
          "name": "updating",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": false
        },
        "last_updated": {
          "name": "last_updated",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        },
        "meta": {
          "name": "meta",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false,
          "default": "'{}'::jsonb"
        }
      },
      "indexes": {},
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    }
  },
  "enums": {
    "public.setting_type": {
      "name": "setting_type",
      "schema": "public",
      "values": [
        "feature",
        "system",
        "standard"
      ]
    }
  },
  "schemas": {},
  "sequences": {},
  "roles": {},
  "policies": {},
  "views": {},
  "_meta": {
    "columns": {},
    "schemas": {},
    "tables": {}
  }
}