{
  "id": "fbd1e34a-7d4a-41c2-9c99-cfda190d6502",
  "prevId": "00000000-0000-0000-0000-000000000000",
  "version": "7",
  "dialect": "postgresql",
  "tables": {
    "public.ad_computers": {
      "name": "ad_computers",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "connection_id": {
          "name": "connection_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "distinguished_name": {
          "name": "distinguished_name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "dns_host_name": {
          "name": "dns_host_name",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "operating_system": {
          "name": "operating_system",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "operating_system_version": {
          "name": "operating_system_version",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "last_logon": {
          "name": "last_logon",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "enabled": {
          "name": "enabled",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "ad_properties": {
          "name": "ad_properties",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {},
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.ad_domains": {
      "name": "ad_domains",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "connection_id": {
          "name": "connection_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "distinguished_name": {
          "name": "distinguished_name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "net_bios_name": {
          "name": "net_bios_name",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "forest_name": {
          "name": "forest_name",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "domain_functionality": {
          "name": "domain_functionality",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "ad_properties": {
          "name": "ad_properties",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {},
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.ad_groups": {
      "name": "ad_groups",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "connection_id": {
          "name": "connection_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "distinguished_name": {
          "name": "distinguished_name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "sam_account_name": {
          "name": "sam_account_name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "group_type": {
          "name": "group_type",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "description": {
          "name": "description",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "members": {
          "name": "members",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        },
        "ad_properties": {
          "name": "ad_properties",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {},
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.ad_org_units": {
      "name": "ad_org_units",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "connection_id": {
          "name": "connection_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "distinguished_name": {
          "name": "distinguished_name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "description": {
          "name": "description",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "ad_properties": {
          "name": "ad_properties",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {},
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.ad_users": {
      "name": "ad_users",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "connection_id": {
          "name": "connection_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "distinguished_name": {
          "name": "distinguished_name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "sam_account_name": {
          "name": "sam_account_name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "user_principal_name": {
          "name": "user_principal_name",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "given_name": {
          "name": "given_name",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "surname": {
          "name": "surname",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "display_name": {
          "name": "display_name",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "email": {
          "name": "email",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "enabled": {
          "name": "enabled",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "last_logon": {
          "name": "last_logon",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "member_of": {
          "name": "member_of",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        },
        "ad_properties": {
          "name": "ad_properties",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {},
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.api_tokens": {
      "name": "api_tokens",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "token": {
          "name": "token",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "user_id": {
          "name": "user_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "role_id": {
          "name": "role_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "custom_permissions": {
          "name": "custom_permissions",
          "type": "jsonb",
          "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": false,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "api_tokens_user_id_users_id_fk": {
          "name": "api_tokens_user_id_users_id_fk",
          "tableFrom": "api_tokens",
          "tableTo": "users",
          "columnsFrom": [
            "user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "api_tokens_role_id_roles_id_fk": {
          "name": "api_tokens_role_id_roles_id_fk",
          "tableFrom": "api_tokens",
          "tableTo": "roles",
          "columnsFrom": [
            "role_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {
        "api_tokens_token_unique": {
          "name": "api_tokens_token_unique",
          "nullsNotDistinct": false,
          "columns": [
            "token"
          ]
        }
      },
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.ldap_connections": {
      "name": "ldap_connections",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "server": {
          "name": "server",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "domain": {
          "name": "domain",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "port": {
          "name": "port",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 389
        },
        "use_ssl": {
          "name": "use_ssl",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "username": {
          "name": "username",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "password": {
          "name": "password",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "status": {
          "name": "status",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "default": "'disconnected'"
        },
        "last_connected": {
          "name": "last_connected",
          "type": "timestamp",
          "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.role_permissions": {
      "name": "role_permissions",
      "schema": "",
      "columns": {
        "role_id": {
          "name": "role_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "permission": {
          "name": "permission",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        }
      },
      "indexes": {},
      "foreignKeys": {
        "role_permissions_role_id_roles_id_fk": {
          "name": "role_permissions_role_id_roles_id_fk",
          "tableFrom": "role_permissions",
          "tableTo": "roles",
          "columnsFrom": [
            "role_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {
        "role_permissions_role_id_permission_pk": {
          "name": "role_permissions_role_id_permission_pk",
          "columns": [
            "role_id",
            "permission"
          ]
        }
      },
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.roles": {
      "name": "roles",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "description": {
          "name": "description",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "is_default": {
          "name": "is_default",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {
        "roles_name_unique": {
          "name": "roles_name_unique",
          "nullsNotDistinct": false,
          "columns": [
            "name"
          ]
        }
      },
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.users": {
      "name": "users",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "username": {
          "name": "username",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "password": {
          "name": "password",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "email": {
          "name": "email",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "full_name": {
          "name": "full_name",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "role_id": {
          "name": "role_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "users_role_id_roles_id_fk": {
          "name": "users_role_id_roles_id_fk",
          "tableFrom": "users",
          "tableTo": "roles",
          "columnsFrom": [
            "role_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {
        "users_username_unique": {
          "name": "users_username_unique",
          "nullsNotDistinct": false,
          "columns": [
            "username"
          ]
        }
      },
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    }
  },
  "enums": {},
  "schemas": {},
  "sequences": {},
  "roles": {},
  "policies": {},
  "views": {},
  "_meta": {
    "columns": {},
    "schemas": {},
    "tables": {}
  }
}